@font-face{font-family:'Galmuri11';src:url('fonts/Galmuri11.woff2') format('woff2');font-style:normal;font-weight:100 1000;font-display:swap}
:root{--navy:#10182b;--teal:#245457;--green:#79b83d;--cream:#fff4d6;--ink:#10182b}*{box-sizing:border-box}body{margin:0;background:#080f1e;color:var(--cream);font-family:'Galmuri11',ui-monospace,'Courier New',sans-serif;font-weight:800}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:3px solid #ffcd7d;outline-offset:4px}#app{max-width:460px;min-height:100svh;margin:auto;padding:16px 20px 20px;background-color:var(--navy);background-image:radial-gradient(#234251 1.3px,transparent 1.3px);background-size:23px 23px;border-left:4px solid #235c60;border-right:4px solid #235c60;position:relative;overflow:hidden}.brand{text-align:center;font-size:12px;letter-spacing:1px;color:#dedfc6;margin:14px 0 22px}.badge{font-size:10px;color:#a1b8af;letter-spacing:.1em;text-align:center;margin-top:12px}.hero{text-align:center}.hero .sprout{width:64px;height:64px;margin:6px auto 18px}.title{font-size:clamp(30px,8vw,43px);line-height:1.08;letter-spacing:-2px;font-weight:1000;margin:0;text-shadow:0 4px #528532,3px 4px #528532}.tagline{font-size:17px;margin:25px 0}.panel{border:3px solid #050b15;box-shadow:4px 5px #040b17;background:var(--cream);color:var(--ink);margin:18px 0}.panel-title{background:#70aa38;color:#fff9df;padding:12px 15px;font-size:17px;letter-spacing:1px;border-bottom:3px solid var(--ink)}.panel-body{padding:18px;font-size:14px;line-height:1.7}.panel-body p{margin:0 0 6px}.examples{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:16px}.example{border:2px solid var(--ink);padding:8px 12px;min-width:70px;text-align:center;box-shadow:2px 2px var(--ink)}.example svg{width:45px;height:45px;display:block;margin:auto}.pink{color:#fa8e8c}.btn{display:block;width:100%;border:3px solid #e7edc6;background:#73ac38;color:#fff8df;padding:14px 12px;box-shadow:0 5px #274e2b,3px 5px #050c17;font-size:19px;margin:14px 0;transition:transform .1s}.btn:active{transform:translateY(3px);box-shadow:none}.btn.secondary{background:#235355;font-size:16px}.nickname{display:flex;align-items:center;gap:12px;font-size:12px;margin-top:20px}.nickname input{min-width:0;flex:1;background:#172e3b;color:var(--cream);border:2px solid #426c60;padding:10px}.forest{display:flex;align-items:flex-end;justify-content:space-between;height:100px;margin-top:20px;border-bottom:3px solid #386152;pointer-events:none}.forest svg{width:80px;height:95px}.forest svg:nth-child(2){width:38px;height:45px}.mini-title{font-size:17px;text-align:center;margin:14px 0 18px;letter-spacing:-.7px}.hud{display:flex;justify-content:space-between;align-items:center;padding:12px 10px;border:2px solid #75ad3d;box-shadow:3px 3px #050c17;background:#0b1326;margin-bottom:16px}.hearts{display:flex;gap:5px}.hearts svg{width:23px;height:23px}.hearts .empty{opacity:.18}.clock{font-size:23px;font-variant-numeric:tabular-nums}.board{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.card{position:relative;aspect-ratio:.87;border:0;background:none;padding:0;perspective:500px;min-width:0}.card-inner{display:block;width:100%;height:100%;transform-style:preserve-3d;transition:transform .25s}.card.open .card-inner{transform:rotateY(180deg)}.face{position:absolute;inset:0;backface-visibility:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column;border:3px solid #060c19;box-shadow:2px 3px #050c17}.back{background:#215253;outline:2px solid #588f3d;outline-offset:-7px}.back svg{width:30px;height:30px;opacity:.75}.front{background:var(--cream);transform:rotateY(180deg);gap:4px}.front svg{width:70%;height:58%;image-rendering:pixelated}.label{font-size:13px;color:var(--ink);white-space:nowrap}.matched .front:after{content:'✓';position:absolute;right:-3px;top:-8px;color:#b3e875;background:#1d4636;border:2px solid #0e1825;font-size:17px;padding:0 3px}.wrong{animation:shake .3s}.wrong .front{background:#ffd2c1}.feedback{text-align:center;min-height:24px;font-size:15px;margin:18px 0 12px;color:#f6eecd}.play-foot{display:flex;align-items:center;justify-content:space-between;gap:14px}.progress{font-size:23px;white-space:nowrap;color:#93c456}.smallbtn{background:#245254;border:2px solid #4c8174;color:var(--cream);padding:10px 14px;font-size:13px}.play .forest{height:60px;margin-top:6px}.play .forest svg{height:58px;width:55px}.result-title{text-align:center;font-size:40px;color:#95cf55;text-shadow:3px 4px #23472c;margin:28px 0 10px;letter-spacing:-1px}.result-text{text-align:center;font-size:17px}.result-art{display:flex;align-items:center;justify-content:center;gap:8px;margin:24px 0}.result-art svg{width:100px;height:100px}.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.stat{background:var(--cream);border:3px solid #040b16;text-align:center;color:var(--ink);padding:15px 5px;font-size:13px}.stat strong{display:block;font-size:28px;margin-top:8px}.rankrow{display:grid;grid-template-columns:28px 1fr auto;gap:7px;padding:12px 10px;border-bottom:1px solid #d7d1ad;font-size:13px;align-items:center}.rankrow:last-child{border-bottom:0}.rankrow b{color:#54883b}.rankrow small{font-size:11px;color:#647060}.rankempty{padding:24px 15px;text-align:center;font-size:14px;line-height:1.7}.ranknote{font-size:11px;text-align:center;line-height:1.6;color:#b3c4bb}.sound{display:block;margin:20px auto 4px;background:none;color:#a6bca9;border:0;font-size:11px}dialog{background:var(--cream);color:var(--ink);border:4px solid #559447;max-width:330px;padding:22px}dialog::backdrop{background:#030a18cc}dialog h2{font-size:18px}dialog p{font-size:13px}dialog button{padding:12px;margin:8px 3px;border:2px solid #214e3d;background:#77ac44}button:disabled{cursor:default} @keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@media(min-width:700px){body{padding:24px}#app{min-height:850px;border:4px solid #235c60;box-shadow:0 18px 70px #0008}}@media(max-height:760px) and (max-width:600px){#app{padding:10px 16px}.mini-title{margin:6px 0 10px;font-size:15px}.hud{padding:8px;margin-bottom:12px}.board{gap:8px}.card{aspect-ratio:1}.feedback{margin:12px 0 8px}.play .forest{height:32px}.play .forest svg{height:35px}.label{font-size:12px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.title-logo{line-height:0;text-shadow:none;margin:-14px -8px -6px}.title-logo img{display:block;width:100%;height:auto;max-width:100%;}

/* Display the logo without its transparent vertical padding. */
.title-logo{position:relative;aspect-ratio:1774 / 560;overflow:hidden;margin:0 -8px;line-height:0}.title-logo img{position:absolute;top:-33.928571%;left:0;width:100%;height:auto}.home .tagline{margin:10px 0 12px;font-size:16px;line-height:1.5;font-weight:400}.home .hero + .panel{margin-top:0}

/* Green dotted logo: compact transparent bounds, with room for glow. */
.title-logo{aspect-ratio:1774 / 540}.title-logo img{top:-33.333333%}
/* 20-level game and disabled stone cards. */
.hearts{display:grid;grid-template-columns:repeat(6,18px);gap:4px}.hearts svg{width:18px;height:18px}.hud{min-height:62px}.small-board{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.small-board:has(.card:nth-child(8)){grid-template-columns:repeat(4,minmax(0,1fr))}.card.matched{cursor:not-allowed}.matched .front{background:#989c9e;filter:grayscale(1);border-color:#42484d;box-shadow:inset 3px 3px #c4c7c7,inset -4px -4px #666e74,2px 3px #050c17}.matched .front svg{opacity:.48;filter:contrast(.75)}.matched .front .label{color:#41494f;opacity:.8}.matched .front:after{content:'';inset:0;border:0;padding:0;pointer-events:none;background:repeating-linear-gradient(135deg,transparent 0 12px,#ffffff08 12px 14px);box-shadow:inset 0 0 0 2px #ffffff20}.rule-small{font-size:12px;opacity:.75}.btn.secondary{font-size:19px}.win-window,#event{font-weight:400;color:#10182b;background:#c0c0c0;border:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #404040,5px 6px #0008;padding:4px}#event{width:min(360px,calc(100vw - 30px));max-width:360px;max-height:calc(100dvh - 32px);overflow-y:auto}#event::backdrop{background:#050b19b8}.win-title{display:flex;align-items:center;justify-content:space-between;background:#162c70;color:#fff;padding:7px 8px;font-size:12px;line-height:1.4;gap:8px}.win-icon{background:#c0c0c0;color:#111;padding:0 3px;box-shadow:inset 1px 1px #fff,inset -1px -1px #444}.win-body{padding:12px 10px 2px;text-align:center;font-size:13px;line-height:1.65}.nari-photo{display:block;width:100%;max-height:43dvh;object-fit:contain;background:#a5a5a5;border:2px solid;border-color:#777 #fff #fff #777}.win-caption{font-size:25px;margin:12px 0 5px;line-height:1.3}.win-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;padding:12px 10px}.win-button{display:inline-block;background:#c0c0c0;color:#111;text-decoration:none;border:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #404040,1px 1px #000;padding:10px 16px;font-size:13px;font-weight:400;margin:0;min-width:100px}.win-button:active{box-shadow:inset 2px 2px #555,inset -1px -1px #fff}.win-button:focus-visible{outline:1px dashed #111;outline-offset:-5px}.win-stats{display:flex;justify-content:center;gap:40px;margin:15px 0}.win-stats b{font-size:24px}.clear-sprout svg{width:64px;height:64px;margin-top:12px}.photo-placeholder{border:2px inset #fff;background:#ece8da;min-height:170px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:20px}.photo-placeholder svg,.locked-photo svg{width:45px;height:45px}.photo-placeholder strong{font-size:18px;font-weight:400}.photo-placeholder span{font-size:12px}.pending-note{font-size:11px;color:#555}.album-window{margin:20px 0}.locked-photo{padding:20px 0;color:#555}.bonus-photo{width:100%;display:block}.download{margin:8px}.empty{filter:grayscale(1)}
/* Give a found pair time to register before it settles into stone. */
.card.matched{animation:stone-wiggle .55s .4s ease-in-out both}
.matched .front{animation:stone-face 1.2s ease-in-out both}
.matched .front svg{animation:stone-art 1.2s ease-in-out both}
.matched .front .label{animation:stone-label 1.2s ease-in-out both}
.matched .front:after{animation:stone-grain 1.2s ease-in-out both}
@keyframes stone-face{0%,33.333333%{background:var(--cream);filter:grayscale(0);border-color:#060c19;box-shadow:2px 3px #050c17}100%{background:#989c9e;filter:grayscale(1);border-color:#42484d;box-shadow:inset 3px 3px #c4c7c7,inset -4px -4px #666e74,2px 3px #050c17}}
@keyframes stone-art{0%,33.333333%{opacity:1;filter:contrast(1)}100%{opacity:.48;filter:contrast(.75)}}
@keyframes stone-label{0%,33.333333%{color:var(--ink);opacity:1}100%{color:#41494f;opacity:.8}}
@keyframes stone-grain{0%,33.333333%{opacity:0}100%{opacity:1}}
@keyframes stone-wiggle{0%,100%{transform:translate(0,0) rotate(0)}20%{transform:translate(-1px,0) rotate(-1.5deg)}40%{transform:translate(1px,0) rotate(1.5deg)}60%{transform:translate(-1px,1px) rotate(-1deg)}80%{transform:translate(1px,1px) rotate(1deg)}}
/* Square face-centered photo, flush with the window, with a pixel speech bubble. */
#event.nari-window{width:min(330px,calc(100vw - 30px),calc(100dvh - 205px))}
.nari-window .win-body{padding:0 0 2px}
.nari-portrait{position:relative;width:100%;aspect-ratio:1;overflow:hidden;background:#c0c0c0}
.nari-portrait .nari-photo{width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 46%;border:0;display:block}
.pixel-bubble{position:absolute;right:13px;bottom:17px;min-width:66px;padding:9px 12px 10px;background:#fff4d6;color:#10182b;font-size:28px;line-height:1;text-align:center;box-shadow:3px 0 #10182b,-3px 0 #10182b,0 3px #10182b,0 -3px #10182b,5px 5px #0005}
.pixel-bubble:before{content:'';position:absolute;left:9px;bottom:-12px;width:9px;height:12px;background:#10182b;clip-path:polygon(0 0,100% 0,0 100%)}
.pixel-bubble:after{content:'';position:absolute;left:11px;bottom:-7px;width:6px;height:9px;background:#fff4d6;clip-path:polygon(0 0,100% 0,0 100%)}
.nari-window .win-body>p{padding:0 8px}.nari-window .win-caption{margin-top:10px}
@media(prefers-reduced-motion:reduce){.card.matched,.matched .front,.matched .front svg,.matched .front .label,.matched .front:after{animation:none!important}}

/* Pixel sound switch in its original bottom-center position. */
.sound{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;margin:20px auto 4px;padding:8px 10px;border:2px solid #426c60;background:#0b1326;color:var(--cream);font-size:12px;width:max-content;max-width:100%;font-weight:400;box-shadow:2px 3px #050c17}
.sound-track{display:block;position:relative;width:40px;height:22px;background:#59616c;border:2px solid #070e1b;box-shadow:inset 1px 1px #0005}
.sound-knob{display:block;position:absolute;top:2px;left:2px;width:14px;height:14px;background:#fff4d6;box-shadow:1px 1px #0008;transition:transform .15s}
.sound[aria-checked="true"] .sound-track{background:#79b83d}.sound[aria-checked="true"] .sound-knob{transform:translateX(18px)}
.sound-status{min-width:24px;color:#aeb6be}.sound[aria-checked="true"] .sound-status{color:#a8d779}


/* Render photos as non-interactive surfaces: no iOS image lift/save callout. */
.protected-photo,.protected-photo *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;touch-action:manipulation}
.nari-portrait{background-size:cover;background-position:50% 46%;background-repeat:no-repeat}
.bonus-photo{aspect-ratio:3/4;background-size:contain;background-position:center;background-repeat:no-repeat;background-color:#aaa}
.pixel-bubble{pointer-events:none}

.preview-ending{display:block;margin:18px auto 0;padding:12px 16px;border:2px dashed #a1b8af;background:#172e3b;color:var(--cream);font-size:13px;font-weight:400}.preview-note{text-align:center;font-size:12px;line-height:1.7;padding:8px 10px;background:#fff4d6;color:#10182b;border:1px dashed #747c71}

/* Final reward: a bright pixel flower garden, without desktop window chrome. */
#event.final-window{width:min(390px,calc(100vw - 28px));max-width:390px;padding:0;background:#fff6dc;color:#33462d;border:4px solid #759754;box-shadow:0 0 0 3px #f9dbab,7px 8px #060f244d;max-height:calc(100dvh - 32px)}
#event.final-window::backdrop{background:#13213ac9}
.ending-garden{padding:16px 20px 0;text-align:center;background-image:radial-gradient(#edcf9d 1px,transparent 1px);background-size:18px 18px}
.ending-flowers{display:flex;justify-content:center;align-items:flex-end;gap:9px;height:43px;pointer-events:none}.ending-flowers svg{width:32px;height:39px}.ending-flowers svg:nth-child(2),.ending-flowers svg:nth-child(5){width:24px;height:26px}.ending-flowers svg:nth-child(3){filter:hue-rotate(24deg)}.ending-flowers svg:nth-child(4){filter:hue-rotate(315deg)}
.ending-eyebrow{font-size:12px;letter-spacing:1px;margin:14px 0 8px;color:#6a8146}
.final-window .ending-heading{font-size:clamp(24px,7vw,30px);line-height:1.45;margin:0 0 16px;color:#a94f67;font-weight:400;text-shadow:2px 2px #f7d7b5}
.final-photo-frame{padding:7px;background:#f4b9bd;border:2px solid #b87982;box-shadow:3px 4px #e6d7aa}
.final-photo{width:100%;aspect-ratio:4/3;background-position:center;background-size:contain;background-repeat:no-repeat;background-color:#fff9e9}
.final-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background-color:#fff9e9;background-image:linear-gradient(45deg,#fae6d5 25%,transparent 25%,transparent 75%,#fae6d5 75%),linear-gradient(45deg,#fae6d5 25%,transparent 25%,transparent 75%,#fae6d5 75%);background-size:24px 24px;background-position:0 0,12px 12px;background-repeat:repeat}
.final-placeholder svg{width:46px;height:46px}.final-placeholder strong{font-weight:400;font-size:15px;color:#865667}.final-placeholder span{font-size:11px;color:#7b755c}
.final-window .ending-message{font-size:15px;line-height:1.9;margin:18px 0 10px}.ending-message strong{font-weight:400;color:#a94f67}.final-window .ending-save-note{font-size:10px;line-height:1.7;color:#6e765d;margin:0 0 10px}.final-window .ending-preview-note{font-size:10px;color:#8c8072;line-height:1.5;margin:8px 0}
.final-window .win-actions{padding:16px 20px 20px;flex-direction:column;gap:10px;background:#fff6dc}.final-window .win-button{background:#83a85a;color:#fff9df;border:2px solid #42633e;box-shadow:inset 2px 2px #b4cd84,3px 3px #d7d5a6;font-size:15px;min-height:44px}.final-window .win-button+ .win-button{background:#f7e5c9;color:#6d6956;border-color:#c3b38c;box-shadow:2px 2px #e1d1ac;font-size:12px}
@media(max-height:700px){.ending-garden{padding-top:9px}.ending-flowers{height:28px}.ending-flowers svg{height:27px;width:24px}.final-window .ending-heading{font-size:24px;margin-bottom:10px}.final-window .ending-message{margin:12px 0 6px;font-size:13px}.final-photo{aspect-ratio:3/2}}

.album-save-image{display:block;width:100%;max-height:55vh;object-fit:contain;-webkit-touch-callout:default;user-select:auto}
.final-window .win-actions{flex-wrap:wrap}

/* QA: avoid iOS input zoom and keep long nicknames within ranking columns. */
.nickname input{font-size:16px}
.rankrow{grid-template-columns:28px minmax(0,1fr) auto}
.rankrow>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.win-button{min-height:44px}

.nickname-meta{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-top:8px;color:#b3c4bb;font-size:10px;font-weight:400;line-height:1.6}
#nickname-count{white-space:nowrap;font-size:12px;color:var(--cream)}
.rank-name{display:block;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}

/* One continuous spin per card, staggered in two overlapping three-row waves. No full-board hold. */
.wave-preview .card-inner{transition:none;animation:wave-peek var(--wave-turn,600ms) linear both;animation-delay:var(--wave-delay,0ms)}
@keyframes wave-peek{from{transform:rotateY(0deg)}to{transform:rotateY(360deg)}}
/* Keep the same brief reveal timing without 3D motion when motion is reduced. */
@media(prefers-reduced-motion:reduce){.wave-preview .card-inner{animation:wave-peek-reduced var(--wave-turn,600ms) steps(1,end) both!important;animation-delay:var(--wave-delay,0ms)!important}@keyframes wave-peek-reduced{0%,100%{transform:rotateY(0deg)}25%,75%{transform:rotateY(180deg)}}}
