/* GyanPilot Play & Think - colourful, child-friendly styles for the 17 games. Mobile first. */
:root {
  --gpp-ink: #1e1b4b; --gpp-muted: #5b5f86; --gpp-bg: #f6f4ff; --gpp-card: #ffffff; --gpp-line: #e4e1f7;
  --gpp-brand: #5b3df5; --gpp-brand2: #ff7a59; --gpp-good: #16a34a; --gpp-bad: #e11d48; --gpp-gold: #f59e0b;
  --gpp-radius: 22px; --gpp-shadow: 0 10px 30px rgba(49, 31, 160, .12); --gpp-tap: 52px;
  --g1: #7c3aed; --g2: #c026d3;
}
[data-theme="dark"] { --gpp-ink: #f3f1ff; --gpp-muted: #c4c1e8; --gpp-bg: #131033; --gpp-card: #1f1b4d; --gpp-line: #34306b; --gpp-shadow: 0 10px 30px rgba(0,0,0,.35); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.gpp-body { margin: 0; font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--gpp-ink); background: var(--gpp-bg); line-height: 1.45; overflow-x: hidden; }
.gpp-body h1, .gpp-body h2, .gpp-body h3, .gpp-title { font-family: Poppins, "Nunito Sans", system-ui, sans-serif; letter-spacing: -.01em; }
:where(.gpp-body) button { font: inherit; color: inherit; }
.gpp-body :focus-visible { outline: 4px solid #facc15; outline-offset: 3px; border-radius: 10px; }
.gpp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -------- header */
.gpp-top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gpp-line); }
[data-theme="dark"] .gpp-top { background: rgba(19,16,51,.9); }
.gpp-top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.gpp-logo img { height: 34px; display: block; }
.gpp-logo .logo-dark { display: none; } [data-theme="dark"] .gpp-logo .logo-light { display: none; } [data-theme="dark"] .gpp-logo .logo-dark { display: block; }
.gpp-nav { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.gpp-nav a, .gpp-nav button { text-decoration: none; color: var(--gpp-ink); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; }
.gpp-nav a:hover, .gpp-nav button:hover { background: rgba(91,61,245,.08); }

/* -------- catalogue */
.gpp-main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 60px; }
.gpp-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 26px 22px; color: #fff; background: linear-gradient(120deg, #5b3df5 0%, #a855f7 45%, #ff7a59 100%); box-shadow: var(--gpp-shadow); }
.gpp-hero h1 { margin: 6px 0 6px; font-size: clamp(26px, 5vw, 40px); line-height: 1.1; }
.gpp-hero p { margin: 0; font-size: 17px; max-width: 620px; opacity: .95; }
.gpp-kicker { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .12em; background: rgba(255,255,255,.22); padding: 5px 12px; border-radius: 999px; }
.gpp-hero-art { position: absolute; right: -10px; bottom: -14px; width: 190px; opacity: .25; pointer-events: none; }
.gpp-hero-art svg { width: 64px; height: 64px; margin: 2px; }
.gpp-access { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gpp-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.2); color: #fff; border: 2px solid rgba(255,255,255,.45); padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; }
a.gpp-pill:hover, button.gpp-pill:hover { background: rgba(255,255,255,.32); }
.gpp-pill.is-solid { background: #fff; color: #4c1d95; border-color: #fff; }
.gpp-children { display: flex; gap: 8px; flex-wrap: wrap; }
.gpp-child { cursor: pointer; }
.gpp-child[aria-pressed="true"] { background: #fff; color: #4c1d95; border-color: #fff; }

.gpp-controls { margin: 22px 0 10px; display: grid; gap: 14px; }
.gpp-row-label { font-weight: 800; font-size: 14px; color: var(--gpp-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.gpp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.gpp-chip { flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--gpp-line); background: var(--gpp-card); font-weight: 800; font-size: 16px; cursor: pointer; transition: transform .12s, background .12s; }
.gpp-chip:hover { transform: translateY(-1px); }
.gpp-chip[aria-pressed="true"] { background: var(--gpp-brand); border-color: var(--gpp-brand); color: #fff; box-shadow: 0 6px 14px rgba(91,61,245,.3); }
.gpp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
@media (min-width: 640px) { .gpp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 980px) { .gpp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gpp-card { position: relative; display: flex; flex-direction: column; text-align: left; border: 0; border-radius: var(--gpp-radius); padding: 16px 14px 14px; min-height: 196px; color: #fff; cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, var(--g1), var(--g2)); box-shadow: 0 10px 22px color-mix(in srgb, var(--g1) 35%, transparent); transition: transform .15s, box-shadow .15s; }
.gpp-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 16px 28px color-mix(in srgb, var(--g1) 45%, transparent); }
.gpp-card::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -50px; border-radius: 50%; background: rgba(255,255,255,.14); }
.gpp-card .gpp-badge { width: 64px; height: 64px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.gpp-card h3 { margin: 10px 0 4px; font-size: 19px; line-height: 1.15; }
.gpp-card p { margin: 0 0 10px; font-size: 14px; opacity: .95; }
.gpp-card .gpp-cat { position: absolute; top: 14px; right: 12px; z-index: 1; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.25); padding: 4px 9px; border-radius: 999px; }
.gpp-card .gpp-go { margin-top: auto; align-self: flex-start; background: #fff; color: var(--g1); font-weight: 900; padding: 7px 14px; border-radius: 999px; font-size: 14px; }
.gpp-card .gpp-best { position: absolute; bottom: 14px; right: 12px; font-weight: 800; font-size: 13px; }
.gpp-note { color: var(--gpp-muted); font-size: 15px; margin-top: 18px; }
.gpp-panel { background: var(--gpp-card); border-radius: var(--gpp-radius); box-shadow: var(--gpp-shadow); padding: 22px; border: 1px solid var(--gpp-line); }
.gpp-panel h2 { margin-top: 0; }
.gpp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--gpp-tap); padding: 10px 22px; border-radius: 999px; border: 0; font-weight: 900; font-size: 17px; cursor: pointer; text-decoration: none; background: var(--gpp-brand); color: #fff; box-shadow: 0 8px 18px rgba(91,61,245,.28); transition: transform .12s; }
.gpp-btn:hover { transform: translateY(-2px); } .gpp-btn:active { transform: translateY(1px); }
.gpp-btn.is-ghost { background: var(--gpp-card); color: var(--gpp-brand); border: 2px solid var(--gpp-brand); box-shadow: none; }
.gpp-btn.is-warm { background: linear-gradient(120deg, #ff7a59, #f43f5e); }
.gpp-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.gpp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* -------- game colour themes */
.gpp-c-violet { --g1: #7c3aed; --g2: #c026d3; } .gpp-c-orange { --g1: #f97316; --g2: #f43f5e; } .gpp-c-teal { --g1: #0d9488; --g2: #22c55e; }
.gpp-c-pink { --g1: #db2777; --g2: #f472b6; } .gpp-c-blue { --g1: #2563eb; --g2: #06b6d4; } .gpp-c-lime { --g1: #65a30d; --g2: #eab308; }
.gpp-c-amber { --g1: #d97706; --g2: #f59e0b; } .gpp-c-red { --g1: #dc2626; --g2: #fb7185; } .gpp-c-indigo { --g1: #4f46e5; --g2: #8b5cf6; }
.gpp-c-slate { --g1: #334155; --g2: #6366f1; } .gpp-c-green { --g1: #16a34a; --g2: #84cc16; } .gpp-c-cyan { --g1: #0891b2; --g2: #6366f1; }
.gpp-c-rose { --g1: #e11d48; --g2: #f97316; } .gpp-c-purple { --g1: #7e22ce; --g2: #ec4899; } .gpp-c-emerald { --g1: #047857; --g2: #0ea5e9; }
.gpp-c-sky { --g1: #0284c7; --g2: #8b5cf6; } .gpp-c-fuchsia { --g1: #c026d3; --g2: #f97316; }

/* -------- game screen */
.gpp-game { max-width: 820px; margin: 0 auto; }
.gpp-gamebar { display: flex; align-items: center; gap: 10px; color: #fff; padding: 14px 16px; border-radius: 22px 22px 0 0; background: linear-gradient(120deg, var(--g1), var(--g2)); }
.gpp-gamebar .gpp-badge { width: 44px; height: 44px; flex: 0 0 auto; }
.gpp-gamebar h2 { margin: 0; font-size: clamp(19px, 4vw, 24px); line-height: 1.1; }
.gpp-gamebar small { display: block; font-weight: 700; opacity: .9; font-size: 14px; }
.gpp-back { border: 0; background: rgba(255,255,255,.22); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; flex: 0 0 auto; }
.gpp-score { margin-left: auto; text-align: right; font-weight: 900; font-size: 22px; line-height: 1; font-family: Poppins, sans-serif; }
.gpp-score small { font-size: 12px; font-weight: 700; opacity: .9; }
.gpp-stage { background: var(--gpp-card); border-radius: 0 0 22px 22px; box-shadow: var(--gpp-shadow); padding: 16px 14px 18px; border: 1px solid var(--gpp-line); border-top: 0; }
.gpp-progress { display: flex; gap: 6px; justify-content: center; margin: 2px 0 12px; flex-wrap: wrap; }
.gpp-progress i { width: 26px; height: 8px; border-radius: 999px; background: var(--gpp-line); }
.gpp-progress i.is-done { background: var(--gpp-good); } .gpp-progress i.is-now { background: var(--g1); }
.gpp-prompt { text-align: center; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(19px, 4.4vw, 25px); margin: 4px 0 14px; }
.gpp-toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.gpp-hintbtn { background: linear-gradient(120deg, #facc15, #f59e0b); color: #422006; box-shadow: 0 8px 16px rgba(245,158,11,.3); }
.gpp-hint { margin: 12px auto 0; max-width: 560px; background: #fffbeb; color: #78350f; border: 2px dashed #fbbf24; border-radius: 16px; padding: 10px 14px; font-weight: 700; display: flex; gap: 10px; align-items: flex-start; animation: gpp-pop .25s ease-out; }
[data-theme="dark"] .gpp-hint { background: #3b2f0b; color: #fde68a; }
.gpp-hint b { flex: 0 0 auto; background: #f59e0b; color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.gpp-feedback { min-height: 30px; text-align: center; font-weight: 900; font-size: 19px; margin-top: 12px; }
.gpp-feedback.is-good { color: var(--gpp-good); } .gpp-feedback.is-bad { color: var(--gpp-bad); }
.gpp-explain { max-width: 600px; margin: 10px auto 0; background: #ecfdf5; color: #065f46; border-radius: 16px; padding: 10px 14px; font-weight: 700; text-align: center; animation: gpp-pop .25s ease-out; }
[data-theme="dark"] .gpp-explain { background: #063d2c; color: #a7f3d0; }

/* option buttons */
.gpp-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin: 0 auto; }
.gpp-options.is-items { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); max-width: 640px; }
.gpp-opt { position: relative; min-height: 64px; border-radius: 18px; border: 3px solid var(--gpp-line); background: var(--gpp-card); font-weight: 900; font-size: clamp(20px, 5vw, 26px); cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, border-color .1s, background .1s; box-shadow: 0 4px 0 var(--gpp-line); }
.gpp-opt:hover { border-color: var(--g1); transform: translateY(-2px); }
.gpp-opt svg { width: 64px; height: 64px; }
.gpp-opt.is-pic { min-height: 104px; } .gpp-opt.is-pic svg { width: 78px; height: 78px; }
.gpp-opt.is-text { font-size: clamp(17px, 4.3vw, 22px); }
.gpp-opt.is-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; }
.gpp-opt.is-right { border-color: var(--gpp-good); background: #dcfce7; box-shadow: 0 4px 0 #86efac; animation: gpp-bounce .45s; }
[data-theme="dark"] .gpp-opt.is-right { background: #064e3b; }
.gpp-opt.is-wrong { border-color: var(--gpp-bad); background: #ffe4e6; opacity: .7; animation: gpp-shake .35s; }
[data-theme="dark"] .gpp-opt.is-wrong { background: #4c0519; }
.gpp-opt.is-out { opacity: .25; text-decoration: line-through; pointer-events: none; }
.gpp-opt[disabled] { cursor: default; }

/* tiles used by number games */
.gpp-eq { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 6px auto 16px; }
.gpp-tile { min-width: 56px; height: 60px; padding: 0 10px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(22px, 5.5vw, 30px); background: linear-gradient(160deg, #fff, #eef2ff); border: 3px solid color-mix(in srgb, var(--g1) 40%, white); color: var(--gpp-ink); box-shadow: 0 5px 0 color-mix(in srgb, var(--g1) 30%, white); }
[data-theme="dark"] .gpp-tile { background: #2a2566; color: #fff; }
.gpp-tile.is-op { background: transparent; border: 0; box-shadow: none; min-width: 26px; padding: 0; color: var(--g1); }
.gpp-tile.is-blank { border-style: dashed; color: var(--g1); background: #fff7ed; animation: gpp-pulse 1.6s infinite; }
.gpp-tile.is-sup { font-size: 18px; min-width: 0; padding: 0 2px; align-self: flex-start; border: 0; background: none; box-shadow: none; height: 30px; }
.gpp-train { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; margin-bottom: 16px; }
.gpp-train .gpp-tile { border-radius: 14px 14px 18px 18px; }
.gpp-train .gpp-link { width: 16px; height: 6px; border-radius: 4px; background: var(--g2); }

/* pattern beads and figure strips */
.gpp-beads { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 8px; margin: 0 auto 16px; background: repeating-linear-gradient(90deg, transparent 0 20px, color-mix(in srgb, var(--g1) 10%, transparent) 20px 22px); border-radius: 20px; max-width: 680px; }
.gpp-bead { width: 64px; height: 64px; border-radius: 18px; background: var(--gpp-card); border: 3px solid var(--gpp-line); display: flex; align-items: center; justify-content: center; font-family: Poppins, sans-serif; font-weight: 900; font-size: 22px; }
.gpp-bead svg { width: 54px; height: 54px; }
.gpp-bead.is-blank { border: 3px dashed var(--g1); background: color-mix(in srgb, var(--g1) 8%, var(--gpp-card)); color: var(--g1); font-size: 30px; animation: gpp-pulse 1.6s infinite; }
.gpp-matrix { display: grid; grid-template-columns: repeat(3, 84px); gap: 8px; justify-content: center; margin: 0 auto 16px; padding: 10px; border-radius: 18px; background: color-mix(in srgb, var(--g1) 8%, var(--gpp-card)); width: max-content; }
.gpp-matrix .gpp-bead { width: 84px; height: 84px; } .gpp-matrix .gpp-bead svg { width: 70px; height: 70px; }

/* items to pick (odd one out) */
.gpp-item { min-height: 120px; }
.gpp-item svg { width: 84px !important; height: 84px !important; }

/* coding */
.gpp-code { display: grid; gap: 10px; justify-items: center; margin-bottom: 14px; }
.gpp-code-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 900; font-size: clamp(20px, 5vw, 28px); background: #0f172a; color: #a5f3fc; padding: 10px 16px; border-radius: 16px; letter-spacing: .14em; box-shadow: inset 0 0 0 3px #334155; }
.gpp-code-row .gpp-arrow { color: #facc15; letter-spacing: 0; }
.gpp-code-row.is-q { background: #312e81; color: #fff; }
.gpp-strip { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; max-width: 520px; width: 100%; }
.gpp-strip span { text-align: center; background: color-mix(in srgb, var(--g2) 15%, var(--gpp-card)); border-radius: 6px; font-weight: 800; font-size: 14px; padding: 3px 0; }
.gpp-strip span small { display: block; font-size: 10px; color: var(--gpp-muted); }

/* clue cards (number puzzle, logic, word puzzle) */
.gpp-clues { display: grid; gap: 8px; max-width: 560px; margin: 0 auto 14px; padding: 0; list-style: none; }
.gpp-clues li { background: color-mix(in srgb, var(--g2) 12%, var(--gpp-card)); border-left: 6px solid var(--g1); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 17px; }
.gpp-clue-card { max-width: 560px; margin: 0 auto 14px; background: linear-gradient(160deg, #fdf4ff, #ede9fe); border: 3px solid color-mix(in srgb, var(--g1) 35%, white); border-radius: 20px; padding: 14px 16px; text-align: center; font-weight: 800; font-size: clamp(18px, 4.4vw, 22px); color: #3b0764; }
[data-theme="dark"] .gpp-clue-card { background: #2e1065; color: #f5d0fe; }
.gpp-display { margin: 0 auto 12px; max-width: 280px; min-height: 64px; border-radius: 18px; background: #0f172a; color: #fde68a; font-family: Poppins, sans-serif; font-size: 36px; font-weight: 900; display: flex; align-items: center; justify-content: center; letter-spacing: .06em; }
.gpp-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
.gpp-key { min-height: 56px; border-radius: 16px; border: 2px solid var(--gpp-line); background: var(--gpp-card); font-weight: 900; font-size: 24px; cursor: pointer; box-shadow: 0 4px 0 var(--gpp-line); }
.gpp-key:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gpp-line); }
.gpp-key.is-go { background: var(--gpp-good); color: #fff; border-color: var(--gpp-good); box-shadow: 0 4px 0 #15803d; }

/* operator puzzle */
.gpp-opslot { width: 58px; height: 58px; border-radius: 50%; border: 3px dashed var(--g1); background: color-mix(in srgb, var(--g1) 8%, var(--gpp-card)); font-family: Poppins, sans-serif; font-weight: 900; font-size: 28px; color: var(--g1); cursor: pointer; }
.gpp-opslot.is-set { border-style: solid; background: var(--g1); color: #fff; }
.gpp-opslot.is-locked { background: #f59e0b; border-color: #f59e0b; color: #fff; cursor: default; }
.gpp-oppick { display: flex; gap: 10px; justify-content: center; margin: 4px 0 8px; flex-wrap: wrap; }
.gpp-oppick .gpp-key { width: 64px; }
.gpp-oppick .gpp-key.is-out { opacity: .25; text-decoration: line-through; pointer-events: none; }

/* letter games */
.gpp-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px auto 16px; }
.gpp-slot { width: clamp(34px, 9vw, 52px); height: clamp(44px, 11vw, 60px); border-radius: 12px; border: 3px solid var(--gpp-line); background: var(--gpp-card); display: inline-flex; align-items: center; justify-content: center; font-family: Poppins, sans-serif; font-weight: 900; font-size: clamp(20px, 5vw, 28px); cursor: pointer; text-transform: uppercase; }
.gpp-slot.is-blank { border-style: dashed; border-color: var(--g1); background: color-mix(in srgb, var(--g1) 6%, var(--gpp-card)); }
.gpp-slot.is-active { border-color: var(--gpp-gold); box-shadow: 0 0 0 4px rgba(250,204,21,.45); }
.gpp-slot.is-fixed { background: #f1f5f9; cursor: default; } [data-theme="dark"] .gpp-slot.is-fixed { background: #2a2566; }
.gpp-slot.is-locked { background: #fef3c7; border-color: #f59e0b; }
.gpp-slot.is-filled { border-color: var(--g1); }
.gpp-letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gpp-letter { width: clamp(44px, 12vw, 58px); height: clamp(48px, 13vw, 62px); border-radius: 14px; border: 0; background: linear-gradient(160deg, var(--g1), var(--g2)); color: #fff; font-family: Poppins, sans-serif; font-weight: 900; font-size: clamp(22px, 6vw, 30px); cursor: pointer; box-shadow: 0 5px 0 color-mix(in srgb, var(--g1) 60%, black); }
.gpp-letter:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--g1) 60%, black); }
.gpp-letter.is-used { visibility: hidden; }
.gpp-letter.is-out { opacity: .2; pointer-events: none; }
.gpp-kbd { display: grid; gap: 6px; max-width: 560px; margin: 8px auto 0; }
.gpp-kbd-row { display: flex; gap: 5px; justify-content: center; }
.gpp-kbd-row .gpp-key { flex: 1 1 0; min-width: 0; max-width: 50px; min-height: 50px; font-size: 19px; padding: 0; }
.gpp-kbd-row .gpp-key.is-wide { max-width: 86px; flex: 1.6 1 0; font-size: 15px; }

/* sudoku */
.gpp-sudoku { --n: 9; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; border: 4px solid var(--g1); border-radius: 14px; overflow: hidden; background: var(--g1); gap: 1px; touch-action: manipulation; }
.gpp-cell { border: 0; background: var(--gpp-card); display: flex; align-items: center; justify-content: center; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(16px, 5.4vw, 30px); cursor: pointer; padding: 0; min-width: 0; color: #4338ca; }
.gpp-sudoku.n4 .gpp-cell { font-size: clamp(26px, 9vw, 44px); } .gpp-sudoku.n6 .gpp-cell { font-size: clamp(22px, 7vw, 36px); }
.gpp-cell.is-given { color: var(--gpp-ink); background: color-mix(in srgb, var(--g1) 9%, var(--gpp-card)); cursor: default; }
.gpp-cell.is-sel { background: #fef08a; } [data-theme="dark"] .gpp-cell.is-sel { background: #713f12; }
.gpp-cell.is-peer { background: color-mix(in srgb, var(--g2) 9%, var(--gpp-card)); }
.gpp-cell.is-clash { color: var(--gpp-bad); background: #ffe4e6; }
.gpp-cell.is-glow { box-shadow: inset 0 0 0 3px #f59e0b; }
.gpp-cell.bR { margin-right: 3px; } .gpp-cell.bB { margin-bottom: 3px; }
.gpp-numpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 520px; margin: 14px auto 0; }
.gpp-numpad.n4 { grid-template-columns: repeat(5, 1fr); max-width: 360px; } .gpp-numpad.n6 { grid-template-columns: repeat(4, 1fr); max-width: 400px; }

/* word search */
.gpp-ws { --n: 10; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, 560px); aspect-ratio: 1; margin: 0 auto; background: linear-gradient(160deg, #f0fdf4, #ecfeff); border-radius: 18px; padding: 6px; gap: 2px; touch-action: none; user-select: none; -webkit-user-select: none; border: 3px solid color-mix(in srgb, var(--g1) 45%, white); }
[data-theme="dark"] .gpp-ws { background: #0f2a22; }
.gpp-wcell { border: 0; border-radius: 10px; background: transparent; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(13px, 4.1vw, 24px); cursor: pointer; padding: 0; min-width: 0; color: #14532d; }
[data-theme="dark"] .gpp-wcell { color: #bbf7d0; }
.gpp-wcell.is-start { background: #fde68a; } .gpp-wcell.is-drag { background: #fef08a; }
.gpp-wcell.is-found { color: #fff; }
.gpp-wcell.is-glow { box-shadow: inset 0 0 0 3px #f59e0b; }
.gpp-wordlist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px auto 0; max-width: 600px; padding: 0; list-style: none; }
.gpp-wordlist li { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--g1) 10%, var(--gpp-card)); font-weight: 900; letter-spacing: .05em; }
.gpp-wordlist li.is-found { text-decoration: line-through; opacity: .55; }
.gpp-wordlist li.is-glow { background: #fde68a; color: #78350f; }

/* maze */
.gpp-maze-wrap { width: min(100%, 560px); margin: 0 auto; touch-action: none; }
.gpp-maze-wrap svg { width: 100%; height: auto; display: block; border-radius: 18px; background: linear-gradient(160deg, #ecfdf5, #e0f2fe); }
[data-theme="dark"] .gpp-maze-wrap svg { background: #062a2a; }
.gpp-dpad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 58px); gap: 6px; justify-content: center; margin: 14px auto 0; }
.gpp-dpad .gpp-key { font-size: 26px; }
.gpp-dpad .up { grid-column: 2; } .gpp-dpad .left { grid-column: 1; grid-row: 2; } .gpp-dpad .down { grid-column: 2; grid-row: 2; } .gpp-dpad .right { grid-column: 3; grid-row: 2; }

/* matching cards */
.gpp-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; }
@media (min-width: 640px) { .gpp-cards.is-many { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 760px; } }
.gpp-mcard { aspect-ratio: 3 / 4; border: 0; padding: 0; background: transparent; perspective: 600px; cursor: pointer; min-width: 0; }
.gpp-mcard-in { position: relative; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.gpp-mcard.is-open .gpp-mcard-in, .gpp-mcard.is-matched .gpp-mcard-in { transform: rotateY(180deg); }
.gpp-mface { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; text-align: center; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(13px, 3.6vw, 20px); padding: 4px; overflow-wrap: anywhere; }
.gpp-mface.back { background: linear-gradient(150deg, var(--g1), var(--g2)); color: rgba(255,255,255,.85); font-size: 28px; box-shadow: 0 5px 0 color-mix(in srgb, var(--g1) 60%, black); }
.gpp-mface.front { background: var(--gpp-card); border: 3px solid var(--g1); transform: rotateY(180deg); color: var(--gpp-ink); }
.gpp-mface.front svg { width: 80%; height: 80%; }
.gpp-mcard.is-matched .gpp-mface.front { border-color: var(--gpp-good); background: #dcfce7; } [data-theme="dark"] .gpp-mcard.is-matched .gpp-mface.front { background: #064e3b; }
.gpp-mcard.is-glow .gpp-mface { box-shadow: 0 0 0 4px #f59e0b; }

/* logic grid */
.gpp-logic { width: 100%; border-collapse: separate; border-spacing: 6px; max-width: 680px; margin: 0 auto; }
.gpp-logic th { font-family: Poppins, sans-serif; font-size: 16px; text-align: left; padding: 4px; }
.gpp-logic td { padding: 0; }
.gpp-lchoices { display: flex; flex-wrap: wrap; gap: 6px; }
.gpp-lchip { min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--gpp-line); background: var(--gpp-card); font-weight: 800; font-size: 15px; cursor: pointer; }
.gpp-lchip[aria-pressed="true"] { background: var(--g1); color: #fff; border-color: var(--g1); }
.gpp-lchip.is-taken { opacity: .45; }
.gpp-lrow.is-glow th { color: #b45309; }
.gpp-lcat { font-size: 13px; font-weight: 800; color: var(--gpp-muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0; }

/* shape puzzle */
.gpp-figure { display: flex; justify-content: center; margin: 0 auto 14px; }
.gpp-figure > div { background: color-mix(in srgb, var(--g1) 7%, var(--gpp-card)); border-radius: 22px; padding: 12px; border: 3px solid color-mix(in srgb, var(--g1) 30%, white); }
.gpp-figure svg { width: 150px; height: 150px; display: block; }
.gpp-figure .is-wide svg { width: min(320px, 82vw); height: auto; }
.gpp-bigtext { font-family: Poppins, sans-serif; font-weight: 900; font-size: 30px; padding: 16px 26px !important; }

/* completion */
.gpp-modal { position: fixed; inset: 0; z-index: 50; background: rgba(17,12,58,.55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: gpp-fade .2s; }
.gpp-done { position: relative; overflow: hidden; width: min(100%, 460px); background: var(--gpp-card); border-radius: 28px; padding: 26px 22px 22px; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.35); animation: gpp-pop .35s cubic-bezier(.2,1.4,.4,1); }
.gpp-done h2 { margin: 6px 0 2px; font-size: 30px; }
.gpp-stars { font-size: 46px; letter-spacing: 6px; color: #e5e7eb; }
.gpp-stars .on { color: #facc15; text-shadow: 0 3px 0 #d97706; display: inline-block; animation: gpp-star .5s both; }
.gpp-stars .on:nth-child(2) { animation-delay: .15s; } .gpp-stars .on:nth-child(3) { animation-delay: .3s; }
.gpp-bigscore { font-family: Poppins, sans-serif; font-size: 54px; font-weight: 900; color: var(--g1); line-height: 1; margin: 6px 0; }
.gpp-stats { display: flex; justify-content: center; gap: 18px; color: var(--gpp-muted); font-weight: 800; flex-wrap: wrap; }
.gpp-confetti { position: absolute; inset: 0; pointer-events: none; }
.gpp-confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: gpp-fall 1.8s ease-in forwards; }
.gpp-msg { margin: 16px 0; }
.gpp-loading { text-align: center; padding: 40px 10px; font-weight: 800; color: var(--gpp-muted); }
.gpp-spinner { width: 46px; height: 46px; border-radius: 50%; border: 6px solid var(--gpp-line); border-top-color: var(--gpp-brand); margin: 0 auto 12px; animation: gpp-spin 1s linear infinite; }

@keyframes gpp-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes gpp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gpp-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes gpp-bounce { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes gpp-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--g1) 35%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
@keyframes gpp-star { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@keyframes gpp-fall { to { transform: translateY(560px) rotate(540deg); opacity: .9; } }
@keyframes gpp-spin { to { transform: rotate(360deg); } }
.gpp-shake { animation: gpp-shake .35s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 420px) {
  .gpp-main { padding: 12px 10px 48px; } .gpp-stage { padding: 14px 8px 16px; } .gpp-card { min-height: 178px; padding: 14px 12px 12px; } .gpp-card h3 { font-size: 17px; } .gpp-card p { font-size: 13px; }
  .gpp-matrix { grid-template-columns: repeat(3, 72px); } .gpp-matrix .gpp-bead { width: 72px; height: 72px; } .gpp-matrix .gpp-bead svg { width: 58px; height: 58px; }
  .gpp-bead { width: 54px; height: 54px; } .gpp-bead svg { width: 44px; height: 44px; }
  .gpp-tile { min-width: 46px; height: 52px; }
}

/* page chrome additions */
.gpp-skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #facc15; color: #1e1b4b; padding: 10px 14px; border-radius: 10px; font-weight: 800; }
.gpp-skip:focus { left: 8px; }
.gpp-foot { text-align: center; padding: 18px 12px 28px; color: var(--gpp-muted); font-size: 14px; }
.gpp-foot a { color: inherit; }
.gpp-art { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.gpp-art svg { width: 100%; height: 100%; max-width: 100%; display: block; }
.gpp-ws, .gpp-maze-wrap, .gpp-cards, .gpp-sudoku { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (max-width: 420px) { .gpp-kbd-row { gap: 3px; } .gpp-kbd { gap: 5px; } .gpp-kbd-row .gpp-key { min-height: 48px; } }
.gpp-mcard-in { display: block; }
.gpp-mface { display: flex; }
.gpp-logo { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.gpp-logo img { width: auto; max-width: 140px; }
.gpp-themebtn { min-width: 44px; font-size: 18px !important; }
@media (max-width: 420px) {
  .gpp-top-in { padding: 8px 10px; gap: 6px; }
  .gpp-nav { flex-wrap: nowrap; gap: 0; }
  .gpp-nav a, .gpp-nav button { font-size: 14px; padding: 8px 8px; }
  .gpp-logo img { max-width: 104px; height: 30px; }
}
.gpp-hint[hidden] { display: none !important; }
.gpp-nav a, .gpp-nav button { white-space: nowrap; }
@media (max-width: 420px) { .gpp-nav .gpp-nav-wide { display: none; } }

/* Rev2 hint states: a crossed-out logic choice and the dotted candidate cards of a matching hint */
.gpp-lchip.is-out { opacity: .3; text-decoration: line-through; pointer-events: none; }
.gpp-mcard.is-cand .gpp-mface.back { outline: 3px dashed #f59e0b; outline-offset: -5px; }

/* Rev2 mobile: on very narrow phones the 11x11 / 12x12 word search (Classes 7-10) runs edge to edge with thinner
   padding and gaps so every letter cell stays at least 24 px (WCAG 2.2 target size 2.5.8). */
@media (max-width: 380px) {
  .gpp-ws { width: calc(100vw - 8px); max-width: none; margin-left: calc(50% - 50vw + 4px); margin-right: 0; padding: 2px; gap: 1px; border-width: 2px; border-radius: 12px; }
  .gpp-wcell { border-radius: 6px; }
}
/* Rev2 mobile: the page header (logo, All games, Account, theme switch) fits completely at 320 px and every header
   control is at least 44 px tall. The logo keeps its aspect ratio instead of being clipped. */
.gpp-nav a, .gpp-nav button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.gpp-logo { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 420px) { .gpp-logo img { height: auto; width: 104px; max-width: 104px; } }
@media (max-width: 360px) {
  .gpp-top-in { padding: 6px 8px; gap: 4px; }
  .gpp-logo img { width: 86px; max-width: 86px; }
  .gpp-nav a, .gpp-nav button { font-size: 13px; padding: 6px 7px; }
  .gpp-themebtn { min-width: 44px; }
}
