
.tile-surface.modern{background:linear-gradient(140deg,#fffdf5,#efe3c9 85%)}.tile-surface.modern .mark{display:grid;place-items:center;width:100%;height:82%;line-height:1}.tile-surface.modern .mark svg{display:block;width:min(84%,44px);height:min(95%,44px);overflow:visible;filter:drop-shadow(0 1px 0 #ffffffaa)}.tile-surface.modern .caption{font-size:clamp(7px,1.65vw,11px);letter-spacing:.01em}.tile-surface.modern.selected{background:#ffe5a5}.tile-surface.modern.blocked{filter:brightness(.85)}.tile-surface.modern .mark svg *{vector-effect:non-scaling-stroke}.tile-set-preview{display:flex;gap:9px;align-items:center;margin:10px 0 18px}.tile-set-preview .sample{display:grid;place-items:center;width:44px;height:48px;border-radius:6px;background:#fffaf0;border:1px solid #caba9d;box-shadow:2px 2px 0 #b6a27c}.tile-set-preview svg{width:32px;height:32px}.tile-set-preview .sample.classic{font:bold 25px Georgia,serif;color:#a83c35}.setting select{font:inherit;min-height:44px;border:1px solid #849e93;border-radius:10px;padding:7px 10px;background:#fffdf5;color:#25433e;margin-left:6px}
:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#f7f1df;background:#153433}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(circle at 50% 12%,#36645b,#122f34 70%)}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid #ffe9a6;outline-offset:2px}.app{max-width:1000px;margin:auto;padding:14px 12px 32px}.top,.heading,.foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.top h1{font:normal clamp(25px,5vw,41px) Georgia,serif;margin:3px 0}.eyebrow{color:#ebd39c;text-transform:uppercase;letter-spacing:.17em;font-size:11px}.muted{color:#c4d9d0;font-size:14px}.heading{margin:20px 2px 10px;align-items:end}.heading strong{font:normal 23px Georgia,serif}.btn{background:#295650;color:#fff5dc;border:1px solid #839f96;border-radius:13px;min-height:44px;padding:10px 14px;box-shadow:0 2px 0 #143a36}.btn:hover{background:#397367}.btn:disabled{opacity:.48;cursor:default}.frame{padding:10px;border-radius:22px;border:3px solid #c0a776;background:linear-gradient(140deg,#d7be8f,#8c6e45);box-shadow:0 22px 42px #031e2299}.board{height:clamp(320px,61vh,610px);position:relative;overflow:hidden;border-radius:13px;background:radial-gradient(circle,#3b7863,#1b4b4a 78%);touch-action:manipulation}.board:before{content:"";position:absolute;inset:10px;border:1px solid #abc5a260;border-radius:10px;pointer-events:none}.board.contrast{background:#123b3f}.tile-surface{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #d2c2a1;border-radius:7px;padding:0 1px;background:linear-gradient(135deg,#fffdf5,#e9ddc2 82%);box-shadow:2px 3px 0 #b5a27c,3px 5px 4px #0924249c;color:#253b3b;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.tile-surface .mark{font:bold var(--mark) Georgia,serif;line-height:1}.tile-surface .caption{font-size:var(--caption);font-weight:750;line-height:1.05;white-space:nowrap}.tile-surface.red{color:#a83c35}.tile-surface.blue{color:#315e97}.tile-surface.green{color:#237254}.tile-surface.blocked{filter:brightness(.83)}.tile-surface.selected{background:#ffe4a6;outline:3px solid #fff4c7;z-index:150!important;transform:translateY(-3px)}.tile-surface.hint{outline:3px solid #f9db75;z-index:140!important}.tile-surface.clearing{animation:clear .35s ease-in forwards;z-index:170!important;pointer-events:none}.tile-surface.bump{animation:bump .22s ease-out}.spark{position:absolute;pointer-events:none;color:#ffe2a2;z-index:190;animation:spark .4s ease-out forwards}@keyframes clear{0%{opacity:1;transform:scale(1)}35%{opacity:1;transform:translateY(-7px) scale(1.06);filter:brightness(1.2)}100%{opacity:0;transform:translateY(-10px) scale(.8)}}@keyframes glint{0%{opacity:0;transform:scale(.5)}45%{opacity:1}100%{opacity:0;transform:scale(1.7)}}@keyframes bump{50%{transform:translateX(3px);filter:brightness(1)}}@keyframes spark{to{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.5)}}.board.reduced .tile-surface.clearing{animation:none;opacity:0}.controls{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:15px 0 8px}.controls .btn{min-width:92px}.status{text-align:center;min-height:28px;color:#f2d9a5;font-size:14px}.foot{color:#bfd5cd;font-size:13px;flex-wrap:wrap}.overlay{position:fixed;inset:0;background:#071d20d8;display:grid;place-items:center;padding:16px;z-index:300}.overlay.hidden{display:none}.dialog{width:min(100%,600px);max-height:90dvh;overflow:auto;border-radius:22px;background:#f6f0e2;color:#25433e;padding:24px;box-shadow:0 20px 70px #0008}.dialog h2{font:normal 31px Georgia,serif;margin:0 0 10px}.dialog p{line-height:1.5}.dialog .btn{background:#2b5d53;border-color:#2b5d53}.row{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(50px,1fr));gap:8px}.grid .btn{min-width:0;padding:6px}.grid .locked{opacity:.42}.setting{display:block;margin:18px 0}.setting input{width:20px;height:20px;vertical-align:middle;margin-right:9px;accent-color:#327263}.mini{font-size:13px;color:#637971}.badge{display:inline-block;padding:7px 10px;border:1px solid #ad9c76;border-radius:13px;margin:4px}@media(max-width:600px){.app{padding:10px 8px 20px}.frame{padding:6px}.board{height:min(57vh,500px);min-height:300px}.controls{gap:5px}.controls .btn{min-width:75px;font-size:13px;padding:9px 7px}.tile-surface{border-radius:5px}.foot{font-size:12px}}


/* Portrait ceramic tiles and independent cosmetic collections. */
.board{height:clamp(420px,67vh,650px)}
.tile-surface{border-radius:8px;border:1px solid #d4c3a1;background:linear-gradient(135deg,#fffdf7 5%,#f8f0df 70%,#eadcbd);box-shadow:0 3px 0 #cbbb98,1px 5px 0 #a99570,3px 8px 7px #061d2270;overflow:visible}
.tile-surface:before{content:"";position:absolute;inset:3px;border:1px solid #c9b28a65;border-radius:5px;pointer-events:none}
.tile-surface .mark,.tile-surface.modern .mark{width:91%;height:86%;display:grid;place-items:center;line-height:1}
.tile-surface .mark svg,.tile-surface.modern .mark svg{width:95%;height:95%;max-width:none;max-height:none;filter:none}
.tile-surface .caption{display:none}
.garden-art{display:block;width:100%;height:auto;aspect-ratio:1;background-image:url("media/a78f1e6c911ea855.jpg");background-size:800% 400%;background-position:var(--art-x) var(--art-y);background-repeat:no-repeat;mix-blend-mode:multiply;clip-path:inset(4%)}
.tile-surface.selected,.tile-surface.modern.selected{outline:3px solid #fff0b4;box-shadow:0 3px 0 #cbbb98,1px 5px 0 #a99570,0 0 15px #ffe2a877}
.tile-surface.blocked,.tile-surface.modern.blocked{filter:brightness(.80) saturate(.85)}
.tile-surface.style-jade{background:linear-gradient(130deg,#f0fff0,#b8d9ba)}
.tile-surface.style-rose{background:linear-gradient(130deg,#fff4ee,#edc5bd)}
.tile-surface.style-sky{background:linear-gradient(130deg,#f3fbff,#bcd9ed)}
.tile-surface.style-honey{background:linear-gradient(130deg,#fff9dd,#efd18c)}
.tile-surface.style-colour{background:linear-gradient(130deg,#fffdf4,var(--tile-tint))}
.board.board-linen{background:radial-gradient(circle,#a99b82,#776b57)}
.board.board-ocean{background:radial-gradient(circle,#36788a,#153949)}
.board.board-dusk{background:radial-gradient(circle,#6b577b,#292c48)}
.board.contrast{background:#102f34!important}
.collections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 22px}
.collection{border:1px solid #cabb9c;border-radius:14px;padding:12px;background:#fffaf0;min-width:0;display:flex;flex-direction:column;gap:8px}
.collection.active{border:2px solid #337362;padding:11px}
.collection h3{font-size:16px;margin:0}.collection p{font-size:13px;margin:0;line-height:1.35;color:#5e7168}
.collection .btn{font-size:13px;padding:8px;min-height:44px;margin-top:auto}
.collection-preview{display:flex;gap:6px;height:87px;justify-content:center;align-items:center}
.sample-tile{position:relative;display:grid;place-items:center;width:49px;height:67px;flex:none;border-radius:6px;border:1px solid #d1bf9c;background:linear-gradient(135deg,#fffdf7,#f2e7ce);box-shadow:1px 3px 0 #b5a27c}
.collection-preview .sample-tile{width:calc((100% - 12px)/3);max-width:49px;height:auto;aspect-ratio:.75;flex:0 1 auto}
.sample-tile .garden-art{width:90%;height:auto}.sample-tile svg{width:85%;height:85%}
.swatch{height:72px;border-radius:9px;border:1px solid #c5b99e;display:grid;place-items:center}
.unlock-progress{height:6px;border-radius:6px;overflow:hidden;background:#e5ddcd;margin-top:3px}
.unlock-progress span{display:block;height:100%;background:#467d67}
.collection-label{font-size:13px;color:#537263}.dialog h3.section-title{font:normal 21px Georgia,serif;margin:22px 0 6px}
@media(max-width:600px){.board{height:clamp(390px,64vh,600px);min-height:390px}.tile-surface{border-radius:6px}.tile-surface:before{inset:2px}.foot>span:first-child{display:none}.top h1{font-size:28px}.eyebrow{font-size:9px}.app{padding-bottom:10px}.heading{margin-top:13px}.collections{gap:8px}.collection{padding:9px}.collection.active{padding:8px}}

/* Layered tile faces share the same positions as the blocking rules. */
.tile-surface{box-shadow:1px var(--depth,4px) 0 #b09a72,2px calc(var(--depth,4px) + 2px) 6px #061d2275}
.tile-surface[data-layer="1"],.tile-surface[data-layer="2"]{border-color:#c3a36c;box-shadow:0 var(--depth,4px) 0 #c3ad85,2px calc(var(--depth,4px) + 3px) 9px #071b22b3}
.tile-surface.blocked,.tile-surface.modern.blocked{filter:brightness(.86) saturate(.85)}
.tile-surface.covered,.tile-surface.modern.covered{filter:brightness(.70) saturate(.75)}
.tile-surface.selected{z-index:auto!important;transform:none;outline:3px solid #ffdc69;outline-offset:-3px}
.tile-surface.hint{z-index:auto!important;outline:3px solid #ffdc69;outline-offset:-3px}
.tile-surface.selected,.tile-surface.hint{z-index:var(--layer-order)!important}
.tile-surface .mark,.tile-surface .caption{pointer-events:none}

.tile-surface,.sample-tile{background-image:radial-gradient(ellipse at 25% 15%,#ffffffad,transparent 65%),repeating-linear-gradient(119deg,#fff2 0 1px,#c4b38d08 1px 3px),linear-gradient(135deg,#fffdf7,#f2e7ce);border-top-color:#fff6e0;border-left-color:#e7d6b6;box-shadow:inset 0 1px 2px #fff9,inset -2px -3px 4px #a1884933,1px var(--depth,4px) 0 #b09a72,2px calc(var(--depth,4px) + 2px) 6px #061d2275}
.sample-tile{background-color:var(--preview-col,#f2e7ce)}
.style-jade{background:radial-gradient(ellipse at 25% 10%,#fff9,transparent 70%),linear-gradient(135deg,#edf7e7,#b8d9ba)!important}
.style-sky{background:radial-gradient(ellipse at 25% 10%,#fff9,transparent 70%),linear-gradient(135deg,#edf5fc,#bcd9ed)!important}
.style-rose{background:radial-gradient(ellipse at 25% 10%,#fff9,transparent 70%),linear-gradient(135deg,#fff1ed,#edc5bd)!important}
.style-wood{background:repeating-linear-gradient(94deg,#764d2922 0 1px,transparent 1px 7px),linear-gradient(135deg,#e5c398,#bc8756)!important;border-color:#a47e52!important}
.style-charcoal{background:radial-gradient(ellipse at 25% 12%,#626463,transparent 65%),linear-gradient(135deg,#424648,#292e31)!important;border-color:#92918a!important;box-shadow:inset 0 1px 2px #aaa6,inset -2px -3px 4px #0004,1px var(--depth,4px) 0 #686966,2px calc(var(--depth,4px) + 2px) 6px #0008!important}
.style-slate{background:radial-gradient(ellipse at 25% 12%,#89939b,transparent 65%),linear-gradient(135deg,#66727d,#414b55)!important;border-color:#aab8c1!important}
.style-pearl{background:radial-gradient(ellipse at 25% 12%,#fff,transparent 65%),linear-gradient(115deg,#f9f5ee,#e6e2e7 40%,#fff8e8 80%)!important}
.style-gold{background:repeating-linear-gradient(92deg,#ffffff0c 0 .5px,transparent .5px 3px),linear-gradient(125deg,#f7e6ac,#d8b45c 35%,#f5d991 55%,#b88936)!important;border-color:#f5dc8d!important;box-shadow:inset 0 1px 2px #fff8,inset -2px -3px 4px #76561344,1px var(--depth,4px) 0 #956f27,2px calc(var(--depth,4px) + 2px) 6px #071b22a0!important}
.style-gold .garden-art{filter:sepia(.5) saturate(.75)}
.style-charcoal .garden-art,.style-slate .garden-art{filter:url(#white-print);mix-blend-mode:screen}
.style-charcoal svg,.style-slate svg{filter:grayscale(1) brightness(0) invert(1)}
.style-charcoal .art-garden,.style-slate .art-garden{background-image:var(--engraving-image);filter:none;mix-blend-mode:screen}
.style-charcoal:before,.style-slate:before{border-color:#aeb4b577}
.board-river{background:radial-gradient(ellipse at 25% 70%,#8ba09f44,transparent 40%),linear-gradient(140deg,#6b8686,#344e59)!important}
.board-sunset{background:radial-gradient(ellipse at 70% 12%,#d2a46e77,transparent 65%),linear-gradient(140deg,#936b50,#443e40)!important}
.board-moon{background:radial-gradient(ellipse at 80% 10%,#a8c0cf44,transparent 38%),linear-gradient(145deg,#34576b,#142e43)!important}
.reward-board{padding:24px 12px;border-radius:16px;margin:18px 0}
.large-preview{height:170px;margin:20px 0}.large-preview .sample-tile{width:95px;max-width:95px;height:130px;aspect-ratio:auto;flex:none}
.special-reward{border-color:#af8745;background:#fff8e8}
@media(max-width:380px){.large-preview{gap:8px}.large-preview .sample-tile{width:75px;height:101px}}
.art-ocean{background-image:url("media/852a0ec21f1af835.jpg")}
.art-wildlife{background-image:url("media/646d4da8fb40799d.jpg")}
.art-journey{background-image:url("media/fcacd45ea652ced5.jpg")}
:root{--engraving-image:url("media/390a1cc9af721653.jpg")}
.gold-achievement{background:linear-gradient(130deg,#fffae9,#efdcab);border:3px solid #cda452}.gold-achievement h2{color:#785721}

.tile{position:absolute;border:0;padding:0;background:transparent;box-shadow:none;overflow:visible;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}
.tile:focus-visible{outline:3px solid #ffdd84;outline-offset:2px}
.tile-surface{inset:0;width:100%;height:100%;pointer-events:none;transition:transform .16s ease-out,box-shadow .16s ease-out;will-change:auto}
.tile-surface *{pointer-events:none}
.tile-surface.selected{will-change:transform;transform:translateY(-4px) scale(1.015);box-shadow:inset 0 1px 2px #fff8,inset -2px -3px 4px #a1884933,1px calc(var(--depth,4px) + 4px) 0 #b09a72,2px calc(var(--depth,4px) + 7px) 10px #061d22a6!important}
.tile-surface.style-charcoal.selected,.tile-surface.style-slate.selected{box-shadow:inset 0 1px 2px #aaa6,1px calc(var(--depth,4px) + 4px) 0 #686966,2px calc(var(--depth,4px) + 7px) 10px #0009!important}
.tile-surface.style-gold.selected{box-shadow:inset 0 1px 2px #fff8,1px calc(var(--depth,4px) + 4px) 0 #956f27,2px calc(var(--depth,4px) + 7px) 10px #0009!important}
.board.shade-normal .tile-surface.blocked,.board.shade-normal .tile-surface.covered{filter:none}
.board.shade-slight .tile-surface.blocked,.board.shade-slight .tile-surface.covered{filter:brightness(.86)}
.board.shade-dark .tile-surface.blocked,.board.shade-dark .tile-surface.covered{filter:brightness(.62)}
.tile-surface.clearing{will-change:transform,opacity;opacity:1;animation:pair-clear .48s cubic-bezier(.25,.1,.45,1) forwards!important}
@keyframes pair-clear{0%{opacity:1;transform:translateY(-4px) scale(1.015)}30%{opacity:1;transform:translate(var(--clear-shift),-8px) rotate(var(--clear-angle)) scale(1.025)}65%{opacity:.85;transform:translate(var(--clear-shift),-9px) rotate(var(--clear-angle)) scale(.94)}100%{opacity:0;transform:translate(var(--clear-shift),-12px) rotate(var(--clear-angle)) scale(.72)}}
.board.reduced .tile-surface{transition:none!important}
.board.reduced .tile-surface.clearing{animation:pair-fade .05s linear forwards!important}
@keyframes pair-fade{to{opacity:0}}
.shading-choice{border:1px solid #b5ac95;border-radius:12px;margin:20px 0;padding:12px}
.shading-choice legend{font-weight:650}.shading-choice label{display:flex;align-items:center;gap:9px;min-height:46px}.shading-choice input{width:20px;height:20px;accent-color:#327263}

.board{isolation:isolate}

html,body{height:100%;overflow:hidden}
.app{height:100dvh;max-width:1000px;padding:calc(4px + env(safe-area-inset-top)) max(7px,env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom));display:grid;grid-template-rows:48px minmax(0,1fr) 76px;gap:5px}
.play-top{display:grid;grid-template-columns:48px 1fr 48px;align-items:center;margin:0;gap:8px}
#level-label{text-align:center;font-size:14px;color:#f6edd6;font-weight:600}
.icon-button{width:44px;height:44px;padding:9px;min-height:44px;border-radius:12px}
.icon-button svg{width:24px;height:26px;display:block;margin:auto}
.frame{position:relative;height:100%;min-height:0;padding:5px;border-width:2px;border-radius:18px;box-shadow:0 9px 20px #031e2255}
.board{height:100%!important;min-height:0!important;border-radius:11px}
.controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0;align-items:stretch;padding-top:4px}
.controls .btn{position:relative;min-width:0;min-height:60px;padding:7px 2px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:13px;border-radius:13px}
.controls svg{display:block;width:24px;height:26px}
.booster-count{position:absolute;right:6px;top:4px;min-width:19px;height:19px;padding:1px 4px;border-radius:10px;background:#f2dfad;color:#284a42;font-size:11px;font-weight:750;line-height:17px}
.board-toast{position:absolute;z-index:4;bottom:15px;left:12px;right:12px;text-align:center;padding:10px 12px;border-radius:12px;color:#fff3d0;background:#102c2ce8;font-size:14px;pointer-events:none;box-shadow:0 3px 10px #0003}
.board-toast.hidden{display:none}
.tile-surface.entering{animation:tile-settle .48s cubic-bezier(.2,.6,.35,1) both;animation-delay:var(--settle-delay,0ms);will-change:transform}
@keyframes tile-settle{0%{transform:translateY(-16px)}70%{transform:translateY(2px)}88%{transform:translateY(-1px)}100%{transform:translateY(0)}}
.tile-surface.hint{outline:4px solid #008fff!important;outline-offset:-3px;filter:brightness(1.16) saturate(1.12);box-shadow:inset 0 0 0 2px #d8f4ff,0 0 13px #009dffcc,1px var(--depth,4px) 0 #b09a72!important}
.tile-surface.hint.hint-pulse{animation:hint-breathe .8s ease-in-out 1}
@keyframes hint-breathe{0%,100%{filter:brightness(1.16) saturate(1.12)}50%{filter:brightness(1.35) saturate(1.18)}}
.tile-surface.style-charcoal.hint,.tile-surface.style-slate.hint{filter:none;outline-color:#36baff!important;box-shadow:inset 0 0 0 2px #b9eaff,0 0 13px #00aaffc7,1px var(--depth,4px) 0 #747872!important}
.tile-surface.style-charcoal.hint.hint-pulse,.tile-surface.style-slate.hint.hint-pulse{animation:dark-hint-breathe .8s ease-in-out 1}
@keyframes dark-hint-breathe{50%{outline-color:#8cddff;box-shadow:inset 0 0 0 2px #c7f1ff,0 0 20px #36baff,1px var(--depth,4px) 0 #747872}}
.tile-surface.style-charcoal.hint .art-garden,.tile-surface.style-slate.hint .art-garden{filter:brightness(1.25)}
.learn-row{display:flex;justify-content:center;gap:0;margin:22px 0}.learn-row .sample-tile{width:65px;height:87px}
.learn-free{outline:3px solid #d5af58;outline-offset:-3px}.learn-blocked{filter:brightness(.7)}
.learn-stack{position:relative;height:103px;width:120px;margin:16px auto}.learn-stack .sample-tile{position:absolute;width:63px;height:86px;left:10px;top:10px}.learn-stack .sample-tile:last-child{left:40px;top:0}
.preview-note{padding:12px;border-radius:10px;background:#e3ecdf;border:1px solid #c1d1ba;font-size:14px}
@media(max-height:650px){.app{grid-template-rows:44px minmax(0,1fr) 65px;gap:3px}.controls .btn{min-height:55px;font-size:12px}.controls svg{width:20px;height:23px}}
.board.reduced .tile-surface.entering,.board.reduced .tile-surface.hint-pulse{animation:none!important}

/* Ordinary wins: restrained paper confetti, no match sparkles or forced wait. */
.overlay.celebrating{background:#071d205c}
.dialog.win-dialog{position:relative;z-index:2;width:min(100%,410px);text-align:center;padding:28px 24px;border:2px solid #d9bd82;background:radial-gradient(ellipse at 25% 8%,#fffdf5,#f2e6cb);box-shadow:0 8px 0 #a48958,0 20px 45px #041e2380;animation:win-arrive .38s ease-out both}
.win-dialog h2{font-size:clamp(27px,7vw,35px);color:#173f38}
.win-dialog p{margin:12px 0;font-size:14px}.win-dialog .win-level{font-size:19px}.win-dialog .win-stats{font-size:13px;color:#66786b}
.win-dialog .row{justify-content:center;margin-bottom:0}.win-dialog #next{flex-basis:100%;min-height:54px;font-size:20px;font-family:Georgia,serif;box-shadow:0 3px 0 #153f35}
.win-dialog #levels,.win-dialog #collections{min-height:44px;font-size:14px;background:transparent;color:#315e4b;border-color:transparent;box-shadow:none}
.win-dialog.quiet-win{animation:win-fade .15s linear both}
#win-sweep-fx,#win-fx{position:fixed;z-index:1;pointer-events:none;overflow:hidden;border-radius:12px;contain:paint}
#win-fx{z-index:1000;border-radius:0}
.win-sweep{position:absolute;inset:-35% -65%;pointer-events:none;background:linear-gradient(110deg,transparent 37%,#f3d58b00 41%,#f3d58b45 49%,#fff2c134 52%,transparent 61%);animation:win-light .95s ease-out forwards}
.win-paper{position:absolute;display:block;pointer-events:none;border-radius:1px;opacity:0;animation:win-paper-fall var(--paper-time) linear var(--paper-delay) both;will-change:transform,opacity;backface-visibility:hidden}
@keyframes win-arrive{0%{opacity:0;transform:translateY(14px) scale(.95)}75%{opacity:1;transform:translateY(-2px) scale(1.005)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes win-fade{from{opacity:0}to{opacity:1}}
@keyframes win-light{0%{transform:translateX(-32%);opacity:0}25%{opacity:.75}100%{transform:translateX(38%);opacity:0}}
@keyframes win-paper-fall{0%{opacity:0;transform:translate3d(0,0,0)}6%{opacity:1}25%{transform:translate3d(var(--paper-sway),calc(var(--paper-y)*.25),0)}50%{transform:translate3d(calc(var(--paper-sway)*-.65),calc(var(--paper-y)*.5),0)}75%{transform:translate3d(calc(var(--paper-sway)*.8),calc(var(--paper-y)*.75),0)}92%{opacity:1}100%{opacity:0;transform:translate3d(0,var(--paper-y),0)}}
.win-paper b{display:block;width:100%;height:100%;border-radius:1px;background:var(--paper-color);animation:paper-flutter var(--flutter-time) ease-in-out var(--flutter-delay) infinite alternate;transform-origin:center;backface-visibility:visible}
@keyframes paper-flutter{0%{transform:rotate(-32deg) scaleX(.35)}50%{transform:rotate(5deg) scaleX(1)}100%{transform:rotate(38deg) scaleX(.3)}}

/* Botanical home and shared menu surfaces. */
:root{--garden-home:url("media/193410931cc314d3.webp")} 
.overlay:not(.hidden){background-image:linear-gradient(#08251fb0,#08251fd9),var(--garden-home);background-size:cover;background-position:center}
.overlay.celebrating{background-image:none;background-color:#071d205c}
.dialog{border:1px solid #d0b780;background:linear-gradient(145deg,#fffaf0,#eee3cd);box-shadow:0 5px 0 #8e7850,0 20px 65px #001b2580}
.dialog h2{color:#173f38}.dialog .btn{border-color:#b49a61}.dialog .btn:focus-visible{outline-color:#2369a0}
.overlay.home-screen:not(.hidden){padding:0;display:block;overflow:auto;background-image:linear-gradient(#061f1610,#061f1625),var(--garden-home);background-position:center;background-size:cover}
.dialog.home-dialog{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100dvh;width:min(100%,540px);max-height:none;margin:auto;padding:70px 28px 22px;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:center;color:#fff6df;overflow:visible}
.home-settings{position:absolute;top:16px;right:18px;width:48px;height:48px;padding:9px;background:#103c30e8!important;border:1px solid #ccb674!important}.home-settings svg{width:100%;height:100%;stroke:#fff3d5}
.home-dialog h2{font:normal clamp(36px,10vw,60px)/1.04 Georgia,serif;color:#fff4dd;text-shadow:0 2px 15px #00190e;margin:0 0 15px}
.home-flourish{color:#d9bd79;font:26px Georgia;letter-spacing:8px;margin-bottom:18px}
.home-tiles{display:flex;justify-content:center;align-items:center;height:170px;margin:0 0 28px;width:100%}
.home-tile{position:relative;display:flex;width:100px;height:138px;padding:8px;background:linear-gradient(135deg,#fffdf1,#eee2c6);border:2px solid #cdb581;border-radius:12px;box-shadow:0 5px 0 #b29a66,0 10px 12px #001c1880}
.home-tile:first-child{transform:rotate(-12deg) translateY(9px)}.home-tile:nth-child(2){z-index:1;margin:0 -2px;transform:translateY(-8px)}.home-tile:last-child{transform:rotate(12deg) translateY(9px)}
.home-tile .garden-art{width:100%;height:100%}
.home-actions{width:100%;display:grid;gap:13px;max-width:390px}
.home-actions .btn{position:relative;display:flex;justify-content:center;align-items:center;min-height:60px;padding:13px 40px;border:2px solid #cbb277;border-radius:18px;color:#183f32;background:linear-gradient(140deg,#fff9e9,#ecdfc1);font:normal 23px Georgia,serif;box-shadow:0 3px 0 #8d774a}
.home-actions #resume{display:block;min-height:86px;color:#fff3d9;background:linear-gradient(135deg,#276d54,#123c31);font-size:32px;margin-bottom:3px}.home-actions #resume small{display:block;font-size:19px;margin-top:3px}.home-actions .home-icon{position:absolute;left:20px;font:25px system-ui}
.home-brand{font:16px Georgia,serif;color:#e8cd8e;margin:28px 0 0;text-shadow:0 2px 4px #00180f}
.collection-tabs{display:flex;gap:7px;position:sticky;top:-24px;z-index:3;padding:12px 0;background:#f7efdf;overflow-x:auto;flex-shrink:0;border-bottom:1px solid #d2bd91;margin-bottom:16px}.collection-tabs button{flex:1;white-space:nowrap;min-height:46px;border:1px solid #b49a61;border-radius:12px;padding:8px 10px;color:#25463a;background:#fff9ec}.collection-tabs button[aria-selected=true]{background:#285c49;color:#fff6df;box-shadow:inset 0 -3px #d3b371}
.collections .collection{background:#fffaf0;border-color:#d5c298}.collections .collection.active{border-color:#30735a;box-shadow:inset 0 0 0 1px #30735a}
@media(max-height:800px){.dialog.home-dialog{padding-top:60px}.home-dialog h2{font-size:38px}.home-flourish{margin-bottom:8px}.home-tiles{height:135px;margin-bottom:20px}.home-tile{width:82px;height:116px}.home-actions{gap:11px}.home-actions .btn{min-height:52px;font-size:21px}.home-actions #resume{min-height:74px;font-size:28px}.home-brand{margin-top:22px}}


.menu-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.menu-header h2{margin:0;flex:1;font-size:28px}.menu-exit{border-radius:50%;width:44px;height:44px;min-width:44px;padding:9px;display:grid;place-items:center;font-size:29px;line-height:1}.menu-exit svg{width:24px;height:24px}
.compact-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:11px 0;min-height:38px}.compact-setting input{margin:0;flex-shrink:0}.sound-state{margin-left:auto;font-size:14px}.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.settings-actions .btn{font-size:14px;padding:9px 7px}.shading-choice{margin:12px 0 18px;padding:8px}.shade-segments{display:flex;gap:4px}.shading-choice .shade-segments label{position:relative;flex:1;min-height:42px;display:block}.shade-segments input{position:absolute;opacity:0;width:100%;height:100%;margin:0}.shade-segments span{display:grid;place-items:center;min-height:42px;border-radius:8px;border:1px solid #b49d70;font-size:14px}.shade-segments input:checked+span{background:#285c49;color:#fff5df}.shade-segments input:focus-visible+span{outline:3px solid #25699e}
.home-small{display:flex;justify-content:center;gap:12px;margin-top:17px}.home-small .btn{min-height:44px;padding:8px 12px;background:#11392edb;color:#fff3d4;font-size:14px;border-color:#c7ad76}.home-brand{margin-top:12px}.coin-balance{font:30px Georgia;color:#285441}.coin-packs{display:grid;gap:9px}.other-game{padding:16px;background:#fff9ec;border:1px solid #d8c298;border-radius:14px}.game-icon{font-size:48px;color:#285c49}.other-game a{display:inline-flex;align-items:center;text-decoration:none}
.home-tile{align-items:center;justify-content:center}.home-tile:nth-child(2) .garden-art{width:100%;height:auto;aspect-ratio:1;flex-shrink:0}
@media(max-height:720px){.dialog.home-dialog{padding-top:60px;padding-bottom:14px}.home-dialog h2{font-size:33px}.home-tiles{height:115px;margin-bottom:13px}.home-tile{width:73px;height:100px}.home-flourish{margin:0 0 5px;font-size:20px}.home-actions{gap:8px}.home-actions .btn{min-height:46px;font-size:20px;padding-top:9px;padding-bottom:9px}.home-actions #resume{min-height:64px;font-size:26px}.home-actions #resume small{font-size:16px}.home-small{margin-top:12px}.home-brand{margin-top:10px}}


.home-coins{position:absolute;top:16px;left:18px;min-height:48px;max-width:calc(100% - 100px);border:1px solid #ccb674!important;background:#103c30ed!important;color:#fff3d5!important;padding:8px 12px;border-radius:15px;font-size:16px;font-variant-numeric:tabular-nums}
.daily-gift-note{position:absolute;left:18px;top:69px;z-index:3;max-width:calc(100% - 36px);padding:9px 12px;border-radius:12px;border:1px solid #cdb276;background:#fff6df;color:#234c3c;font-size:13px;box-shadow:0 4px 12px #001a2060;pointer-events:none}
.game-coins{min-height:40px;padding:7px 10px;font-size:13px;white-space:nowrap;color:#fff1c6;border-color:#b39b67;font-variant-numeric:tabular-nums}.play-top #level-label{flex:1;text-align:center}.play-top{gap:7px;grid-template-columns:48px minmax(0,1fr) max-content 48px}.game-coins{max-width:110px;overflow:hidden;text-overflow:ellipsis}

.home-flourish{position:relative;width:100%;min-height:29px}.home-flourish .daily-gift-note{left:50%;top:50%;transform:translate(-50%,-50%);max-width:100%;width:max-content;letter-spacing:normal;font-family:system-ui;white-space:nowrap}

.coin-icon{display:inline-block;position:relative;width:22px;height:22px;flex:0 0 22px;border-radius:50%;border:2px solid #b67c1b;background:radial-gradient(circle at 30% 25%,#fff3a7,#f5c54e 45%,#d79b22 80%);box-shadow:inset 0 0 0 2px #ffe59a,0 1px 0 #805512;vertical-align:middle}
.coin-icon:after{content:'❧';position:absolute;inset:1px;display:grid;place-items:center;font:16px Georgia,serif;line-height:1;color:#966115;text-shadow:0 1px #fff0a3}
.home-coins,.game-coins,.reward-wallet{display:flex;align-items:center;justify-content:center;gap:6px}.wallet-number{display:flex;align-items:baseline;gap:4px;white-space:nowrap;font-variant-numeric:tabular-nums}.wallet-number b{font-weight:650}.wallet-number small{font-size:12px}.wallet-plus{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#e5c778;color:#244b3e;font-size:17px;font-weight:700;line-height:1}.game-coins{max-width:none;padding:5px 7px;gap:4px}.game-coins .wallet-number,.reward-wallet .wallet-number{flex-direction:column;gap:0;line-height:1.1}.game-coins .wallet-number small,.reward-wallet .wallet-number small{font-size:10px}.game-coins .coin-icon,.reward-wallet .coin-icon{width:18px;height:18px;flex-basis:18px}.game-coins .coin-icon:after,.reward-wallet .coin-icon:after{font-size:12px}.game-coins .wallet-plus{width:15px;height:15px;font-size:14px}
.booster-count{display:flex;align-items:center;justify-content:center;gap:3px;width:auto!important;min-width:41px;padding:2px 5px!important;border-radius:12px!important}.booster-count .coin-icon{width:14px;height:14px;flex-basis:14px;border-width:1px}.booster-count .coin-icon:after{font-size:9px}.coin-balance .coin-icon{width:30px;height:30px;flex-basis:30px}.coin-balance .coin-icon:after{font-size:22px}
.win-dialog p{font-size:18px;line-height:1.5;margin:16px 0}.win-dialog .win-level{font-size:21px}.win-dialog .win-stats{font-size:18px}.win-dialog .earned-coins{display:flex;align-items:center;justify-content:center;gap:10px;font-size:21px;color:#254f3a}.earned-coins .coin-icon{width:29px;height:29px;flex-basis:29px}.earned-coins .coin-icon:after{font-size:22px}.win-dialog #daily-home{flex-basis:100%;min-height:54px;font:22px Georgia,serif}
#coin-flight{position:fixed;inset:0;z-index:1100;pointer-events:none;overflow:hidden}#coin-flight *{pointer-events:none}.flying-coin{position:absolute}.flying-coin .coin-icon{width:25px;height:25px;flex-basis:25px}.reward-wallet{position:absolute;background:#234f42;border:1px solid #ddc17d;border-radius:13px;padding:5px 7px;color:#fff4d7;box-shadow:0 0 12px #e4bb6270;font-size:13px}

.contrast-state,.reduced-state{margin-left:auto;font-size:14px}.settings-collections{width:100%;margin:0 0 12px}.earned-coins{display:flex;align-items:center;justify-content:center;gap:10px;font-size:22px}

.daily-week{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0}.daily-day{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 3px;border:1px solid #cbb98e;border-radius:12px;background:#fff8e9;text-align:center}.daily-day strong{font-size:15px}.daily-day b{font-size:12px;white-space:nowrap}.daily-day span{font-size:10px;color:#687668}.daily-day.today{background:#285c49;border:2px solid #d1ab4e;color:#fff6dc;box-shadow:0 0 0 2px #e5cb83}.daily-day.today span{color:#fff3cb}.daily-day.collected{background:#e0ebdb}.daily-day .coin-icon{width:27px;height:27px;flex-basis:27px}.daily-day .coin-icon:after{font-size:20px}.daily-gift-dialog .earned-coins{font-size:21px}.daily-welcome{font-size:17px}
#coin-spend{position:fixed;z-index:1200;background:#fff4dc;color:#86432d;border:1px solid #d6b575;border-radius:12px;padding:8px 12px;pointer-events:none;font-size:18px;font-weight:700;box-shadow:0 3px 12px #001c2360;animation:coin-spend-rise 1.8s ease-out both}#coin-spend.quiet-spend{animation:none}
@keyframes coin-spend-rise{0%{opacity:1;transform:translateY(3px)}15%,75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
@media(max-width:380px){.daily-day{gap:7px;padding:10px 2px}.daily-week{gap:6px}.daily-gift-dialog{padding:20px}.daily-gift-dialog .menu-header h2{font-size:26px}}


.menu-exit{padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0}.menu-exit svg{display:block;width:24px;height:24px}.other-game img.game-icon{object-fit:contain;border-radius:16px}

/* Tile buttons are hit areas only: the complete face, rim and shadow animate together. */
.board > .tile{background:transparent!important;border:0!important;box-shadow:none!important}

.app{max-width:none}.home-coins{font-size:13px}

/* Standalone browser edition */
.app{max-width:none;grid-template-rows:auto minmax(0,1fr) 26px;gap:7px;padding:8px}.web-mah-toolbar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.web-mah-toolbar strong{font:23px Georgia;margin-right:8px}.web-mah-toolbar .btn{min-height:34px;padding:7px 9px;font-size:12px;margin:0;background:#ffffff14;border:1px solid #ffffff35;color:#f8f1da;border-radius:7px}.web-mah-info{font-size:12px;opacity:.85;text-align:center;align-self:center}.frame{box-shadow:none}.board{height:100%;min-height:0}.home-coins,.game-coins,.booster-count{display:none!important}.collections .collection p:empty{display:none}@media(max-width:600px){.web-mah-toolbar strong{width:100%;font-size:20px}.web-mah-toolbar .btn{font-size:11px;padding:6px}.web-mah-toolbar{gap:4px}}

.web-mah-toolbar .save-warning{width:100%;font-size:12px;line-height:1.4;background:#705424;padding:8px;border-radius:6px}.web-mah-toolbar [hidden]{display:none!important}.web-mah-info{font-variant-numeric:tabular-nums}.web-mah-toolbar button:disabled{opacity:.4;cursor:default}@media(max-width:600px){.web-mah-toolbar .btn{min-height:42px;font-size:12px;padding:7px 9px}.web-mah-toolbar{gap:5px}.web-mah-info{font-size:11px}}

/* Comfortable controls for touch and clear keyboard navigation. */
button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #ffe4a2;outline-offset:2px}
@media(pointer:coarse){.web-mah-toolbar .btn{min-height:44px;min-width:44px}}

/* Rounded outer shell with inset scrolling contents and stationary controls. */
.overlay .dialog{padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}
.dialog>.menu-header{flex:none;margin:0;padding:16px 18px 12px;border-bottom:1px solid #d8cfb8}
.menu-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 20px 22px;margin:0 5px 8px;scrollbar-width:thin;scrollbar-color:#a79e87 transparent}
.menu-scroll::-webkit-scrollbar{width:7px}.menu-scroll::-webkit-scrollbar-thumb{background:#a79e87;border-radius:8px}
/* Stronger symbols and distinct ceramic sides at every layer. */
.board .tile-surface .mark,.board .tile-surface.modern .mark{width:98%;height:96%;font-weight:900;color:#172c29}
.board .tile-surface .mark svg,.board .tile-surface.modern .mark svg{width:100%;height:100%;filter:contrast(1.25) saturate(1.2)}
.board .tile-surface .mark svg text{stroke-width:1.15px}
.board .tile-surface .garden-art{filter:contrast(1.35) saturate(1.22);transform:scale(1.06)}
.board .tile-surface{border:1px solid #a58d61;box-shadow:1px 2px 0 #e4d4ad,2px var(--depth,5px) 0 #8a7046,3px calc(var(--depth,5px) + 2px) 0 #4f432d,5px calc(var(--depth,5px) + 5px) 8px #00100ed0}
.board .tile-surface[data-layer="1"]{box-shadow:2px var(--depth,5px) 0 #927747,4px calc(var(--depth,5px) + 3px) 0 #4c3b25,5px 11px 10px #00100ee0}
.board .tile-surface[data-layer="2"],.board .tile-surface[data-layer="3"],.board .tile-surface[data-layer="4"]{box-shadow:2px var(--depth,5px) 0 #977b4c,4px calc(var(--depth,5px) + 3px) 0 #483720,6px 13px 12px #00100eed}
.board .tile-surface.selected{outline:3px solid #ffe29b}.board .tile-surface.hint{outline:3px solid #f9db75}

.app{grid-template-rows:auto minmax(0,1fr);gap:5px;padding-bottom:4px}.web-mah-info{margin-left:auto;text-align:right;opacity:1;font-size:11px;line-height:1.4}.frame{padding:2px}.web-mah-toolbar{gap:5px}@media(max-width:700px){.web-mah-info{width:100%;text-align:right}.web-mah-toolbar strong{width:auto}.web-mah-toolbar .btn{min-height:40px}}

/* Gentle static table angle. Native button hit areas transform with the board. */
.frame{perspective:1600px;perspective-origin:50% 42%;overflow:visible}
.frame>.board{transform:rotateX(10deg) scale(.985);transform-origin:50% 50%;backface-visibility:hidden}
.board .tile-surface{border-top-color:#fff7e4;border-left-color:#e7d8b8;border-right-color:#9b8257;border-bottom-color:#8a7048;box-shadow:1px 2px 0 #e8d8b4,2px var(--depth,6px) 0 #a68a58,3px calc(var(--depth,6px) + 2px) 0 #544127,5px calc(var(--depth,6px) + 5px) 9px #00100ecc}
.board .tile-surface[data-layer="1"],.board .tile-surface[data-layer="2"],.board .tile-surface[data-layer="3"],.board .tile-surface[data-layer="4"]{box-shadow:1px 2px 0 #e8d8b4,2px var(--depth,6px) 0 #a68a58,3px calc(var(--depth,6px) + 2px) 0 #544127,5px calc(var(--depth,6px) + 5px) 10px #00100edd}
@media(max-width:600px){.frame{perspective:1200px}.frame>.board{transform:rotateX(7deg) scale(.985)}}

@media(max-width:600px){
 .app{padding:4px 2px;gap:3px}
 .frame{padding:0;border-width:1px;border-radius:8px;perspective:none}
 .frame>.board{transform:none;border-radius:6px}
 .web-mah-toolbar strong{display:none}
 .web-mah-toolbar{gap:4px;padding:0 3px}
 .web-mah-toolbar .btn{font-size:12px;padding:5px 7px}
}

@media(max-width:600px){
 .web-mah-toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:0}
 .web-mah-toolbar .btn{min-width:0;min-height:42px;padding:4px 3px;font-size:11px;flex:1 1 0;white-space:nowrap;box-shadow:none}
 .web-mah-toolbar #menu{flex:1.65 1 0}
 .web-mah-toolbar .icon-control{flex:.65 1 0;font-size:21px;padding:2px}
 .web-mah-toolbar #restart{flex:1.15 1 0}
 .web-mah-info{flex:0 0 100%;font-size:10px;line-height:14px}
 [hidden]{display:none!important}
}

/* Flat playing surface; solid ceramic tile sides with one cast shadow. */
.frame{perspective:none}.frame>.board{transform:none}
.board .tile-surface,.board .tile-surface[data-layer]{box-shadow:2px var(--depth,6px) 0 #a68a58,4px calc(var(--depth,6px) + 5px) 9px #00100ecc}

.web-mah-toolbar select.btn{max-width:180px;background:#244e3d;color:#fff;cursor:pointer}.web-mah-toolbar select option,.web-mah-toolbar select optgroup{background:#fff;color:#173b2b}
