*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#7cf3df;color:#12384c;font:15px/1.7 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;min-width:320px}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #196bce;outline-offset:5px}[hidden]{display:none!important}body:before{content:'';position:fixed;inset:0;z-index:-1;background:linear-gradient(155deg,transparent 40%,#19e2ce33 40% 58%,transparent 58%),linear-gradient(32deg,transparent 55%,#b4fff655 55% 72%,transparent 72%);pointer-events:none}.wall{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:88px;grid-auto-flow:dense;gap:16px;max-width:1320px;margin:0 auto;padding:24px 22px 10px}.brand-tile{grid-column:span 2;grid-row:span 2;background:#fff;border-radius:20px;box-shadow:0 5px 0 #104b5710;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.brand-tile h1{margin:22px 8px 12px;text-align:center;font-size:29px;font-weight:900;letter-spacing:-2px;line-height:1.2;color:#0d344c}.brand-tile h1 span{display:block;font-size:13px;letter-spacing:3px;margin-top:10px;color:#2e89a9}.brand-tile>div{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #e8f0f3}.brand-tile a{display:grid;place-items:center;font-size:26px;color:#3194c2;height:48px}.brand-tile a:first-child{border-right:1px solid #e8f0f3}.game-tile{position:relative;min-width:0;border-radius:17px;background:#fff;overflow:hidden;box-shadow:0 5px 0 #104b5715;transition:transform .18s,box-shadow .18s;isolation:isolate}.game-tile:hover{transform:translateY(-4px);box-shadow:0 9px 0 #104b5718}.game-tile>a{display:block;height:100%;position:relative}.game-art{display:block;position:relative;overflow:hidden;aspect-ratio:1;background:#42cec1;width:100%;height:100%}.game-art img{position:absolute;top:0;left:0;width:400%;height:200%;max-width:none;object-fit:fill}.game-art.col1 img{left:-100%}.game-art.col2 img{left:-200%}.game-art.col3 img{left:-300%}.game-art.row1 img{top:-100%}.tile-caption{position:absolute;bottom:0;left:0;right:0;color:white;padding:30px 14px 11px;background:linear-gradient(transparent,#0d294cbb);line-height:1.4}.tile-caption strong{display:block;font-size:15px;letter-spacing:.3px}.tile-caption small{display:block;color:#e6f7ff;font-size:11px;margin-top:3px}.favorite{position:absolute;z-index:2;right:9px;top:9px;border:0;background:#ffffffee;width:31px;height:31px;border-radius:50%;font-size:22px;color:#406378;display:grid;place-items:center;line-height:1;box-shadow:0 2px 5px #0001}.favorite[aria-pressed=true]{color:#f3537d;background:#fff}.wall .tile-merge{grid-column:span 4;grid-row:span 4}.wall .tile-snake,.wall .tile-bricks,.wall .tile-reaction,.wall .tile-maze,.wall .tile-slider{grid-column:span 3;grid-row:span 3}.wall .tile-memory,.wall .tile-tictactoe{grid-column:span 2;grid-row:span 2}.wall .tile-merge .tile-caption strong{font-size:25px}.wall .tile-merge .tile-caption{padding:65px 22px 19px}.category-tile{grid-column:span 2;grid-row:span 2;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:17px;box-shadow:0 5px 0 #104b5715;color:#244663}.category-tile>span{font-size:48px;line-height:1.3}.category-tile strong{font-size:19px}.category-tile small{font-size:11px;margin-top:5px}.tile-puzzle{background:#fff0bd}.tile-two{background:#d9d4ff}.home-content{max-width:1280px;padding:20px 22px;margin:auto}.category-nav{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 30px}.category-nav a{background:#ffffffa8;border:2px solid transparent;border-radius:25px;font-weight:650;padding:8px 23px;font-size:14px;box-shadow:0 3px 0 #235e6310}.category-nav a:hover{background:white;border-color:#fff}.welcome{display:flex;justify-content:space-between;align-items:center;gap:40px;padding:28px 0 48px}.eyebrow{color:#2a7e86;font-size:12px;font-weight:650;letter-spacing:1px}h2{font-size:25px;line-height:1.4}h1{line-height:1.35}.welcome h2{font-size:34px;margin:6px 0 14px}.welcome p{max-width:720px;color:#2a6370;font-size:14px}.welcome-chip{flex-shrink:0;background:#fff4cf;padding:16px 30px;border-radius:20px;transform:rotate(5deg);text-align:center;font-size:13px;box-shadow:0 5px 0 #dcb55044}.welcome-chip b{font-size:24px}.home-about{background:#ffffff83;padding:30px;border-radius:18px;margin:20px 0 45px}.home-about p{color:#416f79;font-size:14px}.home-about a{color:#17689b}.site-footer{max-width:1280px;margin:40px auto 0;padding:28px 22px;border-top:1px solid #2ca99830;font-size:12px;color:#37717b}.brand{font-size:29px;letter-spacing:-1.5px;font-weight:900;white-space:nowrap;color:#12384c}.brand span{font-size:12px;letter-spacing:1px;font-weight:600;margin-left:8px;color:#3f8994}.site-footer>div{display:flex;gap:25px;flex-wrap:wrap;margin:16px 0}.site-footer p{color:#4a8a90}.inner-header{max-width:1320px;margin:0 auto;display:flex;align-items:center;gap:35px;justify-content:space-between;padding:22px}.inner-header nav{display:flex;gap:25px;flex-wrap:wrap;font-size:14px}.inner-header nav a{font-weight:600}.game-page,.listing{max-width:1280px;margin:auto;padding:0 22px 30px}.breadcrumb{font-size:12px;color:#38747e;margin:10px 0 23px}.game-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(245px,1fr);gap:24px;align-items:start}.player{background:white;border-radius:20px;padding:22px;box-shadow:0 5px 0 #235e6315;min-width:0}.player-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.player h1{font-size:27px;margin:5px 0 12px}.tag{font-size:11px;color:#6b8494}.player-heading button,.player-actions button:not(.primary){border:1px solid #dbe8ec;background:#f6fafd;border-radius:8px;color:#2c617f;padding:6px 12px;font-size:13px;white-space:nowrap}.game-stats{display:flex;gap:12px;margin:6px 0 15px}.game-stats>span{font-size:11px;color:#6b8494;background:#f0f7f9;border-radius:9px;padding:9px 18px;min-width:96px}.game-stats b{display:block;font-size:23px;line-height:1.5;color:#183c55;font-variant-numeric:tabular-nums}.game-area{background:#eaf4f7;border-radius:12px;overflow:hidden;min-height:300px;display:grid;place-items:center;width:100%;position:relative}.game-area canvas{display:block;width:100%;aspect-ratio:4/3;touch-action:none;outline:none}.game-splash{position:relative;width:100%;max-height:420px;aspect-ratio:4/3;overflow:hidden}.game-splash>.game-art{position:absolute;inset:0;filter:brightness(.65);height:100%;aspect-ratio:auto}.game-splash>span:last-child{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;color:white;text-shadow:0 3px 8px #12384c80}.game-splash strong{font-size:33px}.game-splash small{margin-top:12px;font-size:14px}.player-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}.primary{display:inline-flex;justify-content:center;align-items:center;background:#2165c9;color:#fff;border:0;border-radius:10px;padding:11px 20px;font-weight:650;box-shadow:0 3px 0 #154899}.primary:hover{background:#2879df}.player-actions p{width:100%;margin:7px 0 3px;font-size:13px;line-height:1.65;color:#527082;min-height:23px}.game-info{background:#ffffffa8;border-radius:18px;padding:24px}.game-info h2{font-size:20px;margin:5px 0 17px}.game-info ol{padding-left:20px;color:#3d687a;font-size:13px}.game-info li{margin-bottom:15px}.game-info p{font-size:13px;color:#3d687a}.game-info .storage-note{font-size:11px;color:#6f8c98;border-top:1px solid #cce1e3;padding-top:15px;margin-top:22px}.direction-pad{text-align:center;margin:20px auto 0;user-select:none}.direction-pad button{border:1px solid #cee1e8;background:#f0f7fc;border-radius:10px;min-width:54px;height:42px;font-weight:700;font-size:22px;color:#255b78;touch-action:manipulation;margin:3px}.direction-pad button:active{background:#bedef3}.related{margin:38px 0}.card-grid,.recent-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}.card-grid .game-tile,.recent-grid .game-tile{aspect-ratio:1}.card-grid .game-art,.recent-grid .game-art{height:100%}.listing h1{font-size:35px;margin:26px 0 15px}.listing .lead{font-size:15px;color:#346e7b;max-width:850px}.listing>.card-grid{margin-top:30px}.listing-note{margin-top:40px;background:#ffffff75;border-radius:15px;padding:25px;font-size:14px}.listing-note h2{font-size:20px;margin-top:0}.prose{max-width:920px;padding:0 24px 45px;margin:0 auto}.prose h1{font-size:34px;margin:30px 0}.prose h2{margin-top:32px;font-size:23px}.prose p{font-size:15px;color:#376b78;line-height:1.95}.search-form{display:flex;gap:14px;align-items:end;max-width:800px;margin:28px 0}.search-form label{display:grid;gap:7px;flex:1;font-size:13px}.search-form input{border:2px solid #fff;border-radius:11px;padding:13px 16px;background:#ffffffd9;color:#174665;width:100%;outline-offset:2px}.search-form .primary{height:51px}.merge-board,.slider-board,.ttt-board,.memory-board{display:grid;gap:9px;width:min(100%,420px);aspect-ratio:1;padding:16px;margin:auto;touch-action:none}.merge-board{grid-template-columns:repeat(4,1fr);background:#253e69}.number-tile{display:grid;place-items:center;aspect-ratio:1;border-radius:10px;background:#ffffff14;color:#244b67;font-size:32px;font-weight:800}.n2{background:#e6f8f7}.n4{background:#b5eee2}.n8{background:#7addbd}.n16{background:#ffcf72}.n32{background:#ffae66}.n64{background:#fc8478;color:#fff}.n128{background:#e777b3;color:#fff;font-size:26px}.n256{background:#a27bdf;color:#fff;font-size:26px}.n512{background:#697bd9;color:#fff;font-size:26px}.n1024{background:#416fd6;color:#fff;font-size:22px}.n2048{background:#efac37;color:white;font-size:22px}.memory-board{grid-template-columns:repeat(4,1fr);background:#e6e0fb}.memory-card{border:0;background:#8d6bd0;border-radius:12px;color:white;font-size:32px;box-shadow:inset 0 -4px 0 #63459955;aspect-ratio:1}.memory-card.flipped{background:#fff;box-shadow:inset 0 -4px 0 #cbbfe755}.memory-card.matched{background:#d1f5c8}.slider-board{grid-template-columns:repeat(3,1fr);background:#f4d3aa}.slider-board button{border:0;border-radius:12px;background:#ff954b;color:#fff;font-size:42px;font-weight:750;box-shadow:inset 0 -5px 0 #c36c3c77;aspect-ratio:1}.slider-board .empty{border:2px dashed #d6a571;border-radius:12px;aspect-ratio:1}.ttt-board{grid-template-columns:repeat(3,1fr);background:#fff0b8}.ttt-board button{border:0;border-radius:12px;background:#fffdf1;font-size:60px;font-weight:800;aspect-ratio:1;color:#275caa;box-shadow:inset 0 -4px 0 #c7b57a33}.ttt-board .mark-O{color:#ec7094}.reaction-box{border:0;min-height:370px;width:100%;height:100%;color:white;font-size:35px;font-weight:750;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:30px;touch-action:manipulation}.reaction-box small{font-size:16px;font-weight:400;margin-top:16px}.reaction-box.wait{background:#d76675}.reaction-box.go{background:#24875a}.reaction-box.early{background:#5e6cb0}.reaction-box.result{background:#257caa}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:10px 22px;background:#173c55;color:white;z-index:20;box-shadow:0 5px 15px #16425f33;border-radius:10px;font-size:13px;max-width:90vw;text-align:center}#toast:empty{display:none}.player:fullscreen{overflow:auto;max-width:100%;padding:25px;background:#eaf4f7}.player:fullscreen .game-area{max-width:850px;margin:auto}.player:fullscreen .player-heading,.player:fullscreen .game-stats,.player:fullscreen .player-actions{max-width:850px;margin-left:auto;margin-right:auto}body #site-message-box{background:#e5faf4;border-top-color:#99d8ce}body #site-message-box button{background:#2165c9}body #site-message-box h2{color:#18455a}body #site-message-box textarea,body #site-message-box select{color:#244e60}@media(min-width:1450px){.wall{grid-auto-rows:94px}}@media(max-width:1000px){.wall{grid-template-columns:repeat(8,minmax(0,1fr));grid-auto-rows:83px;gap:13px}.wall .tile-merge{grid-column:span 3;grid-row:span 3}.wall .tile-bricks,.wall .tile-reaction,.wall .tile-slider{grid-column:span 2;grid-row:span 2}.card-grid,.recent-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.game-layout{grid-template-columns:minmax(0,1.8fr) minmax(220px,1fr);gap:17px}.player{padding:17px}.game-info{padding:18px}.inner-header nav{gap:17px}.brand{font-size:25px}.inner-header{gap:20px}.brand span{display:block;font-size:10px;margin-left:2px;letter-spacing:2px}.game-area{min-height:240px}.player h1{font-size:24px}}@media(max-width:680px){.wall{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:76px;gap:12px;padding:15px 14px}.brand-tile{grid-column:span 2;grid-row:span 2}.brand-tile h1{font-size:29px}.wall .game-tile{grid-column:span 2;grid-row:span 2}.wall .tile-merge{grid-column:span 2;grid-row:span 2}.wall .tile-merge .tile-caption strong{font-size:15px}.wall .tile-merge .tile-caption{padding:30px 12px 10px}.category-tile{grid-column:span 2;grid-row:span 1;display:grid;grid-template-columns:45px 1fr;grid-template-rows:1fr 1fr;padding:10px 14px;column-gap:8px;text-align:left}.category-tile>span{grid-row:span 2;font-size:32px}.category-tile strong{font-size:14px;align-self:end}.category-tile small{font-size:9px;align-self:start;margin-top:0}.favorite{width:28px;height:28px;font-size:21px;right:7px;top:7px}.tile-caption{padding:24px 11px 10px}.tile-caption strong{font-size:14px}.tile-caption small{font-size:10px}.home-content{padding:10px 16px}.category-nav{gap:8px;margin-top:17px}.category-nav a{padding:6px 17px;font-size:12px}.welcome{padding:20px 0;gap:18px}.welcome h2{font-size:26px}.welcome p{font-size:12px}.welcome-chip{display:none}.home-about{padding:22px}.home-about h2{font-size:23px}.home-about p{font-size:13px}.inner-header{padding:14px 16px;gap:15px;align-items:center}.inner-header nav{gap:15px;font-size:12px}.inner-header nav a:nth-child(2),.inner-header nav a:nth-child(3){display:none}.brand{font-size:25px}.game-page,.listing{padding:0 14px 20px}.game-layout{grid-template-columns:1fr}.player{padding:15px;border-radius:16px}.player h1{font-size:23px}.player-heading button{font-size:11px}.game-stats{gap:10px}.game-stats>span{min-width:86px;padding:7px 14px}.game-stats b{font-size:21px}.game-area{min-height:220px}.game-splash{max-height:330px}.game-splash strong{font-size:26px}.game-info{padding:20px}.card-grid,.recent-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.related{margin-top:28px}.related h2{font-size:23px}.listing h1,.prose h1{font-size:29px}.listing .lead{font-size:13px}.prose{padding:0 19px 30px}.prose p{font-size:14px}.site-footer{padding:22px 18px}.site-footer .brand span{display:inline-block}.search-form{gap:10px}.search-form input{font-size:13px}.search-form .primary{padding:9px 16px}.number-tile{font-size:27px}.n128,.n256,.n512{font-size:23px}.n1024,.n2048{font-size:19px}.merge-board,.slider-board,.ttt-board,.memory-board{padding:12px;gap:7px}.memory-card{font-size:27px}.ttt-board button{font-size:45px}.slider-board button{font-size:34px}.reaction-box{min-height:300px;font-size:30px}.direction-pad{margin-top:15px}}
/* Pokicon polish: playful toy-like controls, consistent surfaces, real game states. */
:root{--pk-ink:#173c55;--pk-blue:#2772db;--pk-soft:#edf6fb;--pk-edge:#dcebf2;--pk-radius:22px}.wall{max-width:1600px;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:clamp(65px,calc((100vw - 209px)/12),116px);gap:15px}.wall .game-tile{grid-column:span 2;grid-row:span 2}.wall .tile-merge,.wall .tile-snake,.wall .tile-connect4{grid-column:span 4;grid-row:span 4}.wall .category-tile{grid-column:span 2;grid-row:span 2;display:flex;flex-direction:column;padding:15px;text-align:center}.wall .tile-fav{background:#ffdce8}.wall .tile-guide{background:#c7eaff}.wall .tile-snake .tile-caption strong,.wall .tile-connect4 .tile-caption strong{font-size:23px}.home-content,.site-footer,.inner-header{max-width:1600px}.favorite{width:42px;height:42px;font-size:26px;right:10px;top:10px}.favorite:active{transform:scale(.94)}.game-page{max-width:1380px}.game-layout{gap:28px;grid-template-columns:minmax(0,2.15fr) minmax(270px,1fr)}.player{border:1px solid #ffffffda;padding:26px;border-radius:var(--pk-radius);box-shadow:0 8px 0 #2c959221,0 12px 28px #256c6510;background:linear-gradient(#fff,#f8fcff)}.player h1{font-size:30px;color:var(--pk-ink);letter-spacing:-.7px}.tag{font-size:12px;color:#49809a;letter-spacing:.5px}.player-heading button{min-height:44px;border-radius:12px;background:#eef6fc;border-color:#dbe9f4;padding:8px 15px}.game-stats{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0 20px}.game-stats:has(#best-wrap[hidden]){grid-template-columns:1fr}.game-stats>span{position:relative;border:1px solid #e0edf5;min-width:0;border-radius:16px;padding:11px 17px 11px 65px;font-size:12px;font-weight:600;color:#607e93;background:linear-gradient(125deg,#edf6ff,#f6fbff)}.game-stats>span:before{content:'';position:absolute;left:17px;top:22px;width:34px;height:34px;background:url('/assets/score.svg') center/contain no-repeat}.game-stats #best-wrap{background:linear-gradient(125deg,#fff5da,#fffaf0);border-color:#f5e8bf}.game-stats #best-wrap:before{background-image:url('/assets/trophy.svg')}.game-stats b{font-size:30px;color:#245785;line-height:1.35}.game-stats #best-wrap b{color:#a77922}.game-area{border-radius:20px;border:6px solid #e8f1f5;box-shadow:0 2px 0 #d3e3ea;isolation:isolate}.game-splash>.game-art{height:auto;aspect-ratio:1;width:100%;top:50%;bottom:auto;transform:translateY(-50%)}.game-splash strong{font-size:35px;letter-spacing:.7px}.player-actions{justify-content:center;gap:12px;margin-top:23px}.player-actions .primary{min-height:50px;min-width:178px;border-radius:15px;background:linear-gradient(#3b8bef,#236bd2);box-shadow:0 5px 0 #1451a9,0 7px 14px #246fce25;transition:transform .15s,box-shadow .15s}.player-actions .primary:active{transform:translateY(3px);box-shadow:0 2px 0 #1451a9}.player-actions button:not(.primary){height:50px;border-radius:14px;padding:10px 23px;color:#436787}.player-actions p{font-size:14px;text-align:center;line-height:1.8;color:#5c7a8d;margin-top:13px}.direction-pad button{height:48px;min-width:58px;border:1px solid #cbdfe9;border-radius:14px;background:linear-gradient(#fff,#e6f0f8);box-shadow:0 4px 0 #c3d5e3;color:#3f6a87;margin:5px}.direction-pad button:active{transform:translateY(3px);box-shadow:0 1px 0 #c3d5e3}.game-info{background:#f1fffa;border:1px solid #ffffffa8;border-radius:22px;padding:27px;box-shadow:0 5px 0 #35796b10}.game-info h2{color:#20566b;font-size:21px}.game-info ol{counter-reset:game-rule;list-style:none;padding:0}.game-info li{counter-increment:game-rule;position:relative;padding-left:37px;margin-bottom:20px;font-size:14px;line-height:1.85}.game-info li:before{content:counter(game-rule);position:absolute;left:0;top:1px;display:grid;place-items:center;width:26px;height:29px;background:#d9f0ed;color:#368f8a;border-radius:9px;font-weight:750}.game-info p{font-size:14px;line-height:1.9}.game-info .storage-note{font-size:12px;color:#69889a;background:#ffffff9c;padding:15px;border:1px solid #dfedeb;border-radius:12px}.merge-board{background:linear-gradient(135deg,#234b76,#1c3d62);padding:17px;gap:10px}.number-tile{border:1px solid #ffffff1c;box-shadow:inset 0 -5px 0 #1b46721d,0 3px 5px #102c4617;border-radius:13px;transition:background-color .15s}.n2{background:linear-gradient(#f2fffd,#dcefeb)}.n4{background:linear-gradient(#c4f6e4,#98d4c8)}.n8{background:linear-gradient(#88e8c3,#59bc9e)}.n16{background:linear-gradient(#ffdc91,#f3ba54)}.n32{background:linear-gradient(#ffc28b,#f49c61)}.n64{background:linear-gradient(#ff9a8b,#ea6d78)}.memory-board{padding:18px;background:linear-gradient(140deg,#f1ebff,#d8cbf4);gap:10px}.memory-card{border-radius:16px;background:linear-gradient(145deg,#b699ec,#8667c9);box-shadow:inset 0 2px 0 #ffffff66,inset 0 -5px 0 #65539c55,0 3px 6px #7153b126;transition:transform .16s,background .16s}.memory-card.flipped{transform:scale(.97);background:#fffdf7}.memory-card.matched{background:#d5f5cc;box-shadow:inset 0 -3px 0 #91c77c55}.ttt-board{background:linear-gradient(#fff5cd,#ffe9a5);padding:18px;gap:12px}.ttt-board button{border-radius:19px;background:linear-gradient(#fff,#fff7dc);box-shadow:0 5px 0 #dfcc8c,inset 0 2px 0 #fff;text-shadow:0 3px 0 #1a4f9520}.ttt-board .mark-O{text-shadow:0 3px 0 #b6336630}.slider-board{padding:18px;background:linear-gradient(#ffe4c4,#f0bf83);gap:11px}.slider-board button{border-radius:17px;background:linear-gradient(#ffbc73,#fb9849);box-shadow:inset 0 3px 0 #ffdfb6,inset 0 -6px 0 #d17a3766,0 3px 0 #be8c5530}.finish-card,.pause-shade{position:absolute;inset:0;z-index:5;background:#153a5b70;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:25px;text-align:center;color:#fff;backdrop-filter:blur(3px)}.finish-card>span{background:#fff4d4;color:#936c18;padding:5px 17px;border-radius:20px;font-size:12px;font-weight:700;letter-spacing:1px}.finish-card>strong{max-width:400px;font-size:25px;line-height:1.55;text-shadow:0 3px 10px #16344955}.finish-card .primary{background:#fff;color:#2562a6;box-shadow:0 4px 0 #a6c4dd;border-radius:14px;padding:12px 28px}.canvas-action{position:absolute;right:15px;bottom:15px;background:#fffbebee;border:2px solid #fff;color:#87671e;padding:10px 18px;border-radius:13px;box-shadow:0 4px 0 #beaa7755;font-weight:700}.reaction-box{font-size:40px;letter-spacing:1px}.reaction-box.wait{background:radial-gradient(circle at 50% 30%,#f095a1,#d3647d)}.reaction-box.go{background:radial-gradient(circle at 50% 30%,#68c38c,#25835c)}.reaction-box.early{background:radial-gradient(circle at 50% 30%,#a2a1de,#6578b8)}.reaction-box.result{background:radial-gradient(circle at 50% 30%,#70bdde,#2a87b5)}.mines-wrap{width:100%;max-width:430px;background:#dcf0e5;padding:16px}.mines-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px;font-size:12px;color:#4c7865}.mines-toolbar button{background:#fff;border:1px solid #b6d7c8;border-radius:9px;min-height:40px;padding:5px 9px;color:#42705d;font-size:12px}.mines-toolbar button[aria-pressed=true]{background:#f5c875;border-color:#d5a54e;color:#714e12}.mines-board{display:grid;grid-template-columns:repeat(9,1fr);gap:4px}.mines-board button{aspect-ratio:1;border:0;border-radius:6px;font-size:17px;font-weight:800;background:linear-gradient(#a1d5b2,#7bb497);box-shadow:inset 0 2px 0 #c6ebd1,inset 0 -3px 0 #588c7444;color:#2a6550;padding:0}.mines-board button.opened{background:#eefaf1;box-shadow:none}.mines-board .count-1{color:#3975bf}.mines-board .count-2{color:#34915e}.mines-board .count-3{color:#d26867}.mines-board .count-4{color:#8e68ba}.mines-board .flagged{color:#dd654d;background:#fff1c9}.connect-board{display:grid;grid-template-columns:repeat(7,1fr);width:100%;max-width:500px;background:linear-gradient(145deg,#4391db,#2565ac);border:6px solid #73b4e5;border-radius:16px;padding:13px 9px;gap:7px;box-shadow:inset 0 -5px 0 #235d9a}.connect-column{display:flex;flex-direction:column;gap:8px;background:transparent;border:0;padding:0;min-width:0;border-radius:25px}.connect-column:not(:disabled):hover{background:#ffffff24}.connect-cell{display:grid;place-items:center;aspect-ratio:1;width:100%;border-radius:50%;font-size:11px;font-weight:750}.connect-cell.vacant{background:#d2e7f5;box-shadow:inset 0 4px 6px #29577a66}.connect-cell.red{background:radial-gradient(circle at 35% 25%,#ffa5a1,#e2596e);color:#8c344b;box-shadow:inset 0 -4px 0 #b53b5866}.connect-cell.yellow{background:radial-gradient(circle at 35% 25%,#fff2b3,#f8c45b);color:#977125;box-shadow:inset 0 -4px 0 #ce994d88}.connect-cell.latest{outline:3px solid #fff;outline-offset:-5px}.lights-board{width:100%;max-width:420px;display:grid;grid-template-columns:repeat(5,1fr);background:linear-gradient(140deg,#262b60,#3d437d);padding:17px;gap:10px}.light-cell{aspect-ratio:1;min-width:0;border:2px solid transparent;border-radius:13px;font-size:32px;transition:background .18s,color .18s,box-shadow .18s}.light-cell.on{background:radial-gradient(circle at 35% 20%,#fff6c0,#e9b94e);color:#b98522;box-shadow:0 0 15px #ffdb7755,inset 0 -4px 0 #bd8d3155;border-color:#ffe7a1}.light-cell.off{background:linear-gradient(#30386d,#262b51);color:#5f679b;box-shadow:inset 0 3px 7px #191c4333;border-color:#3f467c}.sudoku-wrap{width:100%;max-width:410px;background:linear-gradient(#fff5dd,#ffe9bd);padding:20px}.sudoku-board{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;border:3px solid #b9d1d8;background:#adc7cf;padding:3px;border-radius:10px}.sudoku-board button{aspect-ratio:1;min-width:0;border:0;background:#fffdf5;border-radius:5px;font-size:34px;color:#427a96;font-weight:600}.sudoku-board button:nth-child(4n+2){margin-right:4px}.sudoku-board button:nth-child(n+5):nth-child(-n+8){margin-bottom:4px}.sudoku-board .fixed{background:#e9f0ea;color:#476472;font-weight:800}.sudoku-board .selected{background:#a7def1;box-shadow:inset 0 0 0 3px #55a9c6}.sudoku-board .invalid{color:#b44b54;background:#ffe3de}.sudoku-palette{display:flex;gap:9px;margin-top:18px}.sudoku-palette button{flex:1;min-height:47px;border:1px solid #d3bb8b;background:#fffdf5;border-radius:11px;color:#9b7943;font-size:20px;box-shadow:0 3px 0 #d8c294}.sudoku-palette button:last-child{font-size:12px}.star-wrap{width:100%;max-width:500px;background:radial-gradient(at top,#5f62ad,#333c70);padding:17px}.star-timer{text-align:center;color:#deddfa;font-size:13px;margin:0 0 14px}.star-timer strong{font-size:25px;color:#fff0aa;font-variant-numeric:tabular-nums;margin:0 5px}.star-board{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.star-board button{aspect-ratio:1;border:1px solid #777ec433;border-radius:13px;padding:13px;background:#272f5e;min-width:0;box-shadow:inset 0 -3px 0 #1a204533}.star-board svg{width:100%;height:100%}.star-board .decoy{color:#454e89}.star-board .target{background:radial-gradient(at top,#ffe08b,#d59b43);color:#fff3b7;box-shadow:0 0 20px #f9d35c45,inset 0 -3px 0 #a9783c88}.star-board .target svg{filter:drop-shadow(0 2px 1px #c48a2f)}@media(max-width:1000px){.wall{grid-template-columns:repeat(8,minmax(0,1fr));grid-auto-rows:calc((100vw - 135px)/8);gap:13px}.wall .tile-merge,.wall .tile-snake{grid-column:span 4;grid-row:span 4}.wall .tile-connect4{grid-column:span 2;grid-row:span 2}.game-layout{grid-template-columns:minmax(0,1.7fr) minmax(230px,1fr);gap:20px}.player{padding:20px}.game-info{padding:20px}.game-stats>span{padding-left:52px}.game-stats>span:before{left:11px;width:29px;height:29px}.wall .tile-connect4 .tile-caption strong{font-size:15px}}@media(max-width:680px){.wall{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:calc((100vw - 64px)/4);padding:15px 14px;gap:12px}.wall .game-tile,.wall .tile-merge,.wall .tile-snake,.wall .tile-connect4{grid-column:span 2;grid-row:span 2}.wall .category-tile{grid-column:span 2;grid-row:span 1;display:grid;grid-template-columns:37px 1fr;grid-template-rows:1fr 1fr;padding:10px 12px;column-gap:7px;text-align:left}.wall .category-tile>span{grid-row:span 2;font-size:29px}.wall .category-tile strong{font-size:13px}.wall .category-tile small{font-size:9px}.wall .tile-merge .tile-caption strong,.wall .tile-snake .tile-caption strong,.wall .tile-connect4 .tile-caption strong{font-size:14px}.favorite{width:38px;height:38px;font-size:24px;right:7px;top:7px}.game-layout{grid-template-columns:1fr;gap:20px}.player{padding:16px;border-radius:20px}.player h1{font-size:25px}.game-stats{margin:12px 0 16px;gap:10px}.game-stats>span{padding:10px 12px 10px 52px;font-size:11px}.game-stats>span:before{top:20px}.game-stats b{font-size:27px}.game-area{border-width:4px;border-radius:17px}.game-info{padding:23px}.game-info li,.game-info p{font-size:13px}.player-actions .primary{min-width:150px}.player-actions p{font-size:13px}.game-splash strong{font-size:28px}.finish-card{padding:18px;gap:15px}.finish-card>strong{font-size:21px}.number-tile{border-radius:10px}.mines-wrap{padding:10px}.mines-board{gap:3px}.mines-board button{font-size:14px;border-radius:5px}.connect-board{gap:5px;padding:10px 5px;border-width:4px}.connect-column{gap:7px}.connect-cell{font-size:9px}.lights-board{padding:14px;gap:8px}.light-cell{border-radius:11px;font-size:27px}.sudoku-wrap{padding:15px}.sudoku-board button{font-size:29px}.star-wrap{padding:14px}.star-board{gap:8px}.star-board button{padding:9px}.canvas-action{right:12px;bottom:12px;padding:9px 15px;font-size:12px}.reaction-box{font-size:34px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.game-tile,.number-tile,.memory-card,.light-cell,.player-actions .primary{transition:none}}

/* Shared identity and per-game ranking */
.leaderboard{border:1px solid #d6e6eb;border-radius:20px;background:linear-gradient(145deg,#f0fbf6,#fff 65%);padding:18px;margin:0 0 28px;box-shadow:0 6px 0 #d9eae445}.ranking-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.ranking-title h2{margin:0}.ranking-title button{min-height:44px;padding:8px 12px;border:1px solid #b8d0d8;border-radius:12px;background:white;color:#244c5c;cursor:pointer}.ranking-rule{font-size:13px;margin:8px 0;color:#456570}.player-identity{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;border-radius:12px;background:#dff4ed;padding:12px;margin:12px 0;font-size:13px}.player-identity strong{font-size:16px;overflow-wrap:anywhere}.player-identity small{width:100%;color:#456570}.game-info .ranking-list{padding:0;margin:10px 0;list-style:none;max-height:420px;overflow:auto}.game-info .ranking-list li{display:flex;align-items:center;gap:9px;padding:10px 6px;border-bottom:1px solid #dfebed;margin:0;font-size:14px}.rank-number{width:24px;flex-shrink:0;text-align:center;color:#486979}.ranking-list li:nth-child(-n+3) .rank-number{background:#ffdb7d;color:#5e4514;border-radius:7px}.rank-name{flex:1;min-width:0;overflow-wrap:anywhere}.rank-value{font-size:13px;white-space:nowrap}.ranking-list .is-me{background:#def5ec;border-radius:9px}.ranking-status{font-size:13px;color:#325c69}.ranking-empty{color:#47616d}.leaderboard>small{font-size:12px;color:#47616d}.nickname-dialog{width:min(460px,calc(100% - 32px));max-height:90dvh;overflow:auto;border:0;border-radius:24px;padding:28px;box-shadow:0 24px 80px #173a6060;color:#173c52;background:#fff}.nickname-dialog::backdrop{background:#143a58a6}.nickname-dialog h2{font-size:26px;margin:0 0 12px}.nickname-dialog label{display:block;font-weight:700;margin:22px 0 8px}.nickname-dialog input{width:100%;font:inherit;padding:13px;border:2px solid #bad7d4;border-radius:12px;min-height:48px}.nickname-dialog small{display:block;font-size:13px;color:#456570;margin:8px 0}.nickname-hint{font-size:13px;line-height:1.6;color:#496572}.nickname-error{color:#b02c43;min-height:22px;font-size:14px}.nickname-actions{display:flex;gap:12px;margin-top:20px}.nickname-actions button{min-height:48px;flex:1;cursor:pointer;border-radius:12px;border:1px solid #bdd4d9;font:inherit;background:#f2f7f8}.nickname-actions .primary{background:#1b5368;color:white}.nickname-dialog :focus-visible,.leaderboard button:focus-visible{outline:3px solid #168a80;outline-offset:3px}.nickname-dialog button:disabled{opacity:.6;cursor:wait}@media(max-width:700px){.nickname-dialog{padding:22px}.leaderboard{margin-top:12px}.game-info .ranking-list{max-height:320px}}
.game-info .ranking-list li::before{content:none;display:none}.game-info .ranking-list li{counter-increment:none;padding-left:6px}.game-info .ranking-list .ranking-empty{display:block;padding:12px 6px}

.touch-guide{display:none;font-size:13px;line-height:1.6;background:#e6f8f1;color:#24584f;border-radius:11px;padding:10px 12px;margin:0 0 12px}.direction-pad button{min-height:54px;min-width:60px;touch-action:none;user-select:none;-webkit-user-select:none}.direction-pad button:active{box-shadow:inset 0 3px 8px #365f8933}.player-heading button,.player-actions button{min-height:44px}.game-area button{touch-action:manipulation}.mines-toolbar button{min-height:44px}.game-area canvas{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.star-board button,.connect-column,.light-cell{touch-action:manipulation}.favorite{min-width:44px;min-height:44px}@media(pointer:coarse),(max-width:680px){.touch-guide{display:block}.player-actions .primary{min-height:50px}.game-area{min-height:0}.game-splash{min-height:220px}.game-page{padding-left:12px;padding-right:12px}.player{padding:12px}.player h1{font-size:23px}.inner-header{padding:16px 14px;gap:10px}.inner-header nav{gap:15px}.direction-pad{margin-top:16px}.direction-pad button{min-height:58px;min-width:64px;font-size:25px;margin:4px}.merge-board,.slider-board,.ttt-board,.memory-board{padding:10px;gap:8px}.reaction-box{min-height:270px;font-size:29px}.sudoku-palette button{min-height:48px}.star-board{gap:7px}.game-info{padding:16px}.ranking-title button{min-height:44px}.leaderboard{padding:14px}.game-stats>span{min-width:0;flex:1}.canvas-action{min-height:44px}.mines-wrap{padding:8px}.mines-board{gap:3px}.mines-board button{min-width:0}.game-area button:disabled{opacity:1}}@media(max-width:380px){.game-stats>span{padding-left:42px}.game-stats>span:before{left:7px;width:25px;height:25px}.player h1{font-size:21px}.number-tile{font-size:26px}.n1024,.n2048{font-size:18px}.touch-guide{font-size:12px}.sudoku-wrap{padding:10px}.lights-board{gap:6px;padding:10px}}

.ready-card{position:absolute;inset:0;display:grid;place-items:center;z-index:6;background:#153a5b65;backdrop-filter:blur(2px);color:#fff;font-size:36px;font-weight:800;pointer-events:none;text-shadow:0 3px 9px #12384c}.player{scroll-margin-top:8px}@media(max-width:680px) and (orientation:landscape){.direction-pad{display:flex;justify-content:center;gap:4px}.direction-pad>div{display:flex}.direction-pad button{min-width:56px;min-height:48px}.game-area canvas{max-height:65dvh;width:auto;max-width:100%}}

.handheld-controls{display:contents}.handheld-grip,#handheld-help{display:none}.handheld-rules{max-width:min(440px,calc(100% - 32px));max-height:85dvh;overflow:auto;border:0;border-radius:22px;padding:25px;color:#173c52}.handheld-rules::backdrop{background:#173c5280}.handheld-rules h2{font-size:21px}.handheld-rules li{margin-bottom:14px}.handheld-rules button{min-height:48px}
@media(max-width:680px){
.game-page{padding:0 12px 24px}.breadcrumb{margin:3px 0 12px;font-size:11px}.inner-header{padding:12px 15px}.inner-header .brand{font-size:25px}.player{position:relative;padding:16px 14px 20px;border:2px solid #c6e7ea;border-radius:30px 30px 48px 30px;background:linear-gradient(145deg,#f3ffff 0%,#d4e8ed 65%,#a9cdd8 100%);box-shadow:inset 0 3px 0 #fff,inset -4px -7px 0 #89b3c35c,0 9px 0 #6093a5,0 16px 24px #286c7830;overflow:hidden}.player:after{content:'POKICON · POCKET PLAY';display:block;text-align:center;letter-spacing:3px;font-size:8px;font-weight:800;color:#4f7b8a;margin-top:18px}.player-heading{gap:8px;margin-bottom:10px}.player h1{font-size:18px;margin:2px 0;letter-spacing:.2px}.player .tag{font-size:9px;letter-spacing:1px}.player-heading button{min-height:40px;font-size:10px;border-radius:16px;padding:5px 9px;background:#e7f3f5;border-color:#bbd5dd;box-shadow:inset 0 2px 0 #fff;color:#406a7b}.game-stats{margin:8px 0 11px;gap:8px}.game-stats>span{padding:5px 10px 5px 34px;border:1px solid #bfdbdf;border-radius:10px;background:#e9f6f3;box-shadow:inset 0 2px 3px #74989815;min-width:0;font-size:9px}.game-stats>span:before{width:20px;height:20px;top:14px;left:8px;border-radius:6px}.game-stats b{font-size:21px;line-height:1.2}.touch-guide{padding:7px 9px;font-size:11px;line-height:1.5;background:#d6eae7;border:1px solid #bfd8d6;margin:0 0 9px;border-radius:9px;color:#38665f}.game-area{border:9px solid #274352;border-bottom-width:14px;border-top-width:12px;border-radius:17px 17px 22px 17px;background:#273f4b;box-shadow:0 2px 0 #fff,inset 0 3px 5px #0005;min-height:0}.game-area canvas{border-radius:5px;max-width:100%}.game-splash{min-height:0;aspect-ratio:4/3}.game-splash strong{font-size:23px}.game-splash small{font-size:11px}.merge-board,.slider-board,.ttt-board,.memory-board{padding:9px;gap:7px}.number-tile{font-size:26px;border-radius:7px}.n128,.n256,.n512{font-size:22px}.n1024,.n2048{font-size:17px}.handheld-controls{display:grid;grid-template-columns:152px minmax(0,1fr);grid-template-rows:auto;gap:4px 12px;align-items:center;margin-top:17px;position:relative;min-height:139px;padding-bottom:34px}.direction-pad{grid-column:1;grid-row:1;margin:0;width:152px;display:block;filter:drop-shadow(0 4px 1px #153a5929)}.direction-pad>div{display:flex;gap:0;justify-content:center}.direction-pad button{height:48px;min-height:48px;min-width:48px;width:48px;margin:1px;padding:0;border-radius:9px;border:1px solid #244c63;border-top-color:#6889a1;background:linear-gradient(#53718a,#304e68);box-shadow:inset 0 2px 0 #7796ac,inset 0 -3px 0 #19364b;color:#e9f6ff;font-size:23px}.direction-pad button:active{background:#274b66;box-shadow:inset 0 3px 8px #102d44;transform:translateY(2px)}.player-actions{grid-column:2;grid-row:1;margin:0;display:flex;justify-content:center;gap:14px;flex-wrap:nowrap;min-width:0;padding-bottom:12px}.player-actions #start-game,.player-actions #pause-game,.player-actions #handheld-help{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:58px;min-width:58px;height:58px;min-height:58px;border-radius:50%;padding:0;font-size:0;letter-spacing:0;font-weight:900;border:3px solid #edf7f3;outline-offset:3px;box-shadow:0 5px 0 #a4583d,0 7px 7px #315b6a33,inset 0 2px 0 #fff7;background:linear-gradient(140deg,#ffbf78,#ec795d);color:#7b332c;transform:translateY(9px)}.player-actions #start-game:before{content:'A';font-size:25px;text-shadow:0 1px 0 #ffd1ad}.player-actions #start-game:after{content:'开始';position:absolute;top:61px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;letter-spacing:1px;color:#476c7d}.game-running .player-actions #start-game:after{content:'重玩'}.player-actions #pause-game,.player-actions #handheld-help{background:linear-gradient(140deg,#c6b4f5,#8c78cf);box-shadow:0 5px 0 #64589e,0 7px 7px #315b6a33,inset 0 2px 0 #fff7;color:#493b80;transform:translateY(-9px)}.player-actions #pause-game:before,.player-actions #handheld-help:before{content:'B';font-size:25px;text-shadow:0 1px 0 #dfd1ff}.player-actions #pause-game:after,.player-actions #handheld-help:after{content:attr(data-label);position:absolute;top:61px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;letter-spacing:1px;color:#476c7d}.player-actions #handheld-help:after{content:'玩法'}.player-actions:has(#pause-game:not([hidden])) #handheld-help{display:none}.player-actions #start-game:active,.player-actions #pause-game:active,.player-actions #handheld-help:active{filter:brightness(.95)}.player-actions #game-status{position:absolute;left:0;bottom:0;width:100%;margin:0;min-height:0;font-size:11px;line-height:1.5;text-align:center;color:#315a6e}.handheld-grip{display:flex;align-items:center;justify-content:center;gap:7px;grid-column:1;grid-row:1;position:relative;height:75px;transform:rotate(-12deg)}.handheld-grip span{width:9px;height:43px;border-radius:8px;background:#8dafbc;box-shadow:inset 0 2px 3px #567f8c55,0 1px 0 #f2ffff}.handheld-grip small{position:absolute;bottom:-15px;font-size:8px;letter-spacing:2px;transform:rotate(12deg);color:#638797}.handheld-controls:has(.direction-pad:not([hidden])) .handheld-grip{display:none}.handheld-controls:has(.direction-pad:not([hidden])){min-height:148px}.game-info{margin-top:8px;border-radius:23px}.leaderboard{border-radius:17px}.reaction-box{min-height:240px;font-size:27px}.reaction-box small{font-size:13px}.finish-card>strong{font-size:18px}.finish-card .primary{font-size:13px;padding:9px 18px}.ready-card{font-size:30px}.mines-wrap{padding:6px}.mines-toolbar{font-size:10px;gap:4px}.mines-toolbar button{font-size:10px;padding:4px 6px}.mines-board{gap:2px}.mines-board button{font-size:12px}.lights-board{padding:10px;gap:7px}.light-cell{font-size:24px}.sudoku-wrap{padding:10px}.sudoku-palette{gap:6px;margin-top:12px}.sudoku-palette button{min-height:44px}.star-wrap{padding:10px}.star-board{gap:6px}.star-board button{padding:7px}.connect-board{padding:7px 4px;gap:4px}.connect-column{gap:5px}.canvas-action{bottom:8px;right:8px;padding:7px 11px;min-height:40px;font-size:11px}.game-running .player-actions #start-game[disabled]{opacity:.6}
}@media(max-width:359px){.player{padding:14px 10px 18px}.handheld-controls{grid-template-columns:140px minmax(0,1fr);gap:8px}.direction-pad{width:140px}.direction-pad button{min-width:44px;width:44px;height:44px;min-height:44px}.player-actions{gap:10px}.player-actions #start-game,.player-actions #pause-game,.player-actions #handheld-help{width:48px;height:48px;min-width:48px;min-height:48px}.player-actions #start-game:after,.player-actions #pause-game:after,.player-actions #handheld-help:after{top:51px}.game-area{border-width:7px;border-bottom-width:12px}.player h1{font-size:16px}.touch-guide{font-size:10px}}

/* POKICON Arcade. Graphite / warm white / mint. */
:root{--bg:#14191c;--panel:#1c2327;--panel-2:#252e33;--line:#354147;--ink:#f1f4ee;--muted:#a7b6b9;--accent:#bcf278;color-scheme:dark}body{background:var(--bg);color:var(--ink)}body:before{display:none}h1,h2,h3{color:var(--ink)}a:hover{color:var(--accent)}.inner-header{max-width:none;height:76px;padding:0 max(28px,calc((100vw - 1440px)/2));border-bottom:1px solid #30393d;background:#171d20;gap:24px}.brand{color:#f0f4ef;letter-spacing:-1.8px;font-size:31px}.brand span{color:#9eb0b5;font-size:11px;letter-spacing:1px}.inner-header nav{font-size:13px;gap:28px;color:#b4c0c2}.inner-header nav a{font-weight:500}.inner-header nav a:hover{color:#d5f5a3}.portal{max-width:1488px;padding:0 24px;margin:auto}.portal-intro{display:flex;gap:20px;align-items:baseline;padding:28px 0 18px}.portal-intro h1{font-size:26px;font-weight:700;letter-spacing:-.6px;margin:0}.portal-intro p{font-size:12px;color:#a9b9bc;margin:0}.portal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:22px}.portal-toolbar .category-nav{margin:0;gap:7px}.category-nav a{border-radius:6px;background:transparent;border:1px solid #3a464b;color:#c5d0d1;padding:8px 22px;box-shadow:none;font-weight:500;font-size:13px}.category-nav a:hover,.portal-toolbar .category-nav a:first-child{background:#bcf278;border-color:#bcf278;color:#1c301e}.portal-search{display:flex;border:1px solid #3c494e;border-radius:7px;min-width:275px;height:40px;background:#1e272c;overflow:hidden}.portal-search label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.portal-search input{border:0;background:transparent;color:#edf4ee;padding:8px 12px;min-width:0;width:100%;font-size:12px}.portal-search input::placeholder{color:#94a6ad}.portal-search button{border:0;border-left:1px solid #3a474c;background:#29353b;color:#d3ddde;padding:0 13px;font-size:12px}.portal .wall{padding:0;max-width:none;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:auto;grid-auto-flow:dense;gap:14px}.portal .wall .game-tile{grid-column:span 1;grid-row:span 1;aspect-ratio:1}.portal .wall .tile-hop{grid-column:span 2;grid-row:span 2;aspect-ratio:1}.game-tile{border-radius:10px;background:#263239;box-shadow:none;border:1px solid #ffffff10;transition:transform .18s,border-color .18s}.game-tile:hover{transform:translateY(-3px);box-shadow:0 8px 20px #0005;border-color:#b4d6bf88}.game-art{background:#263239}.single-art img{position:static;width:100%;height:100%;object-fit:cover}.tile-caption{padding:28px 13px 12px;background:linear-gradient(transparent,#0a151de8);color:#fff}.tile-caption strong{font-size:14px;letter-spacing:0;font-weight:650}.tile-caption small{font-size:10px;color:#d0dbe0}.wall .tile-hop .tile-caption{padding:70px 23px 22px}.wall .tile-hop .tile-caption strong{font-size:28px}.wall .tile-hop .tile-caption small{font-size:13px}.favorite{background:#111d28c9;color:#e8efef;border:1px solid #ffffff30;width:36px;height:36px;min-width:36px;min-height:36px;font-size:23px;right:9px;top:9px;box-shadow:none;backdrop-filter:none}.favorite[aria-pressed=true]{background:#b9ee82;color:#193b26;border-color:#b9ee82}.portal .wall .category-tile{grid-column:span 1;grid-row:span 1;aspect-ratio:1;background:#233137;border:1px solid #3c4d55;border-radius:10px;align-items:flex-start;padding:22px;justify-content:flex-start;box-shadow:none;position:relative;color:#e4ece9;display:flex}.portal .category-tile strong{font-size:18px}.portal .category-tile small{font-size:11px;color:#a9bfc1}.portal .category-tile>span{position:absolute;bottom:16px;right:20px;font-size:45px;color:#b7d3c9;line-height:1}.home-content{padding:26px 0;max-width:none}.home-about{border:0;border-top:1px solid #344147;border-radius:0;background:none;padding:28px 0 10px;max-width:880px;margin:22px 0}.home-about h2{font-size:20px}.home-about p{font-size:13px;color:#a4b4b8;line-height:1.9}.home-about a{color:#c1e4a1;font-size:13px}.site-footer{max-width:1440px;color:#b0bfc3;border-color:#344147;padding-top:24px}.site-footer p{color:#91a5ab}.site-footer .brand{font-size:26px}.site-footer .brand span{font-size:10px}.game-page,.listing{max-width:1440px;padding-left:28px;padding-right:28px}.breadcrumb{color:#9bacb2;margin:20px 0;font-size:11px}.game-layout{grid-template-columns:minmax(0,1fr) 330px;gap:24px}.player{background:#222a2f;border:1px solid #3b474c;border-radius:14px;box-shadow:none;padding:24px}.player h1{color:#f1f3ed;font-size:25px}.tag{color:#a6babf;font-size:10px;letter-spacing:1px}.player-heading button,.player-actions button:not(.primary){color:#d0ddde;background:#2c393f;border-color:#46585f;box-shadow:none}.game-stats>span{background:#182025;border:1px solid #384950;box-shadow:none;color:#9db3ba;border-radius:7px}.game-stats b{color:#e7efdf;font-size:25px}.game-stats>span:before{background:none;opacity:.85}.game-area{background:#10181d;border:7px solid #0f161a;border-radius:9px;box-shadow:0 0 0 1px #48535a,0 4px 8px #0003}.game-splash>.game-art{filter:brightness(.74)}.player-actions .primary,.primary{background:#bcf278;color:#203820;box-shadow:0 3px 0 #668247;border-radius:6px;min-height:44px}.primary:hover{background:#c8fa8d}.player-actions p{color:#acbdc0}.game-info{background:#1d262b;border:1px solid #36444a;border-radius:12px;padding:22px}.game-info h2{color:#e8f0eb;font-size:18px}.game-info p,.game-info ol{color:#acbfc5}.game-info ol li:before{background:#33453e;color:#d4edb4;border-radius:5px}.game-info .storage-note{color:#a5b8bf;border-color:#3d4e55}.leaderboard{background:#172125;border:1px solid #41534f;border-radius:8px;box-shadow:none;padding:16px}.ranking-title h2{font-size:18px}.ranking-title button{background:#26362e;color:#d5e8c5;border-color:#4a6152;border-radius:5px;font-size:12px}.game-info .ranking-rule{color:#a9bdb8}.player-identity{background:#293c35;border:1px solid #415d4f;border-radius:6px;color:#c6d4ce}.player-identity small{color:#b3c9bc}.player-identity strong{color:#e0edce}.game-info .ranking-list li{border-color:#354b42;color:#d8e3da}.rank-number{color:#a7bdb2}.ranking-list li:nth-child(-n+3) .rank-number{background:#526d42;color:#e3efc4;border-radius:4px}.ranking-list .is-me{background:#2c4236;border-radius:5px}.game-info .ranking-status,.leaderboard>small,.ranking-empty{color:#a6beb5}.direction-pad button{background:#32454c;color:#dfedef;border-color:#586c74;border-radius:6px}.direction-pad button:active{background:#1d3039}.touch-guide{background:#25362f;color:#c1d5c3;border-color:#3b5043}.listing .lead,.listing-note,.prose p{color:#afc1c4}.listing-note{background:#202c31;border:1px solid #3b4b53;border-radius:8px}.search-form input{background:#223137;color:#eef4ed;border:1px solid #53676e}.prose h2{color:#e6ede8}.nickname-dialog,.handheld-rules{background:#202c32;color:#e4eeea;border:1px solid #61716f;border-radius:14px;box-shadow:0 20px 90px #0008}.nickname-dialog h2,.handheld-rules h2{color:#e5efdf}.nickname-dialog input{background:#101e25;color:#e8efe6;border-color:#63806e;border-radius:6px}.nickname-dialog small,.nickname-hint{color:#b0c5bf}.nickname-error{color:#ffabb0}.nickname-actions button{background:#33454c;color:#dbe9e2;border-color:#60736f;border-radius:6px}.nickname-actions .primary{background:#bcf278;color:#203820}.nickname-dialog::backdrop,.handheld-rules::backdrop{background:#060c11bd}.finish-card{background:#101a24c9;backdrop-filter:none}.finish-card>span{background:#344b37;color:#e0efc9;border:1px solid #5d7052;border-radius:4px;letter-spacing:0}.finish-card .primary{background:#bcf278;color:#203820;border-radius:6px;box-shadow:0 3px 0 #64884c}.canvas-action{background:#263934;color:#d7ebce;border:1px solid #66816c;border-radius:6px;box-shadow:0 3px 0 #0e211b}.reaction-box{letter-spacing:0}.reaction-box.wait{background:#86474a}.reaction-box.go{background:#2f7e59}.reaction-box.result{background:#375f7b}.reaction-box.early{background:#575f75}.merge-board{background:#253237;padding:14px;gap:10px}.number-tile{box-shadow:inset 0 1px 0 #fff5,0 3px 0 #10212766;border-radius:7px}.memory-board{background:#263741;padding:15px;gap:10px}.memory-card{border-radius:8px;background:#506779;box-shadow:inset 0 1px 0 #91a6b3,0 4px 0 #192c3a}.memory-card.flipped{background:#f1ebdd;border:1px solid #fff}.memory-card.matched{background:#c8ddaa}.ttt-board{background:#243739;padding:16px;gap:10px}.ttt-board button{background:#dbe2d2;border-radius:8px;box-shadow:0 4px 0 #819c8b,inset 0 1px 0 #fff;color:#315e75;text-shadow:none}.ttt-board .mark-O{color:#a15449;text-shadow:none}.slider-board{background:#3f3b31;padding:14px;gap:10px}.slider-board button{background:#d9b578;color:#413b2e;border-radius:7px;box-shadow:inset 0 1px 0 #fff5,0 4px 0 #9a7d50}.slider-board .empty{border-color:#9f8e72;border-radius:7px}.lights-board{background:#202d38;padding:16px}.light-cell{border-radius:7px}.light-cell.on{background:#d7be7a;color:#695524;border-color:#e6d4a1;box-shadow:inset 0 1px 0 #fff8,0 3px 0 #95804d}.light-cell.off{background:#33414e;color:#738792;border-color:#536373;box-shadow:inset 0 3px 4px #14232b}.mines-wrap{background:#b8cdbb}.mines-board button{border-radius:3px;background:#7f9e87;box-shadow:inset 0 1px 0 #c7d8c9,inset 0 -2px 0 #56715d}.mines-board button.opened{background:#d9e4d6}.sudoku-wrap{background:#d9d8c9}.sudoku-board{border-color:#758f8d;background:#758f8d;border-radius:5px}.sudoku-board button{border-radius:2px;background:#f0f0e3;color:#3e6970}.sudoku-board .fixed{background:#c9d3c8;color:#3a5658}.sudoku-board .selected{background:#b6d7ce;box-shadow:inset 0 0 0 2px #568d82}.sudoku-palette button{background:#edeada;color:#4b615e;border-color:#8a9e8f;border-radius:5px;box-shadow:0 3px 0 #8b9d8f}.connect-board{background:#33546b;border-color:#6a8798;border-radius:8px;box-shadow:inset 0 -4px 0 #213e51}.connect-cell.red{background:radial-gradient(at 35% 25%,#e79b83,#af5c51);color:#71322d}.connect-cell.yellow{background:radial-gradient(at 35% 25%,#f2df9f,#bf9c56);color:#67522b}.star-wrap{background:#263345}.star-board button{border-radius:7px;background:#1d293a;border-color:#53647744}.star-board .target{background:#dcc17e;color:#fff0b7;box-shadow:inset 0 1px 0 #f4e2b7,0 3px 0 #9c7f45}.star-board .decoy{color:#526478}body #site-message-box{background:#1c272c;border-top:1px solid #3c4b51;color:#b9c9cb}body #site-message-box h2{color:#e3ebe5}body #site-message-box input,body #site-message-box textarea,body #site-message-box select{background:#132027;color:#dce8e3;border-color:#5c7379}body #site-message-box button{background:#b8ed7c;color:#243b23}.game-info .ranking-list li::before{content:none;display:none}
/* Original game components */
.mole-garden{width:100%;background:#a9be91;padding:20px 24px}.mole-scoreline{display:flex;justify-content:space-between;color:#3a5738;font-size:15px;margin:0 0 20px}.mole-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.mole-grid button{aspect-ratio:1.2;border:0;position:relative;background:transparent;padding:0;overflow:hidden;border-radius:45%}.mole-grid button:before{content:'';position:absolute;bottom:5px;inset-inline:4px;height:40%;border-radius:50%;background:#514331;box-shadow:inset 0 5px 6px #2f3025,inset 0 -2px 0 #dac399}.mole-head{position:absolute;width:67%;height:73%;bottom:-70%;left:16%;background:#a77d52;border-radius:50% 50% 40% 40%;box-shadow:inset -9px 0 0 #87643f;transition:bottom .1s;pointer-events:none}.mole-grid .up .mole-head{bottom:17%}.mole-head:before,.mole-head:after{content:'';position:absolute;top:29%;width:7px;height:10px;border-radius:50%;background:#2c302b;box-shadow:0 -2px 0 #e3bd91}.mole-head:before{left:22%}.mole-head:after{right:22%}.mole-head i{position:absolute;left:35%;bottom:24%;width:30%;height:20%;border-radius:50%;background:#d6b18b}.code-wrap{width:100%;max-width:440px;background:#243440;padding:18px}.code-secret,.code-guess{display:flex;justify-content:center;gap:12px;margin-bottom:15px}.code-secret>span{display:grid;place-items:center;background:#14222b;border:1px solid #4d6470;width:34px;height:34px;border-radius:50%;font-weight:700}.peg{display:block;flex-shrink:0;width:29px;height:29px;border-radius:50%;border:1px solid #ffffff55;box-shadow:inset 0 3px 2px #fff3,inset 0 -3px 3px #0003}.p0{background:#71dcb5}.p1{background:#ffc873}.p2{background:#889bf4}.p3{background:#ec8bac}.p4{background:#82c9ed}.p5{background:#d9e6ed}.peg.blank{background:#13242c;box-shadow:inset 0 3px 4px #0003;border-color:#50616a}.code-history{margin-bottom:18px}.code-row{display:flex;align-items:center;gap:10px;margin:8px 0;min-height:33px}.code-row>b{font-size:11px;color:#a2b7c4;width:12px}.code-row>div{display:flex;gap:8px}.code-row .peg{width:25px;height:25px}.code-row small{font-size:10px;color:#c7d5dc;line-height:1.4;max-width:120px}.code-palette{display:flex;justify-content:center;gap:10px;margin:14px 0}.code-palette button{min-width:40px;min-height:40px;font-size:12px;color:#21303d}.code-palette button:disabled{opacity:.35}.code-actions{display:flex;gap:12px;justify-content:center}.code-actions button{border:1px solid #637d8a;background:#344d5b;color:#dce8e5;border-radius:5px;padding:8px 18px;min-height:44px}.code-actions button:disabled{opacity:.4}.reversi-wrap{width:100%;max-width:430px;background:#2d5949;padding:15px}.reversi-count{display:flex;justify-content:center;font-size:16px;color:#dbe6d2;margin-bottom:12px;word-spacing:15px}.reversi-board{display:grid;grid-template-columns:repeat(8,1fr);gap:1px;background:#183e32;border:3px solid #173d31}.reversi-board button{aspect-ratio:1;background:#396d56;border:0;padding:4px;position:relative;min-width:0}.reversi-board .legal:after{content:'';position:absolute;left:42%;top:42%;width:16%;height:16%;border-radius:50%;background:#c1dc9c}.reversi-board .black span,.reversi-board .white span{width:100%;height:100%;display:block;border-radius:50%;background:radial-gradient(at 35% 25%,#657069,#171f20);box-shadow:0 3px 2px #142f27aa}.reversi-board .white span{background:radial-gradient(at 35% 25%,#fffef2,#b3beb0)}.jewels-wrap{width:100%;max-width:440px;padding:17px;background:#3a3044}.jewels-line{display:flex;justify-content:space-between;font-size:14px;color:#dfcee0;margin-bottom:13px}.jewels-board{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.jewel{min-width:0;aspect-ratio:1;border:1px solid #ffffff25;border-radius:7px;background:#252534;padding:3px;box-shadow:inset 0 2px 3px #0003}.jewel span{font-size:36px;line-height:1;display:block;text-shadow:0 3px 0 #0005;filter:drop-shadow(0 0 3px currentColor)}.j0{color:#91d9b7}.j1{color:#f3c078}.j2{color:#b5a3e5}.j3{color:#e99eab}.j4{color:#88c7de}.jewel.selected{background:#fff2b833;border:2px solid #f1dc9e}.ready-card{background:#12202a9c;backdrop-filter:none;color:#eef6e5}
@media(min-width:1450px){.portal .wall{grid-auto-rows:auto}}@media(max-width:1100px){.portal .wall{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.portal-search{min-width:220px}.category-nav a{padding:8px 17px}.game-layout{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.game-info{padding:16px}.inner-header{padding-inline:24px}.portal .category-tile strong{font-size:16px}}@media(max-width:850px){.portal .wall{grid-template-columns:repeat(4,minmax(0,1fr))}.portal-intro{display:block;padding-top:24px}.portal-intro p{margin-top:7px}.portal-toolbar{align-items:flex-start}.portal-search{min-width:200px;max-width:220px}.portal .category-nav a{padding:7px 14px}.game-layout{grid-template-columns:1fr}.game-info{padding:20px}}@media(max-width:680px){.portal{padding:0 12px}.inner-header{height:66px;padding:0 15px}.brand{font-size:28px}.brand span{font-size:9px}.inner-header nav{font-size:11px;gap:17px}.inner-header nav a:nth-child(2),.inner-header nav a:nth-child(3){display:none}.portal-intro{padding:23px 2px 16px}.portal-intro h1{font-size:23px}.portal-intro p{font-size:11px;margin-top:6px}.portal-toolbar{display:flex;flex-direction:column;gap:13px;padding-bottom:17px}.portal-toolbar .category-nav{display:flex;flex-wrap:nowrap;width:100%;gap:6px}.portal .category-nav a{flex:1;text-align:center;padding:7px 4px;font-size:12px}.portal-search{width:100%;max-width:none;height:42px}.portal .wall{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:9px}.portal .wall .game-tile{grid-column:span 1;grid-row:span 1;aspect-ratio:1;border-radius:7px}.portal .wall .tile-hop{grid-column:span 2;grid-row:span 2}.portal .wall .tile-hop .tile-caption{padding:40px 14px 13px}.portal .wall .tile-hop .tile-caption strong{font-size:21px}.portal .wall .tile-hop .tile-caption small{font-size:10px}.portal .wall .tile-caption{padding:20px 7px 7px}.portal .wall .tile-caption strong{font-size:11px}.portal .wall .tile-caption small{display:none}.portal .wall .tile-hop .tile-caption small{display:block}.favorite{right:4px;top:4px;width:30px;height:30px;min-width:30px;min-height:30px;font-size:20px}.portal .wall .category-tile{grid-column:span 1;grid-row:span 1;padding:12px;border-radius:7px;display:flex}.portal .category-tile strong{font-size:12px}.portal .category-tile small{font-size:9px;margin-top:4px;line-height:1.4}.portal .category-tile>span{font-size:30px;bottom:6px;right:11px}.home-content{padding:18px 0}.home-about h2{font-size:18px}.home-about p{font-size:12px}.card-grid,.recent-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.site-footer{margin-top:22px;padding:24px 16px}.game-page{padding-left:10px;padding-right:10px}.breadcrumb{margin:13px 4px 15px}.player{padding:16px 12px 19px;border:1px solid #6e746e;border-radius:23px 23px 43px 23px;background:linear-gradient(115deg,#444c49,#343c3a);box-shadow:inset 0 1px 0 #858f83,inset 0 -5px 0 #1b2423,0 7px 0 #0e1617,0 16px 24px #0005;overflow:hidden}.player:after{content:'pokicon';text-align:left;padding-left:8px;font-size:12px;letter-spacing:-.7px;font-style:italic;color:#a9b6aa;margin-top:13px;font-weight:800}.player-heading{padding:0 4px;margin-bottom:10px}.player h1{font-size:17px;line-height:1.4;margin:2px 0;color:#edf0e5;font-weight:650}.player .tag{font-size:8px;letter-spacing:1px;color:#a0b6ac}.player-heading button{background:#28312e;border:1px solid #68766d;border-radius:5px;box-shadow:inset 0 1px 0 #87938644,0 2px 0 #15211d;color:#d5e1d2;font-size:10px;min-height:36px;padding:4px 8px}.game-stats{gap:7px;margin:8px 0 10px}.game-stats>span{background:#1b2928;border:1px solid #5e7469;border-radius:4px;padding:6px 11px;box-shadow:inset 0 2px 4px #0c181b88;color:#98b4aa;font-size:9px;min-width:0;flex:1}.game-stats>span:before{display:none}.game-stats b{color:#d7e9ba;font:700 23px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px}.touch-guide{background:transparent;border:0;border-radius:0;padding:0 4px;color:#b8c9bc;font-size:10px;line-height:1.6;margin:0 0 8px}.game-area{border:9px solid #10191a;border-top-width:12px;border-bottom-width:19px;border-radius:9px 9px 17px 9px;background:#102020;box-shadow:0 1px 0 #849185,0 0 0 1px #202c27,inset 0 2px 6px #0007}.game-area canvas{border-radius:1px}.game-splash{min-height:0}.game-splash strong{font-size:23px}.game-splash small{font-size:10px;color:#dae5df}.handheld-controls{grid-template-columns:143px minmax(0,1fr);padding-bottom:28px;margin-top:18px;min-height:147px;gap:10px}.handheld-controls:has(.direction-pad:not([hidden])){min-height:170px}.direction-pad{width:138px;height:138px;position:relative;display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);margin:0;filter:drop-shadow(0 4px 1px #0007)}.direction-pad:before{content:'';position:absolute;inset:0;clip-path:polygon(33% 0,67% 0,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0 67%,0 33%,33% 33%);background:#151d1c;border-top:1px solid #657367}.direction-pad:after{content:'';grid-row:2;grid-column:2;z-index:2;pointer-events:none;width:22px;height:22px;border-radius:50%;align-self:center;justify-self:center;background:#222d28;box-shadow:inset 0 2px 3px #080f0d,0 1px 0 #4b5b4b}.direction-pad>div{display:contents}.direction-pad button{width:46px;height:46px;min-width:46px;min-height:46px;margin:0;border-radius:3px;border:0;background:#1c2822;color:#9aafa1;box-shadow:inset 0 1px 0 #5a6a56,inset 0 -2px 0 #0e1712;font-size:21px;z-index:1;padding:0}.direction-pad button[data-dir=up]{grid-column:2;grid-row:1}.direction-pad button[data-dir=down]{grid-column:2;grid-row:3}.direction-pad button[data-dir=left]{grid-column:1;grid-row:2}.direction-pad button[data-dir=right]{grid-column:3;grid-row:2}.direction-pad button:active{background:#111e17;transform:translateY(1px);box-shadow:inset 0 3px 4px #0008}.player-actions{gap:14px;padding-bottom:8px}.player-actions #start-game,.player-actions #pause-game,.player-actions #handheld-help{width:58px;height:58px;min-width:58px;min-height:58px;border:5px solid #25312a;box-shadow:0 3px 0 #111a16,inset 0 2px 0 #e5ffb388,inset 0 -3px 0 #718849;background:linear-gradient(135deg,#c4e79b,#94b776);color:#243c22;transform:translateY(12px)}.player-actions #start-game:before{font-size:24px;text-shadow:0 1px 0 #d5efb0;font-style:italic}.player-actions #pause-game,.player-actions #handheld-help{background:linear-gradient(135deg,#485e4d,#2a3b31);color:#bfd0bb;box-shadow:0 3px 0 #111a16,inset 0 1px 0 #7c9278,inset 0 -2px 0 #15231a;transform:translateY(-12px)}.player-actions #pause-game:before,.player-actions #handheld-help:before{font-size:24px;text-shadow:0 1px 0 #182d20;font-style:italic}.player-actions #start-game:after,.player-actions #pause-game:after,.player-actions #handheld-help:after{color:#b5c6b6;font-size:9px;letter-spacing:1px;top:59px}.player-actions #game-status{font-size:10px;color:#b6c9ba;line-height:1.6}.handheld-grip{gap:6px;transform:rotate(-12deg)}.handheld-grip span{background:#1a2720;box-shadow:inset 0 2px 2px #0b1510,0 1px 0 #60715b;width:5px;height:48px;border-radius:4px}.handheld-grip small{display:none}.game-info{background:#1d262b;border:1px solid #3c4b51;border-radius:9px;margin-top:9px}.leaderboard{border-radius:6px;padding:13px}.game-info h2{font-size:17px}.player-actions #handheld-help{display:inline-flex}.player-actions:has(#pause-game:not([hidden])) #handheld-help{display:none}.mines-wrap{padding:6px}.mines-toolbar button{background:#d5dfc9;border-color:#6b8a72;color:#34523d}.code-wrap{padding:10px}.code-row{gap:7px}.code-row>div{gap:7px}.code-row .peg{width:23px;height:23px}.code-row small{font-size:9px}.code-palette{gap:5px}.code-palette button{width:37px;min-width:37px;min-height:40px}.code-actions{gap:9px}.code-actions button{font-size:12px;padding:8px 11px}.mole-garden{padding:14px}.mole-grid{gap:11px}.mole-scoreline{font-size:12px;margin-bottom:12px}.reversi-wrap{padding:8px}.reversi-board button{padding:3px}.reversi-count{font-size:13px;margin-bottom:8px}.jewels-wrap{padding:10px}.jewels-board{gap:4px}.jewel{border-radius:4px}.jewel span{font-size:27px}.jewels-line{font-size:12px}.canvas-action{background:#283d30;color:#e1ebd2;border-color:#7a9174;border-radius:4px;font-size:10px;padding:5px 9px;min-height:40px}.reaction-box{min-height:220px;font-size:26px}.finish-card>strong{font-size:18px}.finish-card>span{font-size:10px}.finish-card .primary{font-size:12px;padding:8px 16px}.ready-card{font-size:28px}.merge-board,.slider-board,.ttt-board,.memory-board{padding:8px;gap:6px}.number-tile{border-radius:4px;font-size:24px}.n128,.n256,.n512{font-size:20px}.n1024,.n2048{font-size:16px}.ttt-board button{border-radius:5px;font-size:43px}.memory-card{border-radius:5px;font-size:27px}.slider-board button{border-radius:5px;font-size:35px}.player:fullscreen{background:#293c33}
}@media(max-width:359px){.player{padding:14px 10px 17px}.handheld-controls{grid-template-columns:130px minmax(0,1fr);gap:5px}.direction-pad{width:126px;height:126px;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(3,42px)}.direction-pad button{width:42px;height:42px;min-width:42px;min-height:42px}.player-actions{gap:9px}.player-actions #start-game,.player-actions #pause-game,.player-actions #handheld-help{width:51px;height:51px;min-width:51px;min-height:51px;border-width:4px}.player-actions #start-game:after,.player-actions #pause-game:after,.player-actions #handheld-help:after{top:52px}.code-row{gap:5px}.code-row>div{gap:5px}.code-palette button{width:33px;min-width:33px}.portal .wall{gap:7px}.portal .wall .tile-caption strong{font-size:10px}}
#handheld-a,#handheld-start{display:none}@media(max-width:680px){.player-actions #start-game{display:none}.player-actions #handheld-a{display:inline-flex;align-items:center;justify-content:center;position:relative;width:58px;height:58px;min-width:58px;min-height:58px;flex:none;border:5px solid #25312a;border-radius:50%;background:linear-gradient(135deg,#c4e79b,#94b776);color:#243c22;box-shadow:0 3px 0 #111a16,inset 0 2px 0 #e5ffb388,inset 0 -3px 0 #718849;font-size:25px;font-weight:900;font-style:italic;transform:translateY(12px);padding:0}.player-actions #handheld-a:after{content:attr(data-label);position:absolute;top:59px;left:50%;transform:translateX(-50%);font-size:9px;letter-spacing:0;white-space:nowrap;color:#b5c6b6;font-style:normal;font-weight:500}.player-actions #handheld-a:active{transform:translateY(14px);box-shadow:0 1px 0 #111a16,inset 0 2px 4px #607a3f}.player-actions #handheld-start{position:absolute;display:inline-flex;bottom:-23px;left:50%;transform:translateX(-50%) rotate(-10deg);background:#17261f;color:#9db09c;border:1px solid #5e735e;border-radius:10px;height:27px;min-height:27px;padding:0 12px;font:9px ui-monospace,monospace;letter-spacing:1px;box-shadow:0 2px 0 #0d1810}.player:after{margin-top:22px}.player-actions #handheld-start:active{transform:translateX(-50%) rotate(-10deg) translateY(1px)}.player-actions #game-status{bottom:2px}}@media(max-width:359px){.direction-pad{width:132px;height:132px;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px)}.direction-pad button{width:44px;height:44px;min-width:44px;min-height:44px}.handheld-controls{grid-template-columns:134px minmax(0,1fr)}.player-actions #handheld-a{width:51px;height:51px;min-width:51px;min-height:51px;border-width:4px}.player-actions #handheld-a:after{top:52px}}
.player:fullscreen{background:#222a2f;color:#f1f4ee}.code-secret .peg{width:34px;height:34px}.reversi-board button:disabled{opacity:1}.mole-grid button:disabled{opacity:1}.code-wrap button:disabled{cursor:default}

/* Faceted in-game gems, with shape and color for readable play. */
.jewel span{font-size:0;width:85%;height:85%;margin:auto;position:relative;aspect-ratio:1;filter:drop-shadow(0 3px 1px #141929)}.jewel span:before{content:'';position:absolute;inset:0;background:conic-gradient(from 45deg,#fff8,#fff1 24%,#0003 25%,#0001 48%,#fff4 50%,#0003 74%,#fff8 75%,#fff2);border:1px solid #fffa}.j0 span{background:#61ba96;clip-path:polygon(20% 0,80% 0,100% 30%,100% 70%,80% 100%,20% 100%,0 70%,0 30%)}.j1 span{background:#d3a23f;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.j2 span{background:#9774c0;clip-path:polygon(50% 0,100% 100%,0 100%)}.j3 span{background:#c86b88;clip-path:polygon(50% 0,64% 34%,100% 50%,64% 64%,50% 100%,34% 64%,0 50%,34% 34%)}.j4 span{background:#5aabc3;clip-path:polygon(20% 0,80% 0,100% 20%,100% 80%,80% 100%,20% 100%,0 80%,0 20%)}
@media(max-width:680px){.code-palette button{color:#172c30}.player-actions #handheld-a{touch-action:none;user-select:none;-webkit-user-select:none}.handheld-controls button{touch-action:none}.portal .favorite{width:32px;height:32px;min-width:32px;min-height:32px}}

/* Layout grounded in the supplied Poki game-detail reference. Own artwork and identity. */
:root{--bg:#83f4df;--panel:#fff;--panel-2:#edf9f6;--line:#c6e4df;--ink:#133e53;--muted:#416f7a;--accent:#087ab8;color-scheme:light}body{background:#83f4df;color:#143e53}body:before{display:block;background:linear-gradient(154deg,transparent 44%,#24d6ca22 44% 65%,transparent 65%),linear-gradient(27deg,transparent 65%,#c3fff333 65%);pointer-events:none}h1,h2,h3{color:#143e53}a:hover{color:#077aaf}.inner-header{height:65px;background:#ffffff8a;border-color:#5cbcb744;max-width:1440px;margin:auto;padding:0 24px;border-radius:0 0 12px 12px}.brand{color:#123b54}.brand span{color:#407c8c}.inner-header nav{color:#245c71}.inner-header nav a:hover{color:#087eaf}.home>.inner-header{display:none}.portal{max-width:1440px;padding:20px 22px 0}.portal .wall{grid-template-columns:repeat(8,minmax(0,1fr));gap:14px}.portal .brand-tile{grid-column:span 1;grid-row:span 1;aspect-ratio:1;background:#fff;border-radius:13px;box-shadow:0 4px 0 #135a5a13;display:flex;justify-content:space-between}.portal .brand-tile h1{font-size:25px;color:#0a425e;letter-spacing:-1.8px;margin:28px 8px 8px}.portal .brand-tile h1 span{font-size:10px;letter-spacing:2px;margin-top:8px;color:#3c8fa5}.portal .brand-tile a{height:40px;font-size:23px;color:#1385b0}.portal .game-tile{border:0;border-radius:12px;box-shadow:0 4px 0 #19565016}.portal .wall .tile-hop{grid-column:span 2;grid-row:span 2}.portal .wall .category-tile{background:#e4faf3;border:0;box-shadow:0 4px 0 #19565016;color:#245c70;border-radius:12px;padding:20px}.portal .wall .tile-puzzle{background:#fff0b6}.portal .category-tile small{color:#467c82}.portal .category-tile>span{color:#3c8e9b}.portal .category-tile.tile-puzzle>span{font-size:25px}.portal-toolbar{padding:27px 0 0}.category-nav a{background:#ffffffa6;border-color:#ffffff4d;color:#276476;border-radius:22px;box-shadow:0 2px 0 #25696910}.category-nav a:hover,.portal-toolbar .category-nav a:first-child{background:#fff;color:#076da1;border-color:#fff}.portal-search{background:#fff;border-color:#70b8b1;border-radius:9px}.portal-search input{color:#24586c}.portal-search input::placeholder{color:#5a858d}.portal-search button{background:#effaf6;color:#17789b;border-left-color:#badcd5;min-width:60px;white-space:nowrap}.home-content{padding-top:5px}.home-about{border-color:#65b8ad66}.home-about h2{color:#1b5a6c}.home-about p{color:#316c77}.home-about a{color:#0878a4}.site-footer{border-color:#5caea455;color:#356f78}.site-footer .brand{color:#17485e}.site-footer .brand span,.site-footer p{color:#427a82}.listing .lead,.listing-note,.prose p{color:#356d79}.listing-note{background:#ffffff8c;border-color:#9ad9cb}.prose h2{color:#185a6b}.search-form input{background:#fff;color:#24586c;border-color:#75b5b2}.game-tile:hover{border-color:transparent;box-shadow:0 7px 0 #19565020}.reference-layout{max-width:1440px;margin:auto;padding:20px 22px 28px}.reference-stage{display:grid;grid-template-columns:86px minmax(0,1fr) 280px;gap:16px;align-items:start}.game-rail{display:flex;flex-direction:column;gap:15px}.rail-brand{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 0 #1f65651a}.rail-brand>.brand{display:block;text-align:center;font-size:18px;letter-spacing:-1.3px;padding:15px 3px 10px}.rail-brand>.brand>span{display:block;font-size:8px;letter-spacing:1px;margin:3px 0 0;color:#4a8ba0}.rail-brand>div{display:flex;border-top:1px solid #dfefeb}.rail-brand>div>a{flex:1;text-align:center;font-size:10px;color:#2281a4;padding:8px 0;min-height:32px}.rail-brand>div>a+a{border-left:1px solid #dfefeb}.rail-game{aspect-ratio:1;border-radius:12px;overflow:hidden;box-shadow:0 4px 0 #1f65651a;transition:transform .15s}.rail-game:hover{transform:translateY(-3px)}.play-column{min-width:0}.reference-stage .player{background:#fff;border:0;border-radius:13px;padding:0;overflow:hidden;box-shadow:0 4px 0 #1a636319;display:flex;flex-wrap:wrap;position:relative}.reference-stage .player-heading{order:2;padding:15px 17px 5px;width:100%;margin:0;min-height:68px;align-items:center}.reference-stage .player-heading h1{font-size:20px;color:#143e53;line-height:1.35;margin:0 0 3px}.reference-stage .player-heading .tag{font-size:10px;color:#55818d;letter-spacing:0}.reference-stage .player-heading button{background:#edf9f5;color:#187c9e;border:1px solid #c7e5df;border-radius:7px;min-height:40px;padding:5px 12px;box-shadow:none}.reference-stage .game-area{order:0;width:100%;border:0;box-shadow:none;border-radius:13px 13px 0 0;min-height:0;background:#edf8f2;aspect-ratio:4/3;overflow:hidden}.reference-stage .game-area canvas{max-height:100%;width:100%;height:auto;aspect-ratio:4/3;display:block}.reference-stage .game-splash{max-height:none;aspect-ratio:4/3;min-height:0}.reference-stage .game-splash strong{font-size:36px}.reference-stage .game-stats{order:1;position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:flex-end;gap:7px;margin:0;pointer-events:none;z-index:2}.reference-stage .game-stats>span{flex:0 1 auto;min-width:70px;background:#163d4be6;border:1px solid #ffffff35;color:#deece6;border-radius:7px;padding:5px 10px;font-size:9px;box-shadow:0 2px 6px #163e4c20}.reference-stage .game-stats>span:before{display:none}.reference-stage .game-stats b{font-size:19px;color:#fff7ce;line-height:1.15}.reference-stage .handheld-controls{display:contents}.reference-stage .player-actions{order:3;display:flex;align-items:center;flex-wrap:wrap;padding:5px 17px 17px;margin:0;gap:10px;width:100%}.reference-stage .player-actions #game-status{color:#507b88;font-size:12px;width:auto;flex:1;min-width:190px;margin:0}.reference-stage .primary,.primary{background:#2489cb;color:white;box-shadow:0 3px 0 #156ca7;border-radius:7px}.reference-stage .primary:hover,.primary:hover{background:#309bdd}.reference-stage .player-actions button:not(.primary){background:#eef8f8;color:#2f748d;border-color:#c2dfdf}.reference-stage .direction-pad{order:4;width:100%;padding-bottom:16px;margin:0;height:auto;filter:none}.reference-stage .direction-pad button{background:#e4f2f4;color:#2c728f;border:1px solid #b9d8df;border-radius:7px;min-width:48px;min-height:44px;height:44px;box-shadow:0 3px 0 #c4dce0}.reference-stage .direction-pad:before,.reference-stage .direction-pad:after{display:none}.reference-stage .touch-guide{display:none}.stage-sidebar{min-width:0}.stage-sidebar .leaderboard{background:#fff;border:0;border-radius:12px;box-shadow:0 4px 0 #1a636319;padding:18px;margin:0 0 20px}.stage-sidebar .leaderboard h2{font-size:18px;color:#164a60}.stage-sidebar .ranking-title button{background:#edf8f8;color:#23778f;border-color:#c3e2e2;border-radius:6px}.stage-sidebar .ranking-rule{color:#4e7a84;font-size:12px}.stage-sidebar .player-identity{background:#edf8f3;border:1px solid #d6e9df;color:#47736d;border-radius:7px;padding:10px;font-size:11px}.stage-sidebar .player-identity strong{color:#215d5e;font-size:14px}.stage-sidebar .player-identity small{color:#5c8278;font-size:10px}.stage-sidebar .ranking-list{list-style:none;padding:0;margin:10px 0;max-height:285px;overflow:auto}.stage-sidebar .ranking-list li{display:flex;gap:8px;align-items:center;padding:9px 4px;border-bottom:1px solid #e3efea;font-size:12px}.stage-sidebar .ranking-list .ranking-empty{font-size:12px;padding:8px 0;color:#537b83}.stage-sidebar .ranking-list .is-me{background:#e9f6e8}.stage-sidebar .rank-number{color:#4d7b74}.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-number{background:#ffedb3;color:#86652a}.stage-sidebar .rank-value{font-size:11px;color:#215d67}.stage-sidebar .ranking-status,.stage-sidebar .leaderboard>small{color:#5a8187;font-size:10px}.side-label{font-size:14px;color:#256372;margin:0 0 11px}.side-games{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.side-games .game-tile{aspect-ratio:1;border:0;border-radius:12px;box-shadow:0 3px 0 #1f656519}.side-games .tile-caption strong{font-size:11px}.side-games .tile-caption small{display:none}.side-games .tile-caption{padding:20px 9px 9px}.side-games .favorite{width:29px;height:29px;min-width:29px;min-height:29px;right:6px;top:6px;font-size:19px}.game-description{padding:25px 9px 10px}.game-description .breadcrumb{color:#4b7b83;margin:0 0 18px;font-size:10px}.game-description h2{color:#185267;font-size:20px;margin:24px 0 10px}.game-description p,.game-description ol{font-size:13px;color:#3a727d;line-height:1.9}.game-description li{margin-bottom:7px}.game-description .storage-note{font-size:11px;color:#548187;border-top:1px solid #70bdb055;padding-top:14px}.reference-layout .related{margin:25px 0}.reference-layout .related h2{font-size:20px;color:#225d6b}.reference-layout .related .card-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:14px}.reference-layout .related .game-tile{border:0;border-radius:12px;box-shadow:0 3px 0 #1f65651a}.reference-layout .related .tile-caption strong{font-size:12px}.reference-layout .related .tile-caption small{display:none}.reference-layout .related .tile-caption{padding:24px 10px 10px}.nickname-dialog,.handheld-rules{background:#fff;color:#244f61;border-color:#c4dddc;border-radius:14px}.nickname-dialog h2,.handheld-rules h2{color:#1b4f66}.nickname-dialog input{background:#f6fcf9;color:#234e5d;border-color:#96bfb5}.nickname-dialog small,.nickname-hint{color:#507b7d}.nickname-error{color:#b83a4c}.nickname-actions button{background:#edf7f5;color:#356b73;border-color:#b4d7d2}.nickname-actions .primary{background:#2489cb;color:#fff}.finish-card .primary{background:#fff;color:#236c9f;box-shadow:0 3px 0 #b6d0dd}.finish-card>span{background:#fff4d5;color:#8e6d27;border-color:#f4dfaa}.finish-card{background:#153a50a8;backdrop-filter:blur(2px)}body #site-message-box{background:#e2f9f3;color:#44777a;border-top-color:#a4dace}body #site-message-box h2{color:#205b6d}body #site-message-box input,body #site-message-box textarea,body #site-message-box select{background:#fff;color:#285869;border-color:#abd5cf}body #site-message-box button{background:#2489cb;color:#fff}.search-form .primary{color:#fff}.game-description .storage-note{max-width:680px}
@media(min-width:1500px){.reference-layout,.portal{max-width:1460px}.reference-stage{grid-template-columns:92px minmax(0,1fr) 290px}}@media(max-width:1150px){.portal .wall{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.reference-stage{grid-template-columns:74px minmax(0,1fr) 230px;gap:13px}.reference-layout{padding:16px}.rail-brand>.brand{font-size:16px}.game-rail{gap:12px}.stage-sidebar .leaderboard{padding:14px}.reference-layout .related .card-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.reference-stage .player-actions{padding-inline:13px}.reference-stage .player-heading{padding-inline:13px}}@media(max-width:900px){.reference-stage{grid-template-columns:66px minmax(0,1fr);gap:12px}.stage-sidebar{grid-column:2;display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:start}.stage-sidebar .side-label{display:none}.stage-sidebar .leaderboard{margin:0}.game-description{padding-top:15px}.rail-brand>.brand{font-size:14px}.rail-brand>.brand>span{font-size:7px}.rail-brand>div>a{font-size:9px}.reference-layout .related .card-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.portal .wall{grid-template-columns:repeat(5,minmax(0,1fr))}.portal .brand-tile h1{font-size:23px}}
@media(max-width:680px){.portal{padding:13px 12px 0}.portal .wall{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.portal .brand-tile{grid-column:span 1;grid-row:span 1;border-radius:10px;min-height:0}.portal .brand-tile h1{font-size:19px;margin:19px 5px 6px;letter-spacing:-1.2px}.portal .brand-tile h1 span{font-size:8px;letter-spacing:1px;margin-top:6px}.portal .brand-tile a{height:31px;font-size:20px}.portal .wall .category-tile{padding:12px;border-radius:10px}.portal-toolbar{padding-top:20px}.portal .category-tile strong{font-size:12px}.portal .category-tile>span{font-size:29px}.portal .category-tile.tile-puzzle>span{font-size:19px}.reference-layout{padding:13px 10px 24px}.reference-stage{display:block}.game-rail{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0 4px 15px}.rail-brand{display:flex;align-items:center;justify-content:space-between;background:transparent;box-shadow:none;border-radius:0;width:100%;overflow:visible}.rail-brand>.brand{padding:0;font-size:27px;letter-spacing:-1.7px;display:flex;align-items:center;gap:8px}.rail-brand>.brand>span{font-size:9px;letter-spacing:0;margin:0;color:#3e7e88}.rail-brand>div{border:0;gap:17px}.rail-brand>div>a{font-size:12px;padding:6px 0;min-height:32px}.rail-brand>div>a+a{border:0}.rail-game{display:none}.reference-stage .player{display:block;background:linear-gradient(115deg,#444c49,#343c3a);padding:16px 12px 19px;border:1px solid #6e746e;border-radius:23px 23px 43px 23px;box-shadow:inset 0 1px 0 #858f83,inset 0 -5px 0 #1b2423,0 7px 0 #0e1617,0 16px 24px #235d5a40;overflow:hidden}.reference-stage .player-heading{display:flex;padding:0 4px;margin:0 0 10px;min-height:0;align-items:center}.reference-stage .player-heading h1{font-size:17px;color:#edf0e5;margin:2px 0;font-weight:650}.reference-stage .player-heading .tag{font-size:8px;letter-spacing:1px;color:#a0b6ac}.reference-stage .player-heading button{background:#28312e;border:1px solid #68766d;border-radius:5px;box-shadow:inset 0 1px 0 #87938644,0 2px 0 #15211d;color:#d5e1d2;min-height:36px;padding:4px 8px;font-size:10px}.reference-stage .game-stats{position:static;display:flex;margin:8px 0 10px;gap:7px;pointer-events:auto;justify-content:normal}.reference-stage .game-stats>span{background:#1b2928;border:1px solid #5e7469;border-radius:4px;padding:6px 11px;box-shadow:inset 0 2px 4px #0c181b88;color:#98b4aa;font-size:9px;min-width:0;flex:1}.reference-stage .game-stats b{color:#d7e9ba;font:700 23px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px}.reference-stage .touch-guide{display:block;background:transparent;border:0;padding:0 4px;color:#b8c9bc;font-size:10px;line-height:1.6;margin:0 0 8px}.reference-stage .game-area{aspect-ratio:auto;border:9px solid #10191a;border-top-width:12px;border-bottom-width:19px;border-radius:9px 9px 17px 9px;background:#102020;box-shadow:0 1px 0 #849185,0 0 0 1px #202c27,inset 0 2px 6px #0007;overflow:hidden;min-height:0}.reference-stage .game-area canvas{width:100%;height:auto;aspect-ratio:4/3;max-height:none}.reference-stage .game-splash{aspect-ratio:4/3;max-height:none;min-height:0}.reference-stage .game-splash strong{font-size:23px}.reference-stage .handheld-controls{display:grid;grid-template-columns:143px minmax(0,1fr);padding-bottom:28px;margin-top:18px;min-height:147px;gap:10px;position:relative}.reference-stage .handheld-controls:has(.direction-pad:not([hidden])){min-height:170px}.reference-stage .player-actions{display:flex;grid-column:2;grid-row:1;gap:14px;padding:0 0 8px;margin:0;width:auto;justify-content:center;align-items:center;flex-wrap:nowrap}.reference-stage .player-actions #game-status{position:absolute;left:0;bottom:2px;width:100%;margin:0;min-height:0;min-width:0;font-size:10px;color:#b6c9ba;line-height:1.6;text-align:center;flex:none}.reference-stage .direction-pad{width:138px;height:138px;position:relative;display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);margin:0;padding:0;filter:drop-shadow(0 4px 1px #0007)}.reference-stage .direction-pad:before{content:'';display:block;position:absolute;inset:0;clip-path:polygon(33% 0,67% 0,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0 67%,0 33%,33% 33%);background:#151d1c;border-top:1px solid #657367}.reference-stage .direction-pad:after{content:'';display:block;grid-row:2;grid-column:2;z-index:2;pointer-events:none;width:22px;height:22px;border-radius:50%;align-self:center;justify-self:center;background:#222d28;box-shadow:inset 0 2px 3px #080f0d,0 1px 0 #4b5b4b}.reference-stage .direction-pad>div{display:contents}.reference-stage .direction-pad button{width:46px;height:46px;min-width:46px;min-height:46px;margin:0;border-radius:3px;border:0;background:#1c2822;color:#9aafa1;box-shadow:inset 0 1px 0 #5a6a56,inset 0 -2px 0 #0e1712;font-size:21px;z-index:1;padding:0}.reference-stage .player-actions #pause-game,.reference-stage .player-actions #handheld-help{background:linear-gradient(135deg,#485e4d,#2a3b31);color:#bfd0bb;border:5px solid #25312a;box-shadow:0 3px 0 #111a16,inset 0 1px 0 #7c9278,inset 0 -2px 0 #15231a}.reference-stage .player-actions #handheld-a{background:linear-gradient(135deg,#c4e79b,#94b776);color:#243c22;border:5px solid #25312a}.reference-stage .player-actions #handheld-start{min-height:27px;background:#17261f;color:#9db09c;border:1px solid #5e735e}.stage-sidebar{display:block;margin-top:30px}.stage-sidebar .leaderboard{padding:17px;border-radius:12px;margin:0 0 22px}.stage-sidebar .side-label{display:block;font-size:17px;margin-top:18px}.stage-sidebar .side-games{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.stage-sidebar .side-games .tile-caption{padding:20px 7px 7px}.stage-sidebar .side-games .tile-caption strong{font-size:10px}.game-description{padding:27px 6px 7px}.game-description h2{font-size:18px;margin:20px 0 9px}.game-description p,.game-description ol{font-size:12px}.reference-layout .related .card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.reference-layout .related .tile-caption strong{font-size:10px}.reference-layout .related .tile-caption{padding:20px 7px 7px}.reference-layout .related .favorite{width:28px;height:28px;min-width:28px;min-height:28px;right:5px;top:5px;font-size:18px}.stage-sidebar .leaderboard h2{font-size:18px}.reference-layout .related h2{font-size:19px}
}@media(max-width:359px){.reference-stage .player{padding:14px 10px 17px}.reference-stage .handheld-controls{grid-template-columns:134px minmax(0,1fr);gap:5px}.reference-stage .direction-pad{width:132px;height:132px;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px)}.reference-stage .direction-pad button{width:44px;height:44px;min-width:44px;min-height:44px}.reference-stage .player-actions{gap:9px}.reference-stage .player-actions #handheld-a,.reference-stage .player-actions #pause-game,.reference-stage .player-actions #handheld-help{width:51px;height:51px;min-width:51px;min-height:51px;border-width:4px}.reference-stage .player-actions #handheld-a:after,.reference-stage .player-actions #pause-game:after,.reference-stage .player-actions #handheld-help:after{top:52px}.portal .brand-tile h1{font-size:17px;margin-top:16px}}

@media(min-width:681px){.reference-stage .game-area{aspect-ratio:16/10}.reference-stage .game-area canvas{height:100%;width:auto;max-width:100%;aspect-ratio:4/3}.reference-stage .game-splash{aspect-ratio:16/10}.reference-stage .merge-board,.reference-stage .slider-board,.reference-stage .ttt-board,.reference-stage .memory-board{width:min(100%,520px);max-height:100%;height:auto}.reference-stage .mines-wrap,.reference-stage .reversi-wrap,.reference-stage .jewels-wrap{max-width:520px}.reference-stage .player-actions #game-status{min-width:150px}.reference-stage .player-heading{min-height:60px;padding-top:12px}.reference-stage .player-heading h1{font-size:19px}}
.reference-stage .player .game-stats>span:nth-child(2){background:#163d4be6;color:#deece6;border-color:#ffffff35}.reference-stage .player .game-stats>span:nth-child(2) b{color:#fff7ce}.portal-search button{flex:0 0 60px;white-space:nowrap}@media(max-width:680px){.reference-stage .player .game-stats>span:nth-child(2){background:#1b2928;color:#98b4aa;border-color:#5e7469}.reference-stage .player .game-stats>span:nth-child(2) b{color:#d7e9ba}.reference-stage .player .game-area canvas{height:auto;width:100%;max-height:none}}

.reference-stage .player #best-wrap{background:#163d4be6;color:#deece6;border-color:#ffffff35}.reference-stage .player #best-wrap b{color:#fff7ce}.game-splash .single-art img{object-position:center 25%}@media(max-width:680px){.reference-stage .player #best-wrap{background:#1b2928;color:#98b4aa;border-color:#5e7469}.reference-stage .player #best-wrap b{color:#d7e9ba}.game-splash .single-art img{object-position:center}}

/* Real game-over dialog, independent of the canvas size. */
.result-dialog.finish-card{position:fixed;inset:0;margin:auto;width:min(500px,calc(100% - 28px));height:fit-content;max-height:92dvh;padding:24px;border:0;border-radius:16px;background:#fff;color:#204c60;text-align:left;box-shadow:0 20px 80px #103b5b70;backdrop-filter:none;display:none;overflow:auto;gap:0}.result-dialog.finish-card[open]{display:block}.result-dialog::backdrop{background:#10394dbf}.result-dialog .result-badge{display:inline-block;font-size:11px;border:0;background:#e4f5f0;color:#4a7e75;border-radius:4px;padding:4px 8px;letter-spacing:0}.result-dialog h2{margin:13px 0 16px;font-size:21px;line-height:1.5;color:#16475d;text-shadow:none}.result-mine{padding:13px 15px;background:#e9f5fb;border:1px solid #c7e2ef;border-radius:9px;color:#1a6c96;font-weight:700;font-size:15px;line-height:1.5}.result-dialog h3{font-size:14px;color:#356778;margin:20px 0 10px}.result-ranking{padding:0;margin:0;list-style:none;max-height:310px;overflow:auto;overscroll-behavior:contain}.result-ranking li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;border-bottom:1px solid #e7f0ef;padding:9px 6px;font-size:13px;min-height:39px}.result-ranking li>b{display:grid;place-items:center;width:23px;height:23px;border-radius:5px;color:#60818c;font-size:12px}.result-ranking li:nth-child(-n+3)>b{background:#fff0bc;color:#906c2a}.result-ranking li>span{overflow-wrap:anywhere}.result-ranking li>strong{font-size:12px;color:#2c6475;white-space:nowrap}.result-ranking .is-me{background:#e8f6e9;border-radius:6px}.result-ranking .result-empty{display:block;color:#62848b;font-size:12px}.result-note{font-size:11px;color:#65858e;line-height:1.6;margin:13px 0 18px}.result-actions{display:flex;gap:9px;flex-wrap:wrap}.result-actions button{min-height:44px;border:1px solid #c8dddf;background:#eff7f6;color:#316b7e;border-radius:7px;padding:8px 16px;cursor:pointer;font:inherit;font-size:13px}.result-dialog .result-actions .primary{background:#2489cb;color:#fff;border:0;border-radius:7px;box-shadow:0 3px 0 #156ca7}.result-actions button:focus-visible{outline:3px solid #1286ba;outline-offset:3px}@media(max-width:680px){.result-dialog.finish-card{padding:19px;width:calc(100% - 24px);max-height:92dvh;border-radius:14px}.result-dialog h2{font-size:19px;margin:12px 0}.result-mine{font-size:14px;padding:11px 12px}.result-ranking{max-height:min(320px,calc(100dvh - 350px))}.result-ranking li{font-size:12px;padding:8px 4px;gap:8px;min-height:37px}.result-dialog h3{font-size:13px;margin-top:16px}.result-actions{gap:8px}.result-actions button{flex:1;white-space:nowrap;padding:8px 10px;font-size:12px}.result-actions button:last-child:not([hidden]){flex-basis:100%}.result-note{margin:10px 0 14px;font-size:10px}}

/* Player-facing reading and navigation refinements. */
.game-description{background:#fff;border-radius:13px;box-shadow:0 4px 0 #1a636319;margin:18px 0 0;padding:22px 25px 25px}.game-description .breadcrumb{margin:0 0 18px}.game-description h2{font-size:18px;margin:22px 0 9px}.game-description h2:first-of-type{margin-top:0}.game-description ol{padding-left:20px}.game-description li{padding-left:4px}.game-description p,.game-description ol{font-size:14px;line-height:1.8;color:#356979}.game-description .storage-note{margin:18px 0 0;padding-top:15px;color:#507883}.listing-note{background:#fff;border:0;border-radius:13px;box-shadow:0 4px 0 #1a636319;color:#356979}.favorite::after{content:"";position:absolute;inset:-7px}.game-tile:focus-within,.rail-game:focus-visible{outline:3px solid #087faf;outline-offset:3px}.tile-caption strong{text-shadow:0 1px 4px #102a35a8}@media(max-width:680px){.game-description{margin:20px 0 0;padding:18px 17px 20px;border-radius:12px}.game-description h2{font-size:17px}.game-description p,.game-description ol{font-size:13px}.favorite::after{inset:-7px}}

/* Balanced card labels and an identifiable current category. */
.portal .wall .game-tile:not(.tile-hop) .tile-caption strong{font-size:clamp(12px,1.05vw,16px);line-height:1.3;overflow-wrap:anywhere}.category-nav a[aria-current=page]{background:#fff;border-color:#fff;color:#076da1;font-weight:700}@media(max-width:680px){.portal .wall .game-tile:not(.tile-hop) .tile-caption strong{font-size:11px;line-height:1.3}}

/* Scoreboard: compact arcade standings, with distinct gold, silver and bronze. */
.stage-sidebar .leaderboard{padding:0 0 14px;background:#fff;border:1px solid #c6e1dc;border-radius:14px;box-shadow:0 4px 0 #2f77751a;overflow:hidden}
.stage-sidebar .ranking-title{padding:16px 16px 0;align-items:center}
.stage-sidebar .ranking-title h2{color:#174e5e;font-size:17px;letter-spacing:-.4px}
.stage-sidebar .ranking-title h2::before{content:'🏆';font-size:17px;margin-right:7px}
.stage-sidebar .ranking-title button{min-height:34px;padding:5px 9px;border-radius:7px;font-size:11px}
.stage-sidebar .ranking-rule{margin:7px 16px 0;font-size:11px;color:#67878b;line-height:1.5}
.stage-sidebar .player-identity{margin:12px 16px 8px;padding:9px 10px}
.stage-sidebar .ranking-list{margin:10px 10px 8px;padding:0;max-height:350px;scrollbar-color:#a8cbc7 transparent;scrollbar-width:thin}
.stage-sidebar .ranking-list li:not(.ranking-empty){display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:8px;min-height:40px;padding:5px 8px;border:0;border-radius:8px;margin:3px 0;color:#345e68}
.stage-sidebar .ranking-list li:not(.ranking-empty):nth-child(1){background:#fff5dc}
.stage-sidebar .ranking-list li:not(.ranking-empty):nth-child(2){background:#eff4f8}
.stage-sidebar .ranking-list li:not(.ranking-empty):nth-child(3){background:#fff0e8}
.stage-sidebar .ranking-list li.is-me{outline:2px solid #58b895;outline-offset:-2px}
.stage-sidebar .ranking-list .rank-number{display:grid;place-items:center;width:27px;height:27px;padding:0;border-radius:50%;background:#eff5f3;color:#67858a;font-size:12px;line-height:1;font-weight:800}
.stage-sidebar .ranking-list li:nth-child(1) .rank-number,.result-ranking li:nth-child(1)>b{background:#f2bd40;color:#69460a;box-shadow:inset 0 2px 0 #ffe498,0 2px 0 #d99623}
.stage-sidebar .ranking-list li:nth-child(2) .rank-number,.result-ranking li:nth-child(2)>b{background:#c4d0db;color:#465b69;box-shadow:inset 0 2px 0 #eef5fa,0 2px 0 #93a7b5}
.stage-sidebar .ranking-list li:nth-child(3) .rank-number,.result-ranking li:nth-child(3)>b{background:#e5a47b;color:#72462e;box-shadow:inset 0 2px 0 #ffd5b5,0 2px 0 #c27d57}
.stage-sidebar .rank-name{min-width:0;overflow-wrap:anywhere;line-height:1.35;font-weight:650}
.stage-sidebar .rank-value{font-variant-numeric:tabular-nums;font-weight:800;color:#245d6d;white-space:nowrap}
.stage-sidebar .ranking-status{margin:10px 16px 5px;padding:9px 10px;border-radius:7px;background:#eaf6f4;color:#226d70;font-size:11px;line-height:1.5;font-weight:700}
.stage-sidebar .leaderboard>small{display:block;margin:0 16px;color:#789397;font-size:10px;line-height:1.5}
.result-dialog.finish-card{padding:0;border:1px solid #b7d8d5;border-radius:18px;box-shadow:0 22px 70px #143f5360}
.result-dialog .result-badge{margin:22px 24px 0;background:#e6f5f1;color:#28786c;font-size:11px;font-weight:700}
.result-dialog h2{margin:9px 24px 14px;color:#164b5c;font-size:22px}
.result-dialog .result-mine{margin:0 24px;padding:12px 14px;border:0;border-left:4px solid #3cb394;border-radius:8px;background:#e8f7f1;color:#226b5c}
.result-dialog h3{margin:20px 24px 8px;color:#244f5d;font-size:15px}
.result-dialog h3::before{content:'🏆';margin-right:7px}
.result-dialog .result-ranking{margin:0 16px;padding:0 8px;max-height:310px;scrollbar-color:#a8cbc7 transparent;scrollbar-width:thin}
.result-ranking li:not(.result-empty){grid-template-columns:32px minmax(0,1fr) auto;gap:10px;min-height:40px;margin:3px 0;padding:5px 9px;border:0;border-radius:8px;color:#355b64}
.result-ranking li:not(.result-empty):nth-child(1){background:#fff5dc}
.result-ranking li:not(.result-empty):nth-child(2){background:#eff4f8}
.result-ranking li:not(.result-empty):nth-child(3){background:#fff0e8}
.result-ranking li.is-me{outline:2px solid #58b895;outline-offset:-2px}
.result-ranking li>b{width:27px;height:27px;border-radius:50%;background:#eff5f3;color:#67858a;font-size:12px;line-height:1;font-weight:800}
.result-ranking li>span{font-weight:650;line-height:1.35}
.result-ranking li>strong{font-variant-numeric:tabular-nums;font-weight:800;color:#245d6d}
.result-dialog .result-note{margin:12px 24px 16px;color:#66868a}
.result-dialog .result-actions{padding:14px 24px 20px;background:#f5faf8;border-top:1px solid #e3f0ec}
.result-dialog .result-actions button{border-radius:8px}
.result-dialog .result-actions .primary{background:#1889c6;box-shadow:0 3px 0 #126da2}
@media(max-width:680px){.result-dialog.finish-card{padding:0;width:calc(100% - 24px);max-height:92dvh}.result-dialog .result-badge{margin:16px 17px 0}.result-dialog h2{margin:7px 17px 11px;font-size:19px}.result-dialog .result-mine{margin:0 17px;padding:10px 12px;font-size:13px}.result-dialog h3{margin:13px 17px 6px;font-size:14px}.result-dialog .result-ranking{margin:0 9px;padding:0 8px;max-height:min(300px,calc(100dvh - 325px))}.result-ranking li:not(.result-empty){min-height:37px}.result-dialog .result-note{margin:9px 17px 11px;font-size:10px}.result-dialog .result-actions{padding:12px 17px 16px}.stage-sidebar .ranking-title h2{font-size:17px}}
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-number{border-radius:50%}

/* A proper podium: the first three positions sit on their own tiers. */
.stage-sidebar .leaderboard{background:#fff;border:0;border-radius:16px;box-shadow:0 5px 0 #17695e20,0 12px 30px #1a6f6a16}
.stage-sidebar .ranking-title{padding:16px 17px 14px;background:#164c62;min-height:62px}
.stage-sidebar .ranking-title h2{color:#fff;font-size:17px;letter-spacing:.1px}
.stage-sidebar .ranking-title h2::before{content:'\1F3C6';display:inline-block;margin-right:8px;font-size:18px}
.stage-sidebar .ranking-title button{min-height:34px;color:#d6f7ee;background:#ffffff18;border:1px solid #ffffff55}
.stage-sidebar .ranking-rule{margin:13px 17px 0;font-size:11px;color:#617e83}
.stage-sidebar .player-identity{margin:10px 14px 8px;background:#f1f8f6;border-color:#e1efeb}
.stage-sidebar .ranking-list,.result-dialog .result-ranking{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:5px;align-items:end;list-style:none}
.stage-sidebar .ranking-list{margin:12px 10px 6px;max-height:410px}
.result-dialog .result-ranking{margin:0 16px;padding:0 8px;max-height:390px;column-gap:8px}
.stage-sidebar .ranking-list li:not(.ranking-empty):nth-child(-n+3),.result-ranking li:not(.result-empty):nth-child(-n+3){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;align-self:end;min-width:0;min-height:0;gap:0;margin:0 0 12px;padding:7px 2px 0;border:0;background:transparent;border-radius:8px;text-align:center;overflow:visible}
.stage-sidebar .ranking-list li:nth-child(1),.result-ranking li:nth-child(1){grid-column:2;grid-row:1}
.stage-sidebar .ranking-list li:nth-child(2),.result-ranking li:nth-child(2){grid-column:1;grid-row:1}
.stage-sidebar .ranking-list li:nth-child(3),.result-ranking li:nth-child(3){grid-column:3;grid-row:1}
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-number,.result-ranking li:nth-child(-n+3)>b{position:relative;display:grid;place-items:center;flex:none;width:34px;height:34px;margin:0 0 7px;border:3px solid #fff;border-radius:50%;font-size:14px;font-weight:900;line-height:1}
.stage-sidebar .ranking-list li:nth-child(1) .rank-number,.result-ranking li:nth-child(1)>b{width:41px;height:41px;font-size:17px;background:#f4bf38;color:#6b4703;box-shadow:0 0 0 2px #e9b336,0 3px 7px #bd8b2345}
.stage-sidebar .ranking-list li:nth-child(2) .rank-number,.result-ranking li:nth-child(2)>b{background:#c9d6de;color:#485c68;box-shadow:0 0 0 2px #bccbd4,0 3px 7px #70899738}
.stage-sidebar .ranking-list li:nth-child(3) .rank-number,.result-ranking li:nth-child(3)>b{background:#e4a57d;color:#704329;box-shadow:0 0 0 2px #d89569,0 3px 7px #ad6f4d38}
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-name,.result-ranking li:nth-child(-n+3)>span{display:block;width:100%;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4;font-size:11px;color:#244e5a;font-weight:750}
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-value,.result-ranking li:nth-child(-n+3)>strong{display:block;max-width:100%;margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#66828a;font-weight:700}
.stage-sidebar .ranking-list li:nth-child(-n+3)::after,.result-ranking li:nth-child(-n+3)::after{content:'';display:block;flex:none;width:100%;height:27px;margin-top:9px;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#dce7ed,#b9cbd5);box-shadow:inset 0 2px 0 #ffffffa0}
.stage-sidebar .ranking-list li:nth-child(1)::after,.result-ranking li:nth-child(1)::after{height:47px;background:linear-gradient(180deg,#f8db83,#edbb4a);box-shadow:inset 0 2px 0 #fff3bf}
.stage-sidebar .ranking-list li:nth-child(3)::after,.result-ranking li:nth-child(3)::after{height:21px;background:linear-gradient(180deg,#f5c7a7,#dea37d);box-shadow:inset 0 2px 0 #ffe5d4}
.stage-sidebar .ranking-list li:nth-child(-n+3).is-me,.result-ranking li:nth-child(-n+3).is-me{outline:2px solid #58b895;outline-offset:2px}
.stage-sidebar .ranking-list li:nth-child(n+4):not(.ranking-empty),.result-ranking li:nth-child(n+4):not(.result-empty){grid-column:1/-1;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;min-height:37px;padding:5px 8px;margin:0;border:0;border-bottom:1px solid #edf3f1;border-radius:0;background:transparent}
.stage-sidebar .ranking-list li:nth-child(n+4).is-me,.result-ranking li:nth-child(n+4).is-me{border-radius:7px;background:#e9f7ee;outline:0}
.stage-sidebar .ranking-list .ranking-empty,.result-ranking .result-empty{grid-column:1/-1}
.stage-sidebar .ranking-status{margin:12px 14px 7px;padding:10px 11px;background:#e9f6f1;color:#226b5c;border-left:3px solid #43b697}
.result-dialog.finish-card{border:0;border-radius:18px;box-shadow:0 24px 80px #12364b70}
.result-dialog .result-badge{background:#e7f5f1;color:#318171}
.result-dialog h2{font-size:23px;letter-spacing:-.3px}
.result-dialog .result-mine{background:#164e62;color:#fff;border:0;border-radius:9px;padding:14px 15px}
.result-dialog h3{margin:18px 24px 10px;color:#174d60;font-size:15px}
.result-dialog h3::before{content:'\1F3C6';margin-right:7px}
.result-ranking li:nth-child(-n+3)>span{font-size:12px}
.result-ranking li:nth-child(-n+3)>strong{font-size:11px}
.result-ranking li:nth-child(-n+3)::after{max-width:120px}
.result-dialog .result-actions{background:#f4faf8}
@media(max-width:680px){.stage-sidebar .ranking-title h2{font-size:17px}.stage-sidebar .ranking-list{max-height:410px}.result-dialog h2{font-size:20px}.result-dialog .result-ranking{max-height:min(330px,calc(100dvh - 315px))}.result-ranking li:nth-child(-n+3)>span{font-size:11px}.result-dialog .result-mine{padding:11px 12px}}
@media(max-width:680px){.result-dialog .result-actions{display:flex;flex-wrap:wrap}.result-dialog .result-actions button{flex:1 1 0;min-width:0;width:auto}.result-dialog .result-actions button:last-child:not([hidden]){flex-basis:100%}}
.stage-sidebar .ranking-list li.ranking-empty::after,.result-ranking li.result-empty::after{content:none}

/* Illustrated forest memory game */
.reference-stage .memory-board{padding:16px;gap:11px;border-radius:15px;background:linear-gradient(145deg,#73583e,#493629);box-shadow:inset 0 2px 2px #cba77f80,inset 0 -4px 0 #30231f,0 10px 25px #193a3424}
.reference-stage .memory-card{position:relative;overflow:hidden;min-width:0;min-height:0;border:3px solid #d5bb85;border-radius:8px;background-color:#183d55;background-image:repeating-linear-gradient(45deg,#ffffff0c 0 1px,transparent 1px 8px),repeating-linear-gradient(-45deg,#ffffff0c 0 1px,transparent 1px 8px),linear-gradient(145deg,#2b6680,#122c43);box-shadow:inset 0 0 0 2px #173d50,inset 0 0 0 3px #d6ba7d,0 4px 0 #302820,0 6px 8px #1a171440;color:transparent;font-size:0;cursor:pointer;transition:transform .16s,box-shadow .16s}
.reference-stage .memory-card::before{content:'✦';position:absolute;inset:12%;display:grid;place-items:center;border:1px solid #dfca9270;border-radius:50%;color:#e5d09c;font:400 clamp(20px,3vw,42px)/1 Georgia,serif;text-shadow:0 2px 1px #0f2538}
.reference-stage .memory-card:not(:disabled):hover{transform:translateY(-2px);box-shadow:inset 0 0 0 2px #173d50,inset 0 0 0 3px #d6ba7d,0 6px 0 #302820,0 8px 10px #1a171440}
.reference-stage .memory-card:focus-visible{outline:3px solid #ffe78f;outline-offset:3px}
.reference-stage .memory-card.flipped{border-color:#f3e7c8;background-image:url('/assets/memory-animals-v2.webp');background-size:400% 200%;background-repeat:no-repeat;box-shadow:0 4px 0 #302820,0 6px 8px #1a171440;transform:none}
.reference-stage .memory-card.flipped::before{content:none}
.reference-stage .memory-card[data-face="fox"]{background-position:0% 0%}.reference-stage .memory-card[data-face="frog"]{background-position:33.333% 0%}.reference-stage .memory-card[data-face="panda"]{background-position:66.667% 0%}.reference-stage .memory-card[data-face="cat"]{background-position:100% 0%}
.reference-stage .memory-card[data-face="monkey"]{background-position:0% 100%}.reference-stage .memory-card[data-face="rabbit"]{background-position:33.333% 100%}.reference-stage .memory-card[data-face="bear"]{background-position:66.667% 100%}.reference-stage .memory-card[data-face="tiger"]{background-position:100% 100%}
.reference-stage .memory-card.matched{border-color:#b7dd86;box-shadow:0 0 0 2px #67a46d,0 4px 0 #302820,0 6px 8px #1a171440}
.reference-stage .memory-card.matched::after{content:'✓';position:absolute;right:4px;top:4px;display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#427d51;color:#fff;font:700 12px/1 sans-serif;box-shadow:0 1px 4px #1a362d66}
@media(max-width:680px){.reference-stage .memory-board{padding:9px;gap:7px;border-radius:9px}.reference-stage .memory-card{border-width:2px;border-radius:5px}.reference-stage .memory-card::before{font-size:22px}.reference-stage .memory-card.matched::after{width:15px;height:15px;right:2px;top:2px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.reference-stage .memory-card{transition:none}}
/* Keep the emoji visible if the illustrated sprite cannot load. */
.reference-stage .memory-card.flipped{background-image:none;background-color:#fff7df;color:#183d55;font-size:clamp(26px,4vw,46px)}
.reference-stage .memory-art-ready .memory-card.flipped{background-image:url('/assets/memory-animals-v2.webp');background-size:400% 200%;color:transparent;font-size:0}

/* Number puzzle: carved wooden tray with readable ceramic number pieces. */
.reference-stage .merge-board{padding:18px;gap:10px;border:2px solid #604331;border-radius:16px;background:repeating-linear-gradient(94deg,#ffffff06 0 2px,transparent 2px 34px),linear-gradient(135deg,#9a7150,#65442f 55%,#493428);box-shadow:inset 0 2px 1px #d4b08a,inset 0 -5px 0 #3d291f,0 12px 27px #193a3428}
.reference-stage .number-tile{border:1px solid #4b342c55;border-radius:9px;font-variant-numeric:tabular-nums;font-size:clamp(23px,3vw,38px);font-weight:850;letter-spacing:-1px;text-shadow:0 1px 0 #fff8;box-shadow:inset 0 2px 0 #fff9,inset 0 -5px 0 #72524240,0 3px 5px #2a1e1a45}
.reference-stage .number-tile.n0{background:#6d4e39;color:transparent;box-shadow:inset 0 3px 8px #36231777,inset 0 -1px 0 #c69c7240}
.reference-stage .number-tile.n2{background:linear-gradient(#fffaf0,#e9d9bd);color:#554033}
.reference-stage .number-tile.n4{background:linear-gradient(#ffefcc,#eaca96);color:#684a32}
.reference-stage .number-tile.n8{background:linear-gradient(#f8d88f,#e4ac50);color:#5d3e25}
.reference-stage .number-tile.n16{background:linear-gradient(#f3bd7d,#dd8e45);color:#563521}
.reference-stage .number-tile.n32{background:linear-gradient(#e99270,#c75e42);color:#fff;text-shadow:0 1px 1px #733925}
.reference-stage .number-tile.n64{background:linear-gradient(#db7c6d,#ad4a45);color:#fff;text-shadow:0 1px 1px #75332e}
.reference-stage .number-tile.n128{background:linear-gradient(#7cb7a2,#418873);color:#fff;text-shadow:0 1px 1px #285a4b;font-size:clamp(20px,2.5vw,32px)}
.reference-stage .number-tile.n256{background:linear-gradient(#77a7ba,#45788f);color:#fff;text-shadow:0 1px 1px #294f60;font-size:clamp(20px,2.5vw,32px)}
.reference-stage .number-tile.n512{background:linear-gradient(#8b8eaf,#5c6287);color:#fff;text-shadow:0 1px 1px #424761;font-size:clamp(20px,2.5vw,32px)}
.reference-stage .number-tile.n1024,.reference-stage .number-tile.n2048{background:linear-gradient(#e4be63,#b4822e);color:#fff;text-shadow:0 1px 1px #6c4a12;font-size:clamp(17px,2.1vw,27px)}
@media(max-width:680px){.reference-stage .merge-board{padding:9px;gap:6px;border-radius:9px}.reference-stage .number-tile{border-radius:5px;font-size:25px;box-shadow:inset 0 1px 0 #fff9,inset 0 -3px 0 #72524240,0 2px 3px #2a1e1a45}.reference-stage .number-tile.n128,.reference-stage .number-tile.n256,.reference-stage .number-tile.n512{font-size:22px}.reference-stage .number-tile.n1024,.reference-stage .number-tile.n2048{font-size:18px}}

/* Hand-finished puzzle tray and the two-player tabletop board. */
.reference-stage .slider-board{padding:18px;gap:10px;border:2px solid #664a35;border-radius:16px;background:repeating-linear-gradient(95deg,#ffffff07 0 2px,transparent 2px 28px),linear-gradient(135deg,#9c7350,#674732 55%,#4c3428);box-shadow:inset 0 2px 1px #d9b58b,inset 0 -5px 0 #3c281f,0 12px 27px #193a3428}
.reference-stage .slider-board button{position:relative;border:1px solid #75563a;border-radius:8px;background:linear-gradient(140deg,#f5dfb8,#d1ae7a);color:#49382d;font-family:Georgia,'Noto Serif SC',serif;font-weight:700;font-size:clamp(36px,4vw,54px);text-shadow:0 1px #fff9;box-shadow:inset 0 2px 0 #fff9,inset 0 -5px 0 #8c693a40,0 4px 5px #2b1c1690;cursor:pointer}
.reference-stage .slider-board button.movable{outline:2px solid #ffe1a1;outline-offset:-5px}
.reference-stage .slider-board button.movable::after{content:'';position:absolute;right:11px;bottom:11px;width:7px;height:7px;border-radius:50%;background:#9b6b39;box-shadow:0 0 0 2px #f5dfb6}
.reference-stage .slider-board button.movable:hover{filter:brightness(1.07);transform:translateY(-1px)}
.reference-stage .slider-board button:focus-visible,.reference-stage .ttt-board button:focus-visible{outline:3px solid #2c8cb6;outline-offset:-5px}
.reference-stage .slider-board .empty{border:1px solid #513725;border-radius:8px;background:#5b3d2d;box-shadow:inset 0 4px 12px #28191199,inset 0 -1px 0 #d1a87850}
.reference-stage .ttt-board{padding:17px;gap:9px;border:2px solid #5c5448;border-radius:16px;background:linear-gradient(140deg,#83796b,#554c43);box-shadow:inset 0 2px 0 #d4c5aeaa,inset 0 -5px 0 #37322e,0 12px 26px #193a3428}
.reference-stage .ttt-board button{border:1px solid #bcb4a4;border-radius:8px;background:linear-gradient(145deg,#f3eee2,#ded6c7);color:#28739a;font:800 clamp(58px,7vw,100px)/1 system-ui,sans-serif;text-shadow:0 3px 0 #174c66,0 5px 7px #25394030;box-shadow:inset 0 2px 0 #fff,inset 0 -4px 0 #9a8c7940,0 4px 4px #28231e70;cursor:pointer}
.reference-stage .ttt-board button:not(:disabled):hover{background:linear-gradient(145deg,#fff9eb,#e9e0ce)}
.reference-stage .ttt-board button.mark-X{color:#287eaa;text-shadow:0 3px 0 #15506f,0 5px 6px #203f5040}
.reference-stage .ttt-board button.mark-O{color:#d66a50;text-shadow:0 3px 0 #913e31,0 5px 6px #55322640}
.reference-stage .ttt-board button:disabled{opacity:1;cursor:default}
@media(max-width:680px){.reference-stage .slider-board,.reference-stage .ttt-board{padding:9px;gap:6px;border-radius:9px}.reference-stage .slider-board button{border-radius:5px;font-size:38px}.reference-stage .slider-board button.movable::after{width:5px;height:5px;right:6px;bottom:6px}.reference-stage .slider-board .empty,.reference-stage .ttt-board button{border-radius:5px}.reference-stage .ttt-board button{font-size:57px}}

/* Garden clearing and a freestanding four-in-a-row board. */
.reference-stage .mines-wrap{padding:16px;border:2px solid #68523d;border-radius:14px;background:linear-gradient(135deg,#bca17a,#846747);box-shadow:inset 0 2px 0 #e6d0aa,inset 0 -5px 0 #604a37,0 10px 24px #193a3426}
.reference-stage .mines-toolbar{min-height:42px;margin:0 0 12px;color:#fff5da;font-size:13px;font-weight:700}
.reference-stage .mines-toolbar button{min-height:40px;padding:7px 12px;border:1px solid #697d51;border-radius:8px;background:#eaf1dc;color:#355e3d;box-shadow:0 3px 0 #4e6443;font-weight:700;cursor:pointer}
.reference-stage .mines-toolbar button[aria-pressed=true]{background:#ffe5a4;border-color:#b27735;color:#70451e;box-shadow:0 3px 0 #805b30}
.reference-stage .mines-board{gap:3px}
.reference-stage .mines-board button{position:relative;min-width:0;padding:0;border:1px solid #496c38;border-radius:4px;background:repeating-linear-gradient(120deg,#ffffff0c 0 2px,transparent 2px 7px),linear-gradient(145deg,#8ab56c,#578640);color:#224526;font-size:clamp(13px,1.5vw,19px);line-height:1;box-shadow:inset 0 2px 0 #b7d89780,inset 0 -3px 0 #375f3870,0 2px 2px #47362565;cursor:pointer}
.reference-stage .mines-board button:not(:disabled):hover{filter:brightness(1.1)}
.reference-stage .mines-board button:focus-visible{outline:3px solid #fff0a7;outline-offset:-3px;z-index:1}
.reference-stage .mines-board button.opened{background:linear-gradient(145deg,#f5e9c9,#dbcba5);border-color:#aa9570;box-shadow:inset 0 2px 5px #806b4b30;color:#365544}
.reference-stage .mines-board button.count-1{color:#245e99}.reference-stage .mines-board button.count-2{color:#287343}.reference-stage .mines-board button.count-3{color:#af4437}.reference-stage .mines-board button.count-4{color:#67429a}.reference-stage .mines-board button.count-5,.reference-stage .mines-board button.count-6,.reference-stage .mines-board button.count-7,.reference-stage .mines-board button.count-8{color:#843f2e}
.reference-stage .mines-board button.flagged{background:linear-gradient(#ffe7a2,#eab15c);border-color:#a96b36;color:#9d2b25}
.reference-stage .mines-board button.count--1{background:#e8a496;color:#822b26}
.reference-stage .connect-board{position:relative;padding:14px 11px;gap:7px;border:5px solid #497895;border-radius:16px;background:linear-gradient(145deg,#327aa6,#16527d 70%,#103f62);box-shadow:inset 0 2px 0 #9ac7db,inset 0 -6px 0 #103e5c,0 9px 0 #183f54,0 13px 22px #214a5738}
.reference-stage .connect-column{gap:7px;border-radius:30px;cursor:pointer}
.reference-stage .connect-column:not(:disabled):hover{background:#aee0ef25}
.reference-stage .connect-column:focus-visible{outline:3px solid #ffdf8c;outline-offset:2px}
.reference-stage .connect-cell.vacant{background:radial-gradient(circle at 48% 48%,#cbe6e4 42%,#8eb3b5 78%,#447484 100%);box-shadow:inset 0 4px 7px #103e5f9a,0 1px 0 #ffffff45}
.reference-stage .connect-cell.red{background:radial-gradient(circle at 30% 25%,#ffc1a8,#e87054 48%,#b83f30 84%);color:#722a20;text-shadow:0 1px #ffffff88;box-shadow:inset 0 2px 0 #ffd8c0,inset 0 -4px 0 #963b2f,0 2px 4px #12384a70}
.reference-stage .connect-cell.yellow{background:radial-gradient(circle at 30% 25%,#fff8c7,#f4ce5b 50%,#c9932c 86%);color:#694b14;text-shadow:0 1px #ffffffaa;box-shadow:inset 0 2px 0 #fff8c9,inset 0 -4px 0 #a97728,0 2px 4px #12384a70}
.reference-stage .connect-cell.latest{outline:3px solid #fff7d2;outline-offset:-5px}
@media(max-width:680px){.reference-stage .mines-wrap{padding:8px;border-radius:9px}.reference-stage .mines-toolbar{min-height:40px;margin-bottom:8px;font-size:11px}.reference-stage .mines-toolbar button{min-height:40px;padding:5px 8px;font-size:11px}.reference-stage .mines-board{gap:2px}.reference-stage .mines-board button{font-size:13px;border-radius:3px}.reference-stage .connect-board{padding:8px 5px;gap:4px;border-width:3px;border-radius:9px;box-shadow:inset 0 -3px 0 #103e5c,0 5px 0 #183f54}.reference-stage .connect-column{gap:5px}.reference-stage .connect-cell{font-size:9px}}

/* Constellation light puzzle and a tactile miniature Sudoku board. */
.reference-stage .lights-board{width:min(100%,470px);max-width:470px;padding:20px;gap:10px;border:3px solid #536b72;border-radius:17px;background:radial-gradient(circle at 20% 20%,#ffffff14 0 1px,transparent 2px),radial-gradient(circle at 70% 60%,#ffffff14 0 1px,transparent 2px),linear-gradient(145deg,#223b4c,#0f2235);background-size:28px 28px,37px 37px,auto;box-shadow:inset 0 2px 0 #a8c6c155,inset 0 -5px 0 #0a1826,0 12px 26px #193a3428}
.reference-stage .light-cell{display:grid;place-items:center;min-width:0;border:2px solid #53707e;border-radius:50%;font-size:clamp(25px,3vw,39px);line-height:1;cursor:pointer;transition:background .16s,box-shadow .16s,transform .16s}
.reference-stage .light-cell.off{background:radial-gradient(circle at 35% 26%,#547284,#244456 52%,#132d40 80%);color:#97b0b9;border-color:#466373;box-shadow:inset 0 2px 0 #91b2bc55,inset 0 -5px 8px #091b2b,0 3px 5px #08151e70}
.reference-stage .light-cell.on{background:radial-gradient(circle at 34% 25%,#fff8c7,#ffd767 42%,#e59d31 76%,#9b5d22);color:#825115;border-color:#ffe5a0;text-shadow:0 1px 0 #fff4af;box-shadow:inset 0 2px 0 #fff9da,inset 0 -4px 4px #ac671c70,0 0 15px #ffc44990,0 3px 5px #08151e70}
.reference-stage .light-cell:not(:disabled):hover{transform:translateY(-2px)}
.reference-stage .light-cell:focus-visible{outline:3px solid #fff5ba;outline-offset:3px}
.reference-stage .sudoku-wrap{max-width:450px;padding:20px;border:2px solid #6b4b37;border-radius:15px;background:repeating-linear-gradient(95deg,#ffffff08 0 2px,transparent 2px 30px),linear-gradient(140deg,#a17a55,#71513a);box-shadow:inset 0 2px 0 #dcc09e,inset 0 -5px 0 #4b3327,0 12px 26px #193a3428}
.reference-stage .sudoku-board{gap:4px;padding:5px;border:2px solid #564132;border-radius:8px;background:#725742;box-shadow:inset 0 3px 7px #3f2a2280}
.reference-stage .sudoku-board button{border:1px solid #b8a58c;border-radius:4px;background:linear-gradient(145deg,#fffaf0,#eee4d1);color:#2e6d83;font:700 clamp(27px,3vw,40px)/1 Georgia,serif;box-shadow:inset 0 1px 0 #fff,0 2px 2px #3f2a2230;cursor:pointer}
.reference-stage .sudoku-board button.fixed{background:linear-gradient(145deg,#decbb0,#c9b59a);color:#4c4038;font-weight:800;cursor:default}
.reference-stage .sudoku-board button.selected{background:#d6eff0;color:#225d6c;box-shadow:inset 0 0 0 3px #398c9e,0 2px 2px #3f2a2230}
.reference-stage .sudoku-board button.invalid{background:#ffe0d6;color:#a22f2b;box-shadow:inset 0 0 0 2px #d35648}
.reference-stage .sudoku-board button.selected.invalid{box-shadow:inset 0 0 0 3px #b33831}
.reference-stage .sudoku-board button:focus-visible,.reference-stage .sudoku-palette button:focus-visible{outline:3px solid #ffdf80;outline-offset:2px;z-index:1}
.reference-stage .sudoku-palette{gap:8px;margin-top:14px}
.reference-stage .sudoku-palette button{min-width:0;min-height:48px;border:1px solid #bba27c;border-radius:7px;background:linear-gradient(#fff9ec,#e8d7bb);color:#60452d;font:700 22px/1 Georgia,serif;box-shadow:inset 0 1px 0 #fff,0 3px 0 #684b36;cursor:pointer}
.reference-stage .sudoku-palette button:last-child{font:700 12px/1.2 system-ui,sans-serif}
.reference-stage .sudoku-palette button:hover{filter:brightness(1.06)}
@media(max-width:680px){.reference-stage .lights-board{padding:10px;gap:7px;border-width:2px;border-radius:10px}.reference-stage .light-cell{font-size:24px}.reference-stage .sudoku-wrap{padding:10px;border-radius:9px}.reference-stage .sudoku-board{padding:3px;gap:3px;border-radius:5px}.reference-stage .sudoku-board button{font-size:30px}.reference-stage .sudoku-palette{gap:6px;margin-top:10px}.reference-stage .sudoku-palette button{min-height:44px;font-size:19px}.reference-stage .sudoku-palette button:last-child{font-size:11px}}
@media(prefers-reduced-motion:reduce){.reference-stage .light-cell{transition:none}}
/* Fit the complete 4:3 drawing surface into the desktop 16:10 stage. */
@media(min-width:681px){.reference-stage .player .game-area canvas{width:83.333333%;height:auto;max-width:83.333333%;max-height:none;aspect-ratio:4/3}.reference-stage .player .game-area.mode-bricks,.reference-stage .player .game-area.mode-pong{background:#14262e}.reference-stage .player .game-area.mode-snake{background:#b7df96}}
@media(min-width:681px){.reference-stage .player .game-area.mode-pong{background:linear-gradient(135deg,#20588a,#1b877e)}.reference-stage .player .game-area.mode-maze{background:#253a3a}.reference-stage .player .game-area.mode-colors{background:#f4effb}.reference-stage .player .game-area.mode-tower{background:linear-gradient(#72cbea,#d4f8f4)}.reference-stage .player .game-area.mode-plane{background:#111c30}.reference-stage .player .game-area.mode-runner{background:linear-gradient(#283a5b,#ca897b)}.reference-stage .player .game-area.mode-target{background:#1f2c35}.reference-stage .player .game-area.mode-frog{background:#496c4c}.reference-stage .player .game-area.mode-hop{background:#e7e7dc}}
/* Let non-canvas game boards determine their own height at tablet and desktop widths. */
@media(min-width:681px){.reference-stage .player.game-running .game-area{aspect-ratio:auto}.reference-stage .player.game-running .game-area:is(.mode-snake,.mode-bricks,.mode-maze,.mode-colors,.mode-tower,.mode-pong,.mode-plane,.mode-runner,.mode-target,.mode-frog,.mode-hop){aspect-ratio:16/10}}
/* Keep game statistics readable without obscuring the play field. */
@media(min-width:681px){.reference-stage .player .game-stats{position:static;order:1;width:100%;margin:0;padding:11px 17px 0;justify-content:flex-start;gap:8px;background:#fff;pointer-events:auto}.reference-stage .player .game-stats>span,.reference-stage .player .game-stats>span:nth-child(2),.reference-stage .player .game-stats #best-wrap{min-width:86px;padding:6px 11px;border:1px solid #d2e7e2;border-radius:7px;background:#edf7f4;color:#517b79;box-shadow:none;font-size:10px}.reference-stage .player .game-stats>span b,.reference-stage .player .game-stats #best-wrap b{color:#1a5a69;font-size:19px;line-height:1.2}.reference-stage .player .player-heading{padding-top:10px;min-height:56px}}

/* A felt tabletop for Reversi and a readable mechanical code board. */
.reference-stage .reversi-wrap{padding:16px;border:2px solid #66452e;border-radius:15px;background:linear-gradient(140deg,#9f7650,#68442e);box-shadow:inset 0 2px 0 #d9b78e,inset 0 -5px 0 #452f23,0 12px 26px #193a3428}
.reference-stage .reversi-count{margin:0 0 12px;padding:8px 10px;border:1px solid #c8ab80;border-radius:7px;background:#3e342c;color:#fff4d9;font-size:15px;font-weight:750;letter-spacing:1px}
.reference-stage .reversi-board{gap:1px;padding:3px;border:3px solid #263e2b;border-radius:5px;background:#244432;box-shadow:inset 0 2px 5px #0d271a88}
.reference-stage .reversi-board button{padding:4px;background:linear-gradient(145deg,#478463,#326d50);box-shadow:inset 0 1px 0 #9ccba01a}
.reference-stage .reversi-board button:disabled{opacity:1}
.reference-stage .reversi-board .legal:after{left:39%;top:39%;width:22%;height:22%;background:#f1e4a6;box-shadow:0 0 0 2px #21573d,0 0 8px #fff1a15c}
.reference-stage .reversi-board .legal:hover{filter:brightness(1.15)}
.reference-stage .reversi-board .legal:focus-visible{outline:3px solid #ffe392;outline-offset:-3px;z-index:1}
.reference-stage .reversi-board .black span{background:radial-gradient(circle at 32% 26%,#6a7471,#283333 44%,#11191c 86%);box-shadow:inset 0 1px 0 #c5dbcd55,0 3px 3px #102b1eaa}
.reference-stage .reversi-board .white span{background:radial-gradient(circle at 32% 26%,#fffefa,#e5e8dc 50%,#aebbae);box-shadow:inset 0 1px 0 #fff,0 3px 3px #102b1e88}
.reference-stage .code-wrap{padding:19px 22px;border:2px solid #6c8591;border-radius:15px;background:linear-gradient(145deg,#344c5b,#1a2e3c);color:#f1f7f3;box-shadow:inset 0 2px 0 #a3bec880,inset 0 -5px 0 #11222c,0 12px 26px #193a3428}
.reference-stage .code-secret{padding:11px;margin-bottom:12px;border-radius:8px;background:#172832;box-shadow:inset 0 2px 5px #091820}
.reference-stage .code-secret>span{background:#253f4a;border:1px solid #8faab0;color:#e2f2ed;font-size:18px;box-shadow:inset 0 2px 4px #0a1921}
.reference-stage .code-row{min-height:36px;margin:4px 0;padding:3px 7px;border-radius:6px;background:#ffffff08}
.reference-stage .code-row>b{color:#e0edea;font-size:12px}
.reference-stage .code-row small{max-width:none;color:#e0edea;font-size:11px;font-weight:650}
.reference-stage .code-row .peg,.reference-stage .code-guess .peg,.reference-stage .code-secret .peg{display:grid;place-items:center;font:800 11px/1 system-ui,sans-serif;color:#1b3037;font-style:normal}
.reference-stage .code-guess{padding:10px 0;margin:12px 0 0;border-top:1px solid #83a6ac55}
.reference-stage .code-palette{margin:10px 0 14px;gap:9px}
.reference-stage .code-palette button{width:44px;min-width:44px;height:44px;border:2px solid #ffffffaa;color:#1b3037;font-weight:800;box-shadow:inset 0 2px 1px #fff9,inset 0 -3px 3px #17333b55,0 3px 3px #07171c80;cursor:pointer}
.reference-stage .code-palette button:disabled{opacity:.45;filter:saturate(.55);cursor:default}
.reference-stage .code-actions button{border:1px solid #86a4ad;border-radius:7px;background:#3d5b69;color:#f3faf7;font-weight:700;cursor:pointer}
.reference-stage .code-actions #code-submit:not(:disabled){background:#d8b05c;border-color:#f5d98f;color:#3e301a}
.reference-stage .code-actions button:disabled{opacity:.48;cursor:default}
.reference-stage .code-wrap button:focus-visible{outline:3px solid #fff0a7;outline-offset:3px}
@media(max-width:680px){.reference-stage .reversi-wrap{padding:8px;border-radius:9px}.reference-stage .reversi-count{font-size:13px;margin-bottom:8px;padding:6px}.reference-stage .reversi-board{padding:2px;border-width:2px}.reference-stage .reversi-board button{padding:3px}.reference-stage .code-wrap{padding:10px;border-radius:9px}.reference-stage .code-secret{padding:7px;margin-bottom:6px}.reference-stage .code-row{min-height:28px;padding:2px 5px}.reference-stage .code-row small{font-size:10px}.reference-stage .code-guess{padding:7px 0;margin-top:7px}.reference-stage .code-palette{gap:5px;margin:7px 0 10px}.reference-stage .code-palette button{width:39px;min-width:39px;height:40px}.reference-stage .code-actions button{min-height:44px}}

/* Keep the result controls visible while the rankings scroll independently. */
.result-dialog.finish-card[open]{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;overflow:hidden}
.result-dialog .result-badge{align-self:flex-start}
.result-dialog .result-ranking{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.result-dialog .result-badge,.result-dialog h2,.result-dialog .result-mine,.result-dialog h3,.result-dialog .result-note,.result-dialog .result-actions{flex-shrink:0}
.result-dialog .result-actions{margin-top:auto}
/* Names remain readable on the narrow podium without shifting scores. */
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-name,.result-ranking li:nth-child(-n+3)>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;overflow-wrap:anywhere;min-height:2.8em}
.stage-sidebar .ranking-list li:nth-child(-n+3)::after,.result-ranking li:nth-child(-n+3)::after{border:1px solid #94aab345;background:linear-gradient(100deg,#aabdc7,#edf3f5 42%,#b7c9d1);box-shadow:inset 0 2px 0 #fff,0 3px 0 #899ea866}
.stage-sidebar .ranking-list li:nth-child(1)::after,.result-ranking li:nth-child(1)::after{border-color:#c58d364f;background:linear-gradient(100deg,#d59b39,#ffe9a2 44%,#dcae50);box-shadow:inset 0 2px 0 #fff5c9,0 3px 0 #b17d3455}
.stage-sidebar .ranking-list li:nth-child(3)::after,.result-ranking li:nth-child(3)::after{border-color:#b77c574f;background:linear-gradient(100deg,#c58b68,#f9dbbf 44%,#cf9671);box-shadow:inset 0 2px 0 #fff0df,0 3px 0 #a7735555}
@media(max-height:600px){.result-dialog .result-badge{margin-top:10px}.result-dialog h2{margin-top:5px;margin-bottom:7px;font-size:18px;line-height:1.25}.result-dialog h3{margin-top:8px;margin-bottom:5px}.result-dialog .result-note{margin-top:6px;margin-bottom:7px}.result-dialog .result-actions{padding-top:9px;padding-bottom:11px}}
.result-dialog .result-ranking{grid-auto-rows:max-content;align-content:start}

/* Find a game before browsing the complete catalogue. */
.portal-toolbar{padding:0 0 20px;gap:16px}.portal-toolbar .category-nav{margin:0}.portal-toolbar .portal-search{flex:0 1 290px}
@media(max-width:680px){.portal-toolbar{padding:0 0 14px;gap:10px}.portal-toolbar .portal-search{flex:auto}.portal-toolbar .category-nav{gap:7px}.portal-toolbar .category-nav a{padding:6px 12px}}

.game-display-controls{display:flex;align-items:center;gap:6px;flex-shrink:0}.reference-stage .game-display-controls button{white-space:nowrap}@media(max-width:359px){.reference-stage .game-display-controls{gap:4px}.reference-stage .game-display-controls button{padding:4px 6px;font-size:9px}}
/* Illustrated medals are shared by the side board and the result dialog. */
.stage-sidebar .ranking-list li:nth-child(-n+3) .rank-number,.result-ranking li:nth-child(-n+3)>b{background-image:url('/assets/ranking-medals-v1.webp')!important;background-size:300% 100%;background-repeat:no-repeat;background-color:transparent!important;border:0;box-shadow:none!important;width:56px;height:56px;margin-bottom:3px;font-size:17px;text-shadow:0 1px 0 #fff7;line-height:1}
.stage-sidebar .ranking-list li:nth-child(1) .rank-number,.result-ranking li:nth-child(1)>b{width:66px;height:66px;background-position:0 50%;color:#613800;font-size:21px}
.stage-sidebar .ranking-list li:nth-child(2) .rank-number,.result-ranking li:nth-child(2)>b{background-position:50% 50%;color:#263b46}
.stage-sidebar .ranking-list li:nth-child(3) .rank-number,.result-ranking li:nth-child(3)>b{background-position:100% 50%;color:#542b19}
.stage-sidebar .ranking-title h2::before,.result-dialog h3::before{content:'';display:inline-block;width:27px;height:27px;margin-right:7px;vertical-align:middle;background:url('/assets/ranking-trophy-v1.webp') center/contain no-repeat}

/* The jewel tray uses five illustrated, shape-distinct pieces. */
.reference-stage .jewels-wrap{padding:16px;border:3px solid #9b754c;border-radius:14px;background:linear-gradient(145deg,#544753,#302b3b);box-shadow:inset 0 1px 0 #e3c08a99,inset 0 -4px 0 #201c27,0 9px 22px #10272c33}
.reference-stage .jewels-line{padding:3px 3px 10px;color:#f4e6c9;font-weight:700;border-bottom:1px solid #c2a37b55}.reference-stage .jewels-line span{color:#efc778;font-variant-numeric:tabular-nums}.reference-stage .jewels-board{gap:6px}.reference-stage .jewel{background:#1b202c;border:1px solid #87788a66;box-shadow:inset 0 2px 5px #070e19aa,0 1px 0 #c4a47755}.reference-stage .jewel.selected{background:#575044;border:2px solid #f8d77a;box-shadow:0 0 0 2px #f3c65188,inset 0 1px 4px #18131a}.reference-stage .jewel:focus-visible{outline:3px solid #fff0a1;outline-offset:2px}.reference-stage .jewel.clearing{opacity:.3}
.jewels-art-ready .jewel:not(.clearing) span{width:100%;height:100%;clip-path:none;background-image:url('/assets/jewels-v1.webp');background-size:300% 200%;background-repeat:no-repeat;background-color:transparent;filter:drop-shadow(0 2px 2px #090a11)}
.jewels-art-ready .jewel span:before{content:none}.jewels-art-ready .j0 span{background-position:0 0}.jewels-art-ready .j1 span{background-position:50% 0}.jewels-art-ready .j2 span{background-position:100% 0}.jewels-art-ready .j3 span{background-position:0 100%}.jewels-art-ready .j4 span{background-position:50% 100%}
@media(max-width:680px){.reference-stage .jewels-wrap{padding:9px;border-width:2px;border-radius:10px}.reference-stage .jewels-line{padding:2px 2px 7px;margin-bottom:8px}.reference-stage .jewels-board{gap:4px}}

/* Star catcher: a focused target, readable timer, and a tactile night-sky board. */
.reference-stage .star-wrap{padding:17px;border:3px solid #776e83;border-radius:15px;background:radial-gradient(ellipse at 50% 0,#4c5975,#263344 72%);box-shadow:inset 0 2px 0 #ccd6e766,inset 0 -4px 0 #182332,0 10px 25px #102c3733}
.reference-stage .star-timer{margin:0 0 13px;color:#c3d2df;font-weight:700}.reference-stage .star-timer strong{display:inline-block;min-width:45px;padding:2px 8px;border:1px solid #d8b76d66;border-radius:8px;background:#142333;color:#ffe7a1;line-height:1.3;box-shadow:inset 0 2px 3px #0a1625}
.reference-stage .star-board{gap:8px}.reference-stage .star-board button{position:relative;border:1px solid #697c9366;border-radius:10px;background:linear-gradient(145deg,#293c52,#17283b);box-shadow:inset 0 1px 0 #8297a940,0 3px 0 #132132;transition:transform .1s}.reference-stage .star-board button:active{transform:translateY(2px);box-shadow:inset 0 2px 4px #0e1a2b}.reference-stage .star-board button:focus-visible{outline:3px solid #fff0a1;outline-offset:2px}.reference-stage .star-board .decoy{color:#60758b}.reference-stage .star-board .target{border-color:#ffe5a4;background:radial-gradient(circle,#85612d,#4d3e37);box-shadow:inset 0 1px 0 #fff5c777,0 0 14px #f1c75d77,0 3px 0 #513c2a}
.star-art-ready .star-board .target svg{visibility:hidden}.star-art-ready .star-board .target:before{content:'';position:absolute;inset:11%;background:url('/assets/star-token-v1.webp') center/contain no-repeat;filter:drop-shadow(0 2px 2px #3a240b99);pointer-events:none}
@media(max-width:680px){.reference-stage .star-wrap{padding:10px;border-width:2px;border-radius:10px}.reference-stage .star-timer{margin-bottom:9px}.reference-stage .star-timer strong{font-size:20px}.reference-stage .star-board{gap:5px}.reference-stage .star-board button{border-radius:7px}}

/* Catalog pages: make the next action and touch targets easy to find. */
.listing-empty{margin:18px 0 34px;padding:32px 28px;text-align:center;border:1px solid #c7e8df;border-radius:16px;background:#f5fcf9;box-shadow:0 4px 0 #205f5813}.listing-empty>span{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 12px;border-radius:50%;background:#ddf4ec;color:#218394;font-size:30px;line-height:1}.listing-empty h2{margin:0 0 5px;color:#1e5261;font-size:20px}.listing-empty p{margin:0 0 17px;color:#527c7c;font-size:14px}.listing-empty a{display:inline-block;padding:9px 19px;border-radius:8px;background:#237fa9;color:white;font-weight:700}.listing-empty a:hover{background:#176a90;color:white}
@media(max-width:680px){.listing .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.listing .category-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.listing .category-nav a{padding:7px 2px;text-align:center;min-width:0;font-size:12px}.listing .tile-caption{padding:34px 10px 10px}.listing .tile-caption strong{font-size:13px;line-height:1.35}.listing .favorite{width:36px;height:36px;min-width:36px;min-height:36px}.listing-empty{padding:25px 18px}.listing-empty h2{font-size:18px}}

/* Center the primary start/replay action over the game screen. */
.reference-stage .game-splash>.splash-title{position:absolute;inset:auto 12px calc(50% + 38px);display:block;text-align:center;color:#fff;text-shadow:0 3px 10px #091b2c;font-weight:800;pointer-events:none}.reference-stage .game-splash>.splash-title strong{font-size:clamp(20px,2.4vw,34px)}.reference-stage .game-center-action{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:7;display:inline-flex;justify-content:center;align-items:center;gap:9px;min-width:168px;min-height:54px;padding:12px 23px;border:1px solid #fff8;border-radius:12px;background:#168ccc;color:#fff;font-weight:800;font-size:17px;white-space:nowrap;box-shadow:0 4px 0 #075e9a,0 8px 22px #081d3888;touch-action:manipulation}.reference-stage .game-center-action:hover{background:#29a1e1}.reference-stage .game-center-action:disabled{opacity:.65;cursor:wait}.reference-stage .game-center-action span{font-size:13px}.reference-stage .game-end-overlay{position:absolute;inset:0;z-index:6;background:#081b28a6}.reference-stage .player-actions #start-game{display:none!important}.result-dialog .result-actions{justify-content:center}.result-dialog .result-actions .primary{min-width:140px}@media(max-width:680px){.reference-stage .game-splash>.splash-title{bottom:calc(50% + 30px)}.reference-stage .game-splash>.splash-title strong{font-size:20px}.reference-stage .game-center-action{min-width:142px;min-height:48px;padding:9px 17px;font-size:15px}.result-dialog .result-actions .primary{min-width:0}}

.result-dialog .result-actions{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}.result-dialog .result-actions .primary{grid-column:2;grid-row:1;min-width:140px}.result-dialog .result-actions button:nth-child(2){grid-column:3;grid-row:1;justify-self:end}.result-dialog .result-actions button:nth-child(3){grid-column:1/-1;grid-row:2;justify-self:center}.reference-stage .player-actions #handheld-start{display:none!important}.reference-stage .player-actions #handheld-a:disabled{opacity:.38;cursor:default}.reference-stage .player-actions #handheld-a:disabled::after{content:none}

@media(max-width:680px){.reference-stage .player.game-running:not(.game-finished) .player-actions #handheld-start{display:inline-flex!important}}

/* Garden board fits the play area, with compressed art and a CSS fallback. */
.reference-stage .game-area.mode-mole{background:#355e39}.reference-stage .mole-garden{width:min(100%,560px);padding:16px 20px;background:#91ad71 url('/assets/mole-garden-v1.webp') center/cover no-repeat}.reference-stage .mole-scoreline{margin:0 0 8px;padding:5px 10px;border-radius:8px;background:#173b2bc9;color:#fff7dc;font-weight:700;text-shadow:0 1px 2px #0007}.reference-stage .mole-grid{gap:10px}.reference-stage .mole-grid button{border-radius:0;aspect-ratio:1.3;overflow:hidden;touch-action:manipulation}.reference-stage .mole-grid button::before{inset-inline:0;bottom:0;height:50%;border-radius:0;background-color:transparent;background-image:url('/assets/mole-hole-v1.webp'),radial-gradient(ellipse,#2c1b12 0 42%,#7c4b29 52%,transparent 68%);background-size:contain,100% 100%;background-position:center bottom;background-repeat:no-repeat;box-shadow:none}.reference-stage .mole-art-ready .mole-head{width:78%;height:78%;left:11%;background:transparent url('/assets/mole-character-v1.webp') center bottom/contain no-repeat;box-shadow:none;border-radius:0}.reference-stage .mole-art-ready .mole-head::before,.reference-stage .mole-art-ready .mole-head::after,.reference-stage .mole-art-ready .mole-head i{display:none}.reference-stage .mole-grid button:focus-visible{outline-offset:-4px;outline-color:#fff9bd}@media(max-width:680px){.reference-stage .mole-garden{padding:10px}.reference-stage .mole-scoreline{font-size:12px;margin-bottom:5px;padding:4px 8px}.reference-stage .mole-grid{gap:5px}}

.reference-stage .mole-head{bottom:-85%}

@media(min-width:681px){.reference-stage .player .game-area.mode-pong{background:#194b35}}

/* Keep first-time player actions readable on narrow screens. */
@media(max-width:420px){.nickname-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:18px;overscroll-behavior:contain}.nickname-dialog h2{font-size:21px;margin-bottom:8px}.nickname-dialog label{margin-top:14px}.nickname-actions{gap:8px;margin-top:12px}.nickname-actions button{min-width:0;padding:8px 5px;font-size:12px;white-space:nowrap}}

/* Reaction challenge: a tactile signal console with clear color and text states. */
.reference-stage .player.game-running .game-area.mode-reaction{background:#101e2c;aspect-ratio:16/10}.reference-stage .reaction-box{position:relative;isolation:isolate;min-height:0;width:100%;height:100%;padding:clamp(12px,3vw,28px);overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(6px,1.3vw,12px);color:#f3faf8;background:#102c38 url('/assets/reaction-console-v1.webp') center/cover no-repeat;letter-spacing:0}.reference-stage .reaction-box::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#0d2633a3,#0b1d2b85 45%,#081824bc)}.reaction-head{position:absolute;top:clamp(12px,2.3vw,22px);left:clamp(14px,2.7vw,26px);right:clamp(14px,2.7vw,26px);display:flex;justify-content:space-between;color:#b6d5d6;font-size:clamp(10px,1.1vw,12px);font-weight:700;letter-spacing:.07em}.reaction-lamp{width:clamp(66px,13vw,116px);aspect-ratio:1;display:grid;place-items:center;border-radius:50%;border:3px solid #8b8174;background:radial-gradient(circle at 30% 25%,#ffc575,#bd6e32 45%,#583624 75%);box-shadow:0 0 0 7px #b5c7c51a,0 0 0 10px #101b25,0 8px 25px #0008,inset 0 3px 7px #fff5,inset 0 -8px 15px #2c1a1299;transition:background .12s,box-shadow .12s}.reaction-lamp i{width:66%;height:66%;border-radius:50%;background:radial-gradient(circle at 35% 28%,#ffe2aa,#df8b36 50%,#915021);box-shadow:0 0 18px #eb983966,inset 0 2px 5px #fff7}.reaction-box.go .reaction-lamp{border-color:#9ce9bd;background:radial-gradient(circle at 30% 25%,#c5ffe0,#48d78a 45%,#145d43 75%);box-shadow:0 0 0 7px #b2ffcc24,0 0 0 10px #10271f,0 0 40px #63ff9988,inset 0 3px 7px #fff9}.reaction-box.go .reaction-lamp i{background:radial-gradient(circle at 35% 28%,#e0ffe8,#67f89d 50%,#1aab64);box-shadow:0 0 28px #7cffadcc,inset 0 2px 5px #fff9}.reaction-box.early .reaction-lamp{filter:saturate(.7)}.reaction-box.result .reaction-lamp{border-color:#87bde0}.reaction-box strong{font-size:clamp(21px,3vw,32px);line-height:1.25;text-shadow:0 2px 10px #051019;font-weight:800}.reference-stage .reaction-box small{margin:0;color:#c8e0de;font-size:clamp(12px,1.5vw,15px);font-weight:500}.reaction-footer{position:absolute;bottom:clamp(10px,2vw,19px);color:#9ababc;font-size:clamp(10px,1vw,12px);font-weight:600}.reaction-box:focus-visible{outline:4px solid #f8cf78;outline-offset:-5px}@media(max-width:420px){.reaction-head{top:10px}.reaction-lamp{width:58px}.reaction-box strong{font-size:20px}.reaction-footer{bottom:8px}.reference-stage .reaction-box{gap:6px}}@media(prefers-reduced-motion:reduce){.reaction-lamp{transition:none}}

.reference-stage .player .game-area.mode-colors{background:#263f3f}

/* Narrow handheld screens: keep every choice reachable and the signal copy clear. */
@media(max-width:360px){.reference-stage .code-palette{display:grid;grid-template-columns:repeat(3,44px);justify-content:center;gap:7px 17px}.reference-stage .code-palette button{width:44px;min-width:44px;height:44px;min-height:44px}}
@media(max-width:420px){.reaction-footer{display:none}}

/* Scrollable ranking lists remain discoverable and keyboard accessible. */
.result-dialog .result-scroll-hint{flex-shrink:0;margin:4px 24px 0;color:#507d83;font-size:11px;line-height:1.35;text-align:right}.result-dialog .result-ranking:focus-visible,.stage-sidebar .ranking-list:focus-visible{outline:3px solid #1889c6;outline-offset:-3px;border-radius:6px}@media(max-width:680px){.result-dialog .result-scroll-hint{margin:3px 17px 0;font-size:10px}}

/* A tactile board with illustrated pieces and a clear turn indicator. */
.reference-stage .ttt-wrap{width:min(100%,520px);padding:12px;border:2px solid #624a35;border-radius:15px;background:linear-gradient(135deg,#9b744e,#65462f 54%,#4d3628);box-shadow:inset 0 2px 0 #d7b98a99,0 9px 18px #182b2555}.reference-stage .ttt-turn{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:8px 12px;border:1px solid #d8b88355;border-radius:7px;background:#34271ecc;color:#e9d5b5;font-size:12px;line-height:1.2}.ttt-turn strong{font-size:16px;color:#8ad4f6}.ttt-turn[data-turn=O] strong{color:#ffac9b}.ttt-turn small{margin-left:auto;color:#d4bfa0;font-size:11px}.reference-stage .ttt-wrap .ttt-board{width:100%;padding:12px;gap:9px;border:2px solid #513e30;border-radius:10px;background:linear-gradient(135deg,#896441,#533c2c);box-shadow:inset 0 2px 5px #2b1a1599}.reference-stage .ttt-board button{position:relative;overflow:hidden;border-color:#9d866f;background:linear-gradient(145deg,#f7e9cd,#d7bf9d);box-shadow:inset 0 2px 0 #fff9,inset 0 -4px 0 #9d7f5c55,0 3px 5px #2b1d16aa}.reference-stage .ttt-board button:not(:disabled):hover{background:linear-gradient(145deg,#fff5df,#e8d1ad)}.reference-stage .ttt-art-ready .ttt-board button:is(.mark-X,.mark-O){font-size:0;color:transparent;text-shadow:none}.reference-stage .ttt-art-ready .ttt-board button:is(.mark-X,.mark-O)::after{content:"";position:absolute;inset:9%;background-image:url('/assets/tictactoe-pieces-v1.webp');background-size:200% 100%;background-repeat:no-repeat;background-position:left center}.reference-stage .ttt-art-ready .ttt-board button.mark-O::after{background-position:right center}.reference-stage .ttt-board button.is-winning{outline:4px solid #f4c35d;outline-offset:-5px;box-shadow:inset 0 0 0 6px #fff5c977,0 0 10px #ffd87d88}@media(max-width:680px){.reference-stage .ttt-wrap{padding:7px;border-radius:9px}.reference-stage .ttt-turn{padding:6px 9px;margin-bottom:7px;font-size:11px}.ttt-turn strong{font-size:14px}.reference-stage .ttt-wrap .ttt-board{padding:7px;gap:6px}.reference-stage .ttt-board button.is-winning{outline-width:3px}}

/* In short landscape windows, keep the result and the scrollable ranking side by side. */
@media(max-height:500px) and (min-width:500px){
 .result-dialog.finish-card[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto auto;align-items:start;width:min(760px,calc(100vw - 24px));height:min(300px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);overflow:hidden}
 .result-dialog .result-badge{grid-column:1;grid-row:1;justify-self:start;margin:10px 14px 0;font-size:10px}
 .result-dialog h2{grid-column:1;grid-row:2;margin:5px 14px 8px;font-size:17px;line-height:1.25}
 .result-dialog .result-mine{grid-column:1;grid-row:3;align-self:start;margin:0 14px;padding:9px 10px;font-size:12px;line-height:1.4}
 .result-dialog h3{grid-column:2;grid-row:1;margin:10px 12px 4px;font-size:13px;line-height:1.4}
 .result-dialog h3::before{width:20px;height:20px;margin-right:5px}
 .result-dialog .result-ranking{grid-column:2;grid-row:2/5;align-self:stretch;height:100%;min-height:0;max-height:none;margin:0 8px;padding:0 6px;overflow-y:auto}
 .result-dialog .result-scroll-hint{grid-column:2;grid-row:5;margin:3px 14px 4px;font-size:10px}
 .result-dialog .result-note{grid-column:1;grid-row:4;margin:5px 14px;font-size:10px;line-height:1.35}
 .result-dialog .result-actions{grid-column:1/-1;grid-row:6;align-self:end;width:100%;padding:7px 14px;margin:0;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
 .result-dialog .result-actions button{min-height:40px;padding:6px 10px;font-size:12px}
 .result-dialog .result-actions button:nth-child(3){grid-column:1;grid-row:1;justify-self:start;max-width:100%;white-space:normal;line-height:1.2}
 .result-dialog .result-ranking li:nth-child(-n+3)>b{width:42px;height:42px;font-size:13px;margin-bottom:1px}
 .result-dialog .result-ranking li:nth-child(1)>b{width:48px;height:48px;font-size:16px}
 .result-dialog .result-ranking li:nth-child(-n+3)>span{min-height:1.4em;font-size:10px;-webkit-line-clamp:1}
 .result-dialog .result-ranking li:nth-child(-n+3)>strong{font-size:10px;margin-top:1px}
 .result-dialog .result-ranking li:nth-child(-n+3)::after{height:15px;margin-top:3px}.result-dialog .result-ranking li:nth-child(1)::after{height:23px}.result-dialog .result-ranking li:nth-child(3)::after{height:12px}
 .result-dialog .result-ranking li:not(.result-empty):nth-child(-n+3){margin-bottom:6px;padding-top:2px}
}

/* Clear turns and tactile counters for the two-player boards. */
.reference-stage .connect-wrap{width:min(100%,500px)}.reference-stage .connect-turn{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:9px 13px;border:1px solid #6b9cb6;border-radius:8px;background:#164766;color:#dbedf2;font-size:12px;line-height:1.2;box-shadow:0 3px 0 #0e3550}.connect-turn strong{font-size:16px;color:#ffb6a1}.connect-turn[data-turn=yellow] strong{color:#ffe29a}.connect-turn small{margin-left:auto;color:#bdd4db;font-size:11px}.reference-stage .connect-art-ready .connect-cell.red,.reference-stage .connect-art-ready .connect-cell.yellow{background-color:transparent;background-image:url('/assets/connect4-pieces-v1.webp');background-size:250% 125%;background-repeat:no-repeat;box-shadow:none;color:#fff;text-shadow:0 1px 3px #351911,0 0 2px #351911}.reference-stage .connect-art-ready .connect-cell.red{background-position:8.33% 50%}.reference-stage .connect-art-ready .connect-cell.yellow{background-position:91.67% 50%;color:#563b00;text-shadow:0 1px 1px #fff8c3}.reference-stage .connect-cell.winning{outline:3px solid #fff6a4;outline-offset:-3px;filter:drop-shadow(0 0 4px #ffe58d)}.reference-stage .reversi-count{justify-content:space-between;gap:8px;word-spacing:normal;letter-spacing:0}.reversi-count span{min-width:52px}.reversi-count span:last-child{text-align:right}.reversi-count strong{color:#f7db9b;font-size:12px}.reversi-count b{font-variant-numeric:tabular-nums}@media(max-width:680px){.reference-stage .connect-turn{padding:6px 9px;margin-bottom:7px;font-size:11px}.connect-turn strong{font-size:14px}.reversi-count strong{font-size:11px}}

/* Short viewports keep nickname actions visible while preserving readable help. */
@media(max-height:500px){
 .nickname-dialog{max-height:calc(100dvh - 16px);padding:16px;overscroll-behavior:contain}
 .nickname-dialog h2{font-size:20px;line-height:1.25;margin:0 0 7px}
 .nickname-dialog form>p:not(.nickname-error):not(.nickname-hint){font-size:13px;line-height:1.4;margin:0 0 8px}
 .nickname-dialog label{font-size:13px;margin:10px 0 5px}
 .nickname-dialog input{min-height:44px;padding:9px}
 .nickname-dialog small{font-size:11px;line-height:1.4;margin:6px 0}
 .nickname-dialog .nickname-error{min-height:16px;margin:3px 0;font-size:12px;line-height:1.3}
 .nickname-dialog .nickname-hint{margin:5px 0;font-size:11px;line-height:1.4}
 .nickname-dialog .nickname-actions{position:sticky;bottom:0;z-index:2;margin-top:4px;padding:8px 0;background:#fff;box-shadow:0 -8px 12px #fff}
 .nickname-dialog .nickname-actions button{min-height:44px;font-size:12px;white-space:nowrap}
}
@media(max-height:500px) and (min-width:500px){
 .nickname-dialog{width:min(680px,calc(100% - 24px))}
 .nickname-dialog form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:20px;align-items:start}
 .nickname-dialog h2{grid-column:1/-1;grid-row:1}
 .nickname-dialog form>p:not(.nickname-error):not(.nickname-hint){grid-column:1/-1;grid-row:2}
 .nickname-dialog label{grid-column:1;grid-row:3;margin:3px 0 5px}
 .nickname-dialog input{grid-column:1;grid-row:4}
 .nickname-dialog small{grid-column:1;grid-row:5}
 .nickname-dialog .nickname-error{grid-column:1;grid-row:6}
 .nickname-dialog .nickname-hint{grid-column:2;grid-row:3/6;margin:3px 0;align-self:start}
 .nickname-dialog .nickname-actions{grid-column:2;grid-row:6;position:static;margin:0;padding:0;box-shadow:none}
}
@media(max-height:360px) and (max-width:499px){.nickname-dialog form>p:not(.nickname-error):not(.nickname-hint){display:none}}
@media(max-height:280px) and (max-width:499px){
 .nickname-dialog form{display:flex;flex-direction:column}
 .nickname-dialog h2{order:0}.nickname-dialog label{order:1}.nickname-dialog input{order:2}
 .nickname-dialog .nickname-error{order:3}.nickname-dialog small{order:4}.nickname-dialog .nickname-hint{order:5}.nickname-dialog .nickname-actions{order:6}
}
@media(max-height:280px) and (max-width:499px){
 .nickname-dialog{padding:12px}.nickname-dialog h2{font-size:18px;margin-bottom:2px}.nickname-dialog label{margin:2px 0 4px;line-height:1.2}.nickname-dialog input{font-size:16px;line-height:20px;min-height:42px;padding:8px}.nickname-dialog .nickname-error{line-height:1.25;margin:2px 0}.nickname-dialog .nickname-actions{padding:6px 0;box-shadow:0 -3px 5px #fff}
}
@media(max-height:280px) and (min-width:500px){
 .nickname-dialog{padding:10px 14px}.nickname-dialog h2{font-size:18px;margin-bottom:3px}.nickname-dialog form>p:not(.nickname-error):not(.nickname-hint){font-size:12px;line-height:1.25;margin-bottom:3px}.nickname-dialog label{margin:0 0 3px;line-height:1.2}.nickname-dialog input{font-size:16px;line-height:20px;min-height:42px;padding:8px}.nickname-dialog small{line-height:1.2;margin:3px 0}.nickname-dialog .nickname-hint{font-size:10px;line-height:1.3;margin:0}.nickname-dialog .nickname-error{margin:2px 0;line-height:1.2}.nickname-dialog .nickname-actions button{min-height:40px}
}
