:root{color-scheme:dark;--bg:#0c0d0c;--panel:#191b1a;--line:#3a3c37;--muted:#b5b0a5;--ink:#f1ece2;--accent:#ec812b;--blue:#f7a95b;--purple:#c4b5fd;font-family:Arial,Helvetica,sans-serif;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);min-height:100svh}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}a{color:inherit}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:4px}[hidden]{display:none!important}.shell{max-width:1240px;margin:auto;padding:28px 36px 20px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:24px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;font-size:15px;font-weight:700}.brand-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--accent);color:#0c0d0c;font-size:19px;font-weight:900;letter-spacing:-1px;border-radius:12px}.brand small{display:block;font-size:12px;font-weight:400;letter-spacing:2px;text-transform:uppercase;color:var(--muted);margin-top:6px}.badge,.eyebrow{font:12px/1.5 'Courier New',monospace;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted)}.badge{border:1px solid var(--line);padding:7px 12px;border-radius:30px}.heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:30px 0 20px}.heading h1{margin:0;font-size:clamp(26px,3.2vw,42px);letter-spacing:-1.5px;line-height:1.15}.heading p{margin:0;color:var(--muted);font-size:14px;line-height:1.5}.game-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:26px}.game-option{padding:18px 20px;text-align:left;display:flex;gap:16px;align-items:center;background:transparent;border:1px solid var(--line);border-radius:14px;transition:background .15s,border-color .15s}.game-option:hover{background:#2d2923}.game-option[aria-pressed=true]{border-color:var(--accent);background:#352519}.option-icon{width:42px;flex:none;height:42px;display:grid;place-items:center;background:#30271f;border-radius:10px;color:var(--accent);font-size:27px}.game-option strong{display:block;font-size:16px;line-height:1.3}.game-option small{color:var(--muted);font-size:13px;display:block;margin-top:4px}.workbench{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px}.game-window{background:var(--panel);border:1px solid var(--line);border-radius:20px;overflow:hidden;min-width:0}.window-bar{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:14px}.window-bar h2{font-size:17px;margin:0}.round-label{font:13px 'Courier New',monospace;color:var(--muted)}.stage{position:relative;min-height:400px;display:grid;place-items:center;background:#141615;overflow:hidden;padding:32px}.play-surface{width:min(100%,420px);position:relative}.maze-board{display:grid;gap:2px;width:100%;background:#090a09;border:7px solid #090a09;aspect-ratio:9/7;border-radius:8px;touch-action:none;user-select:none}.maze-cell{position:relative;min-width:0;display:grid;place-items:center;border:0;padding:0;border-radius:3px;background:#55321e}.maze-cell.wall{background:#090a09}.maze-cell.visited{background:#85502a}.maze-cell.finish{background:var(--accent);color:#211505;font:bold 12px 'Courier New',monospace}.maze-cell.player:after{content:'';width:55%;aspect-ratio:1;border-radius:50%;background:#fff4df;box-shadow:0 0 0 3px #f7a95b44,0 0 18px #f7a95b}.maze-cell.start:not(.player):before{content:'S';font:bold 13px 'Courier New',monospace;color:#e6cdb3}.maze-cell.wall-hit{box-shadow:inset 0 0 0 3px #ffad7f}.launch-overlay{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:26px;background:#141615e8;backdrop-filter:blur(3px)}.launch-icon{font-size:32px;width:70px;height:70px;display:grid;place-items:center;background:#382619;border:1px solid #67422b;border-radius:22px;color:var(--accent);margin-bottom:20px}.launch-overlay h3{font-size:30px;letter-spacing:-1px;margin:0 0 10px}.launch-overlay p{line-height:1.6;margin:0 0 22px;color:#cec7ba;max-width:290px;font-size:15px}.launch-overlay .notice{font-size:12px;color:var(--muted);margin:14px 0 0}.primary{background:var(--accent);color:#211505;border:0;border-radius:10px;font-weight:700;padding:14px 24px;min-height:48px}.primary:hover{background:#f69d53}.text-button{background:transparent;border:0;padding:10px;color:#d2c4ad;font-size:13px;text-decoration:underline;text-underline-offset:4px}.status-line{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border-top:1px solid var(--line);font-size:14px;min-height:64px}.status-line p{margin:0;color:var(--muted);line-height:1.5}.restart{padding:8px 12px;min-height:38px;border:1px solid var(--line);border-radius:8px;background:transparent;font-size:13px;flex:none}.sidebar{display:flex;flex-direction:column;gap:22px;padding:4px 0}.sidebar h3{margin:0 0 10px;font-size:15px}.sidebar p{margin:0;color:var(--muted);font-size:14px;line-height:1.7}.controls-hint{padding-bottom:20px;border-bottom:1px solid var(--line)}.steps{display:flex;gap:6px;margin:15px 0 0}.step{height:5px;flex:1;background:#3a3c37;border-radius:8px}.step.current{background:var(--accent)}.step.done{background:#b26128}.settings{display:grid;gap:16px}.setting{display:grid;gap:8px;font-size:14px}.setting select{width:100%;min-height:44px;border:1px solid #51483d;border-radius:8px;background:#282721;color:var(--ink);padding:10px 12px}.sound-toggle{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:14px}.sound-toggle input{width:20px;height:20px;accent-color:var(--accent)}.volume-control{accent-color:var(--accent);width:100%}.small-note{font-size:12px!important;line-height:1.6!important}.d-pad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,44px);gap:5px;justify-content:center;align-self:center;margin-top:2px}.d-pad button{border:1px solid #59442f;border-radius:9px;background:#32271e;font-size:20px;user-select:none;touch-action:manipulation}.d-pad button:hover{background:#513720}.d-pad button[data-direction=up]{grid-column:2}.d-pad button[data-direction=left]{grid-column:1;grid-row:2}.d-pad button[data-direction=down]{grid-column:2;grid-row:2}.d-pad button[data-direction=right]{grid-column:3;grid-row:2}.memory-grid,.odd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;width:100%;max-width:400px;margin:auto}.memory-grid.six{grid-template-columns:repeat(3,1fr);max-width:340px}.memory-card,.odd-tile{aspect-ratio:1;border:1px solid #574b3e;border-radius:12px;background:#29251f;display:grid;place-items:center;min-height:48px;padding:0;transition:background .16s,border-color .16s}.memory-card:hover,.odd-tile:hover{background:#3b2e22;border-color:#907458}.memory-card .back{color:#8e7b64;font:bold 22px 'Courier New',monospace}.memory-card.flipped{background:#f1ece2;border-color:#f1ece2}.memory-card.matched{background:#493121;border-color:#936b45}.memory-card.matched .symbol{opacity:.55;color:var(--accent)}.symbol{display:block;color:#f1cfab;font-size:clamp(26px,4vw,42px);font-weight:bold;line-height:1;width:46%;height:46%;position:relative}.symbol.circle{border:5px solid currentColor;border-radius:50%}.symbol.diamond{border:5px solid currentColor;transform:rotate(45deg);width:36%;height:36%}.symbol.triangle{background:currentColor;clip-path:polygon(50% 0,100% 100%,0 100%)}.symbol.plus:before,.symbol.plus:after{content:'';position:absolute;background:currentColor;border-radius:2px}.symbol.plus:before{width:100%;height:22%;left:0;top:39%}.symbol.plus:after{height:100%;width:22%;top:0;left:39%}.symbol.star{background:currentColor;clip-path:polygon(50% 0,62% 35%,100% 38%,72% 61%,82% 100%,50% 78%,18% 100%,28% 61%,0 38%,38% 35%)}.symbol.bars{background:repeating-linear-gradient(90deg,currentColor 0,currentColor 20%,transparent 20%,transparent 40%)}.symbol.oval{border:5px solid currentColor;border-radius:50%;width:33%;height:49%}.flipped .symbol{color:#382519}.odd-grid{gap:10px}.odd-grid.three{grid-template-columns:repeat(3,1fr);max-width:340px}.odd-tile.wrong{border-color:#ffad7f;background:#4c3426}.win-panel{text-align:center;padding:28px}.win-panel .win-symbol{font-size:48px;color:var(--accent);margin-bottom:16px}.win-panel h3{font-size:32px;margin:0 0 12px;letter-spacing:-1px}.win-panel p{color:var(--muted);line-height:1.6;margin:0 0 24px}.win-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.secondary{border:1px solid #72563a;border-radius:10px;background:transparent;padding:13px 20px;min-height:48px;text-decoration:none;font-size:14px}.footer{display:flex;justify-content:space-between;gap:15px;padding-top:24px;color:#b0a495;font-size:12px;line-height:1.5}.footer a{text-decoration:none}.scare-dialog{border:0;background:#030504;color:var(--ink);padding:0;width:100vw;max-width:none;height:100svh;max-height:none;position:fixed;inset:0;margin:0;overflow:hidden}.scare-dialog::backdrop{background:#030504}.scare-close{position:absolute;z-index:3;right:max(18px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));background:#191b1adb;color:white;border:1px solid #a89680;border-radius:8px;padding:12px 18px;font-size:14px;min-height:44px}.reduced .embed .shell{padding:10px;max-width:1100px}.embed .masthead,.embed .heading,.embed .game-picker,.embed .footer{display:none}.embed .workbench{gap:18px}.embed .stage{min-height:390px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(max-width:850px){.shell{padding:22px}.workbench{grid-template-columns:minmax(0,1fr) 230px;gap:18px}.stage{padding:24px;min-height:350px}.game-option{padding:15px 13px;gap:10px}.option-icon{width:34px;height:34px;font-size:22px}.game-option small{font-size:12px}.heading p{display:none}}@media(max-width:650px){.shell{padding:16px}.masthead{padding-bottom:16px}.badge{font-size:10px;padding:6px 9px}.brand{font-size:13px}.brand small{font-size:10px}.brand-mark{width:36px;height:36px;font-size:16px}.heading{margin:24px 0 17px}.heading h1{letter-spacing:-1px}.game-picker{gap:8px;margin-bottom:18px}.game-option{padding:13px 6px;flex-direction:column;gap:8px;text-align:center;border-radius:12px}.game-option strong{font-size:12px;line-height:1.4}.game-option small{display:none}.option-icon{width:30px;height:30px;font-size:21px}.workbench{grid-template-columns:1fr;gap:20px}.window-bar{padding:15px 17px}.stage{min-height:335px;padding:23px}.stage.memory-stage{min-height:360px}.launch-overlay h3{font-size:28px}.launch-icon{width:52px;height:52px;margin-bottom:14px;border-radius:15px;font-size:27px}.launch-overlay p{font-size:14px;margin-bottom:16px}.launch-overlay{padding:20px}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:0 4px}.controls-hint{padding:0;border:0}.sidebar h3{font-size:14px}.sidebar p{font-size:13px}.settings{gap:12px}.setting,.sound-toggle{font-size:13px}.setting select{min-height:42px;padding:8px}.small-note{font-size:11px!important}.d-pad{grid-column:1;grid-row:2;justify-self:start;align-self:start;margin:0}.footer{font-size:11px;padding-top:22px}.status-line{padding:14px 17px;font-size:13px}.symbol.circle,.symbol.diamond,.symbol.oval{border-width:4px}.embed .stage{min-height:335px}.embed .workbench{gap:18px}.memory-grid,.odd-grid{gap:8px}.memory-card,.odd-tile{border-radius:10px}}@media(max-width:360px){.stage{padding:18px}.sidebar{grid-template-columns:1fr}.d-pad{grid-row:auto}.settings{grid-row:2}.badge{display:none}} 

.game-window>.d-pad{margin:10px auto 15px;align-self:auto}

.game-progress{padding:11px 22px 13px;border-bottom:1px solid #57402a;background:#191b1aa6}
.progress-caption{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;color:var(--muted);font:11px/1.2 'Courier New',monospace}
.progress-track{height:5px;border-radius:10px;background:#3a3027;overflow:hidden}
.progress-fill{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;transition:width .18s ease-out}
@media(max-width:650px){.game-progress{padding:10px 16px 12px}}
/* `?embed=1` is the arcade's iframe: only the game, since the arcade page
   supplies its own header and footer. */
body.embed .masthead,body.embed .heading,body.embed .game-picker,body.embed .footer{display:none}
body.embed .shell{padding-top:0}
/* `?share=1` is a copied game link: the game on its own, but the AE masthead
   and store link stay so the branding travels with the link. */
body.share .heading,body.share .game-picker{display:none}
body.share .shell{padding-top:0}
/* The footer is hidden on narrow screens by default; a share link keeps it so
   the store link is always reachable. */
body.share .footer{display:flex;flex-wrap:wrap;align-items:center}
body.share .footer a{border:1px solid #ec812b80;border-radius:999px;padding:7px 15px;text-decoration:none}
