:root{font-family:'DM Sans',sans-serif;color:#202326;background:#f4f5f6;font-synthesis:none;--bg:#f4f5f6;--panel:#fff;--ink:#202326;--muted:#72777c;--line:#e4e5e6;--red:#e52d36;--red-soft:#fff0f0;--chip:#f0f1f2;--green:#50bf69;--shadow:0 16px 50px #292c3012;--radius:22px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);min-height:100vh}body.dark{--bg:#17191b;--panel:#222528;--ink:#f5f6f7;--muted:#a5aaaf;--line:#34383b;--red-soft:#382326;--chip:#2d3033;--shadow:0 16px 50px #0005}button,input{font:inherit}button{cursor:pointer;color:inherit}a{color:inherit}.shell{max-width:1160px;margin:auto;padding:0 30px}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font:700 23px 'Space Grotesk';letter-spacing:-.8px}.brand img{width:40px;height:40px}.top-actions{display:flex;align-items:center;gap:10px}.icon-btn,.pill-btn{height:42px;border:1px solid var(--line);border-radius:999px;background:var(--panel);padding:0 14px;display:grid;place-items:center}.icon-btn{width:42px;padding:0;font-size:18px}.pill-btn{display:flex;gap:8px;align-items:center;font-weight:600}.lang{font-size:13px}.hero{padding:48px 0 34px;display:flex;align-items:end;justify-content:space-between;gap:20px}.eyebrow{color:var(--red);font-size:12px;text-transform:uppercase;letter-spacing:1.5px;font-weight:800}.hero h1{font:600 clamp(36px,5vw,56px)/1.03 'Space Grotesk';letter-spacing:-2.5px;margin:9px 0 12px}.hero p{margin:0;color:var(--muted);font-size:16px}.welcome-actions{display:flex;gap:10px}.primary,.secondary{border:0;border-radius:14px;padding:13px 18px;font-weight:700;font-size:14px}.primary{background:var(--red);color:#fff;box-shadow:0 8px 18px #e52d3626}.secondary{background:var(--panel);border:1px solid var(--line)}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:20px 0 14px}.section-heading h2{margin:0;font:600 19px 'Space Grotesk'}.section-heading span{font-size:13px;color:var(--muted)}.game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.game-card{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:16px;text-align:left;transition:.2s;box-shadow:0 2px 4px #25282b05}.game-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#e52d3655}.game-art{height:155px;border-radius:14px;display:grid;place-items:center;position:relative;overflow:hidden;margin-bottom:16px}.game-art.zip{background:#f1f2f3}.game-art.hang{background:#fae7e7}.game-art.memory{background:#e8f2eb}.game-art.soon{background:#ebebf5}.art-icon{width:108px;height:108px;display:grid;place-items:center;font:700 46px 'Space Grotesk';color:var(--red);background:var(--panel);border-radius:28px;box-shadow:0 14px 30px #00000012;transform:rotate(-4deg)}.zip-icon{display:grid;grid-template-columns:repeat(3,19px);gap:5px}.zip-icon i{width:19px;height:19px;border:2px solid #babdc0;border-radius:6px}.zip-icon i:nth-child(1),.zip-icon i:nth-child(5),.zip-icon i:nth-child(9){background:var(--red);border-color:var(--red)}.hang-icon{font-size:57px}.memory-icon{display:grid;grid-template-columns:repeat(2,25px);gap:5px}.memory-icon i{height:28px;border-radius:6px;background:#54a96d;display:grid;place-items:center;color:white;font-style:normal;font-size:13px}.memory-icon i:nth-child(2){background:#e52d36}.game-card h3{font:600 17px 'Space Grotesk';margin:0 0 5px}.game-card p{font-size:13px;color:var(--muted);margin:0;line-height:1.45}.card-meta{margin-top:15px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.play-link{color:var(--red);font-weight:800;font-size:13px}.invite-banner{margin:35px 0 38px;padding:22px 25px;border-radius:20px;background:var(--ink);color:var(--bg);display:flex;align-items:center;justify-content:space-between;gap:18px}.invite-banner h3{font:600 18px 'Space Grotesk';margin:0 0 4px}.invite-banner p{font-size:13px;opacity:.68;margin:0}.invite-banner .primary{background:#fff;color:#202326;box-shadow:none}.footer{padding:22px 0 30px;border-top:1px solid var(--line);display:flex;justify-content:center;align-items:center;gap:9px;color:var(--muted);font-size:13px}.footer img{height:24px;width:98px;color:var(--ink)}
/* modal and play */
.overlay{position:fixed;inset:0;background:#11182099;z-index:10;display:grid;place-items:center;padding:16px;overflow:auto}.modal{width:min(580px,100%);background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:24px;box-shadow:0 28px 100px #0004;max-height:94vh;overflow:auto}.modal.wide{width:min(780px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-head h2{font:600 23px 'Space Grotesk';margin:0}.close{border:0;background:var(--chip);width:36px;height:36px;border-radius:50%;font-size:19px}.play-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.play-head small{color:var(--muted)}.game-title{font:600 24px 'Space Grotesk';margin:0}.zip-board{width:min(100%,480px);aspect-ratio:1;margin:auto;display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(6,1fr);border:2px solid #a9aba9;border-radius:26px;overflow:hidden;touch-action:manipulation}.zip-cell{position:relative;display:grid;place-items:center;border-right:1.5px solid #a9aba9;border-bottom:1.5px solid #a9aba9;background:var(--bg);padding:0}.zip-cell:nth-child(6n){border-right:0}.zip-cell:nth-last-child(-n+6){border-bottom:0}.zip-cell.path{background:#c9f2d1}.zip-cell.current{background:#93e0a2}.zip-dot{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#080909;color:white;font-weight:800;font-size:21px;position:relative;z-index:2}.zip-dot.start{outline:6px solid #60cf49}.zip-cell:after{content:'';position:absolute;z-index:3;background:#050505;border-radius:8px}.zip-cell.wall-r:after{width:8px;height:74%;right:-5px}.zip-cell.wall-d:after{height:8px;width:74%;bottom:-5px}.zip-controls{display:flex;gap:10px;margin:16px auto;max-width:480px}.zip-controls button{flex:1;border-radius:999px;padding:11px;font-weight:700;border:1px solid var(--line);background:var(--panel)}.zip-hint{margin:14px auto 0;padding:12px 15px;background:var(--chip);border-radius:14px;max-width:480px;color:var(--muted);font-size:13px}.zip-status{text-align:center;height:21px;color:var(--red);font-weight:700;font-size:13px;margin:5px}
.keyboard{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin:20px auto;max-width:430px}.key{width:38px;height:42px;border:1px solid var(--line);background:var(--panel);border-radius:10px;font-weight:700}.key:disabled{opacity:.35}.hang-stage{text-align:center;padding:4px 0 0}.hang-emoji{font-size:100px;height:126px;display:grid;place-items:center}.word{font:700 30px 'Space Grotesk';letter-spacing:9px;margin:12px 0}.game-info{text-align:center;color:var(--muted);font-size:13px}.memory-board{display:grid;grid-template-columns:repeat(4,minmax(62px,1fr));gap:10px;width:min(100%,430px);margin:auto}.memory-card{aspect-ratio:1;border:0;border-radius:17px;background:var(--red);color:white;font-size:31px;font-weight:700;box-shadow:0 4px 0 #b41e29}.memory-card.open,.memory-card.matched{background:var(--chip);color:var(--ink);box-shadow:none}.memory-card.matched{outline:2px solid #54bd6e}.stats-line{text-align:center;color:var(--muted);font-size:14px;margin:10px 0 18px}.form{display:grid;gap:13px}.form label{display:grid;gap:6px;font-size:13px;font-weight:700}.form input{background:var(--bg);border:1px solid var(--line);border-radius:11px;padding:12px 13px;color:var(--ink);outline:none}.form input:focus{border-color:var(--red)}.subtle{font-size:12px;color:var(--muted);line-height:1.5}.admin-list{display:grid;gap:9px;margin-top:14px}.invite-row{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;border-radius:12px;background:var(--chip);font-size:13px}.tag{border-radius:99px;padding:5px 8px;background:var(--panel);font-size:11px;color:var(--muted)}.toast{position:fixed;z-index:30;bottom:25px;left:50%;transform:translateX(-50%);padding:12px 17px;background:var(--ink);color:var(--bg);border-radius:99px;font-size:13px;box-shadow:var(--shadow)}.logo-lock{width:44px;height:44px;border-radius:14px;vertical-align:middle}.screen-note{font-size:12px;color:var(--muted);text-align:center;margin-top:13px}
@media(max-width:900px){.game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{align-items:start;flex-direction:column}.welcome-actions{width:100%}.welcome-actions button{flex:1}}
@media(max-width:540px){.shell{padding:0 17px}.topbar{height:64px}.brand{font-size:20px}.brand img{width:35px;height:35px}.top-actions{gap:7px}.lang{padding:0 10px}.hero{padding:34px 0 22px}.hero h1{font-size:41px}.hero p{font-size:14px;max-width:300px}.game-grid{gap:10px}.game-card{padding:10px;border-radius:17px}.game-art{height:118px;margin-bottom:12px}.art-icon{width:80px;height:80px;border-radius:22px}.zip-icon{transform:scale(.8)}.game-card h3{font-size:15px}.game-card p{font-size:12px}.card-meta{margin-top:12px}.invite-banner{padding:18px;align-items:flex-start;flex-direction:column;margin:25px 0 28px}.invite-banner .primary{width:100%}.footer{font-size:11px}.zip-board{border-radius:19px}.zip-dot{width:32px;height:32px;font-size:18px}.zip-cell.wall-r:after{width:7px}.zip-cell.wall-d:after{height:7px}.modal{padding:18px}.game-title{font-size:20px}}
body.dark .footer img{filter:brightness(0) invert(1)}
.signed-in{margin:-10px 0 12px;padding:11px 14px;background:var(--chip);border:1px solid var(--line);border-radius:13px;color:var(--muted);font-size:13px}.signed-in strong{color:var(--ink)}.zip-board{touch-action:none;user-select:none;-webkit-user-select:none}.zip-cell{touch-action:none;user-select:none;-webkit-user-select:none}.zip-cell.path{background:#c9f2d1}.zip-cell.current{background:#93e0a2}.scoring-note{max-width:480px;margin:15px auto 0;text-align:center;color:var(--muted);font-size:12px;line-height:1.5}.leaderboard{max-width:480px;margin:10px auto 0;border:1px solid var(--line);background:var(--bg);border-radius:15px;overflow:hidden}.leaderboard-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:var(--chip);font-size:13px;gap:10px}.leaderboard-head span{color:var(--red);font-weight:700;text-align:right}.record-line{padding:9px 14px;background:var(--red-soft);color:var(--red);font-weight:700;font-size:12px}.leaderboard-body{padding:5px 12px}.leader-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid var(--line);font-size:12px}.leader-row:last-child{border-bottom:0}.leader-row>span:last-child{color:var(--muted);white-space:nowrap}.leader-row b{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:50%;background:var(--chip);margin-right:5px}.leader-row.mine{color:var(--red);font-weight:700}.leader-row em{font-style:normal;font-size:10px}
.game-art.word{background:#f9eee0}.game-art.lights{background:#e8edfa}.game-art.math{background:#e8f2eb}.word-icon,.math-icon{font-size:33px}.lights-icon{font-size:48px;color:#f1ba3e}.scramble-word{margin:25px auto 12px;text-align:center;font:700 clamp(25px,7vw,38px) 'Space Grotesk';letter-spacing:.24em;color:var(--red);overflow-wrap:anywhere}.light-board{display:grid;grid-template-columns:repeat(5,minmax(42px,1fr));gap:8px;width:min(100%,380px);margin:18px auto}.light-cell{aspect-ratio:1;border:1px solid var(--line);border-radius:13px;background:var(--chip);color:transparent;font-size:22px;box-shadow:inset 0 1px #ffffff30}.light-cell.on{background:#f4c542;border-color:#e7b52d;color:#fff;box-shadow:0 0 18px #f4c54270}.math-question{text-align:center;font:700 clamp(35px,9vw,54px) 'Space Grotesk';padding:20px 0;color:var(--red)}.math-finished{text-align:center;padding:28px 10px;font:700 25px 'Space Grotesk';color:#45ad5f}
