/* Friendly jewel garden — focused play HUD and individually authored assets. */
:root{color-scheme:light;--ink:#244a47;--purple:#247f78;--cream:#fffaf0;--mint:#56bbae}
html,body{background:#123c40;color:var(--ink);font-family:'Trebuchet MS',Arial,sans-serif}
body{background-image:radial-gradient(ellipse at 15% 3%,#668a79 0,transparent 52%),radial-gradient(ellipse at 95% 62%,#285d5d 0,transparent 58%),linear-gradient(#244e51,#12383b);background-attachment:fixed}
.game,.world-3d .game{width:min(100%,500px);height:100svh;min-height:550px;max-height:1000px;padding:max(13px,env(safe-area-inset-top)) 8px max(12px,env(safe-area-inset-bottom));gap:8px;background:none}
[hidden]{display:none!important}
.game>header.play-hud{height:118px;min-height:118px;margin:0 10px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.objective{display:flex;flex-direction:column;align-items:flex-start;gap:7px;flex-shrink:0}
.level-link{padding:0 2px;color:var(--ink);font-size:14px;font-weight:900;letter-spacing:.3px;min-height:24px;min-width:0;display:flex;align-items:center;gap:5px}
.level-link strong{display:inline;font-size:19px;color:var(--ink)}
.target{border:2px solid #fffdf5;background:linear-gradient(135deg,#fffdf6,#f8e9cf);box-shadow:0 4px 0 #b7965e,0 7px 13px #002c3522;min-width:84px;width:84px;max-width:none;height:82px;border-radius:20px;padding:5px 10px;display:flex;flex-direction:column;gap:0;justify-content:center;flex:none;color:#405044}
.target img{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 3px 2px #234b4633)}
.target #target-progress{font-size:17px;font-weight:900;margin:0;line-height:20px}
.resources{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-top:1px}
.balance{border:2px solid #fffcf5;background:linear-gradient(#fffef8,#f8eddf);border-radius:16px;box-shadow:0 3px 0 #b59d70,0 6px 9px #123d4415;min-width:75px;height:39px;padding:4px 7px;color:#394d42;gap:3px;font-size:15px}
.balance>img{width:25px;height:27px;object-fit:contain}.balance small{font-size:7px;color:#677867}.wallet-plus{font-size:20px;line-height:20px;color:#ae8132;margin-left:2px}
.board,.world-3d .board{max-height:none;min-height:235px;margin:0;flex:1;aspect-ratio:auto}
.board{background:linear-gradient(135deg,#fff1d1,#efd9bb);box-shadow:0 5px 0 #a88950,0 12px 0 #265456,0 17px 18px #002c3433}
.slot{background:linear-gradient(#508c94,#6cadac);border-color:#d5c6b4}.slot.locked .lock-content{opacity:.65}.slot.locked .lock-content>span{color:#f6e9cc;font-size:9px}.lock-content small{color:#fff9e8}
.world-3d .slot .lock-content img{filter:drop-shadow(0 2px 1px #183c4330)}
.deal-row{margin:0;min-height:59px;height:59px;flex-shrink:0}
.primary,.primary.teal,.deal-row .primary{background:linear-gradient(#7cd9c5 0%,#49b9a7 55%,#3bab9c 100%);border:2px solid #d0fae6;border-radius:23px;box-shadow:0 5px 0 #328d89,0 8px 12px #002c352b;color:#fffef1;font-weight:900;text-shadow:0 2px 0 #277f7b80;letter-spacing:.5px;min-height:53px;height:53px;min-width:220px;padding:8px 25px}
#deal{min-width:230px;gap:10px;font-size:18px}#deal>img{width:53px;height:53px;margin-top:-8px;filter:drop-shadow(0 3px 2px #377d7e33)}
#deck-count{left:34px;bottom:0;background:#fff9e8;color:#38554d;border:1px solid #9ed9cb;box-shadow:0 2px 0 #78aaa2;font-size:9px}
.toolbar,.world-3d .toolbar{margin:1px 8px 0;min-height:78px;max-height:90px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0;flex-shrink:0}
.play-tools{display:flex;align-items:center;justify-content:center;gap:13px;flex:1}
.tool{flex:none;min-height:52px;position:relative;display:flex;align-items:center;justify-content:center;gap:0;padding:0;background:none}
.tool .square{width:58px;height:58px;padding:7px;border-radius:18px;background:linear-gradient(#fffdf9,#eee1c6);border:2px solid #fff;box-shadow:0 4px 0 #ad8d59,0 7px 8px #123b442b}
.tool .square img{width:100%;height:100%;filter:drop-shadow(0 2px 2px #23454033)}
.tool b{right:-5px;bottom:-4px;background:#247b74;border:2px solid #fff1d1;box-shadow:0 2px 0 #163f43;min-width:23px;height:23px;line-height:19px;font-size:11px;color:white}
.tool:disabled{opacity:.45;filter:saturate(.5)}.tool.active .square{background:#e1fff5;border-color:#fafff2;box-shadow:0 0 0 3px #85d6c2,0 4px 0 #74b9af}
.shop-tool{width:76px;height:80px;flex-direction:column}.shop-tool>img{width:74px;height:70px;object-fit:contain;filter:drop-shadow(0 3px 2px #123d442b)}.shop-tool>span{font-size:11px;font-weight:900;color:#fff0d3;line-height:13px;margin-top:-2px}
.settings-tool .square{width:49px;height:49px;padding:6px;border-radius:16px}
#overlay{background:#092c36b8;backdrop-filter:blur(5px)}
.sheet{background:linear-gradient(145deg,#fffdf5,#eae1ca);border:3px solid #fff;border-radius:28px;box-shadow:0 7px 0 #b79a64,0 18px 50px #001c3366;color:var(--ink);padding:21px;max-height:calc(100svh - 38px)}
.sheet h1{color:#285e59;font-size:25px;font-weight:900;letter-spacing:-.5px}.sheet p,.muted{color:#647267}.sheet p{font-size:12px;line-height:1.5}.square{background:linear-gradient(#fff,#ecdfc4);border-radius:14px;box-shadow:0 3px 0 #b69b65;padding:9px}
#close{width:39px;height:39px;flex-shrink:0;background:#bd6850;border:2px solid #ffe9c7;box-shadow:0 3px 0 #814736;position:relative}
#close img{display:none}#close:before,#close:after{content:'';width:18px;height:4px;border-radius:3px;background:#fff7ec;position:absolute;left:8px;top:15px;transform:rotate(45deg)}#close:after{transform:rotate(-45deg)}
.question{background:#f4e9cc;color:#38645c;border:1px solid white;box-shadow:0 2px 0 #beaa79;font-family:inherit;font-weight:900}
.sheet .inline-link,.sheet .legal-links button{color:#3e7067}.tabs button{background:#e4dac3;color:#456457}.tabs button.active{background:#267e75;color:white}.shop-wallet{color:#5e5635}.shop-row,.shop-row.pack{border:1px solid #d2bd8e;background:#fffaf3;border-radius:19px;padding:12px;margin:10px 0}.shop-row p{margin:5px 0;font-size:10px}.shop-row>img{width:54px;height:54px;object-fit:contain}.shop-row strong{font-size:14px}
.buy,.sheet .buy{background:linear-gradient(#9ddfce,#64baa9);color:#fffdf2;border:2px solid #d0f4df;border-radius:14px;box-shadow:0 3px 0 #46998f;min-height:44px;padding:10px;font-weight:800;font-size:13px}
.menu-actions,.support-list{display:grid;gap:8px;margin:20px 0 8px}.menu-actions button,.support-list button{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;min-height:47px;border-radius:15px;background:#eae0c7;color:#315c54;font-size:13px;font-weight:800}.menu-actions button span,.support-list button span{font-size:12px;color:#6b816c}
.toggle-row{border-color:#d9c7a2}.toggle-row>img{display:none}.toggle{background:#65c4b1;box-shadow:0 2px 0 #479e95}.toggle.off{background:#adb9ac;box-shadow:0 2px 0 #869b8f}.sound-slider{accent-color:#328a7e}.daily-card{background:#fff3de}.ad-offer{background:#ddf4e9;border-color:#b8e6d4}.ad-offer button{background:#71bca8}.notice{background:#e7ddc7;color:#5c7262}.coin-reward{color:#b48a36}
.help-tools{grid-template-columns:repeat(3,1fr)}.help-tools button{background:#eae0c9;color:#365d55}.help-tools img{width:53px;height:53px}.help-tools span{font-size:10px}.help-details button{color:#365d55}.recipe,.jewel-card{background:#fff7ed;border-color:#d7c29a}.jewel-card strong,.jewel-card small{color:#365d55}.jewel-card.unseen{opacity:.45}.level-grid button{background:#e9dec6;color:#3b6158}.level-grid button.current{background:#9edccc;color:#356c68}.level-grid button.done{background:#b8e1cd}.version{color:#899080}
#toast{background:#174b4aef;border:1px solid #d6b879;box-shadow:0 4px 15px #123b4433;color:#fff9f0;border-radius:16px}
#launch{background:radial-gradient(ellipse at 50% 30%,#fff9eb,#e8dcf6 70%,#d3e9e8)}.launch-title{color:#8861a9;text-shadow:0 3px 0 #fff7f3}.launch-subtitle{color:#9475b0}.launch-caption,#load-status{color:#9c83ae}.load-track{background:#d7c7e7;border-color:#c5acd9}.load-track span{background:linear-gradient(90deg,#9e7fc2,#7fcebd)}
@media(max-width:390px){.game>header.play-hud{margin:0 7px}.resources{gap:5px}.balance{min-width:70px;padding:4px 5px;font-size:13px}.balance small{font-size:6px}.toolbar,.world-3d .toolbar{gap:5px;margin-left:5px;margin-right:5px}.play-tools{gap:8px}.tool .square{width:51px;height:51px;padding:5px}.shop-tool{width:66px}.shop-tool>img{width:66px;height:65px}.settings-tool .square{width:43px;height:43px}}
@media(max-height:740px){.game,.world-3d .game{gap:5px;min-height:520px;padding-top:max(9px,env(safe-area-inset-top));padding-bottom:max(9px,env(safe-area-inset-bottom))}.game>header.play-hud{height:102px;min-height:102px}.objective{gap:4px}.target{height:71px;width:76px;min-width:76px;border-radius:17px}.target img{height:41px;width:41px}.target #target-progress{font-size:15px}.level-link{font-size:12px}.level-link strong{font-size:17px}.toolbar,.world-3d .toolbar{min-height:69px;height:69px}.shop-tool{height:69px}.shop-tool>img{height:59px}.deal-row{height:54px;min-height:54px}.deal-row .primary{height:49px;min-height:49px}.board,.world-3d .board{min-height:210px}}

.hint-mark{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:52px;height:52px;border-radius:18px;background:#e5d5ae;color:#36766c;font-size:34px;font-weight:900;box-shadow:inset 0 2px 0 #fff8,0 3px 0 #bca470}.primary,.primary.teal,.deal-row .primary,.buy,.sheet .buy{color:#194e53;text-shadow:0 1px 0 #b0ebd999}

.world-3d .slot.locked{opacity:1}.world-3d .slot.locked .lock-content{opacity:.8}.world-3d .slot.locked .lock-content>img{filter:brightness(.65) saturate(.5)}.world-3d .slot.add-slot .lock-content{opacity:1}.world-3d .slot.add-slot .lock-content>img{filter:drop-shadow(0 2px 1px #46767a)}
@media(max-height:740px){.game>header.play-hud{height:89px;min-height:89px}.target{height:60px}.target img{width:33px;height:33px}.target #target-progress{font-size:14px;line-height:17px}}

.shop-wallet{background:#e6dabe;border-radius:17px}.sheet h1{font-family:inherit}

/* Keep the title and close action visible while long menus scroll. */
.sheet{display:flex;flex-direction:column;overflow:hidden}.sheet>header{flex-shrink:0}#sheet-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 2px 4px}

/* Atelier collection: warm enamel, petrol velvet, champagne edges. */
@font-face{font-family:'Lilita One';src:url('assets/fonts/LilitaOne-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
:root{--ink:#294e48;--purple:#2e7e73;--cream:#fff9e9;--mint:#62b5a0}
html,body{color:var(--ink)}
body{background:radial-gradient(ellipse at 50% 20%,#567e70 0,#285758 49%,#113c41 100%);background-attachment:fixed}
.level-link,.level-link strong{color:#fff5d8;text-shadow:none;filter:none;line-height:1.1}
.level-link:before,.level-link:after,.level-link strong:before,.level-link strong:after{content:none}
.level-link{font-family:'Lilita One',sans-serif;font-weight:400;font-size:15px}.level-link strong{font-weight:400;font-size:21px}
.sheet h1,.sheet h2,.primary,.shop-row strong,.tabs button{font-family:'Lilita One','Trebuchet MS',sans-serif;font-weight:400}
.sheet h1{font-size:28px;letter-spacing:0}.sheet h2{color:#285e59}.sheet p{color:#627165}
.primary,.primary.teal,.deal-row .primary,.sheet .primary{background:transparent url('assets/premium-play-button.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;color:#fff9de;text-shadow:0 2px 1px #07514c;min-height:62px;height:62px;letter-spacing:.6px;font-size:18px;padding:13px 30px}
#deal{width:265px;max-width:85vw;font-size:21px;gap:9px}#deal>img{height:49px;width:49px;margin-top:-2px}#deck-count{background:#fff3ce;border-color:#d9ba73;color:#305b4f}
.deal-row{height:64px;min-height:64px}.shop-tool>span{color:#f6e8c7;font-family:'Lilita One',sans-serif;font-size:13px;letter-spacing:.4px}.shop-tool>img{filter:drop-shadow(0 3px 2px #15373666)}
.tool .square{background:linear-gradient(#fff8e8,#e7d8b7);border-color:#f9e9be;box-shadow:0 4px 0 #ae8b51,0 7px 9px #103b4344}.tool b{background:#287f73;border-color:#ffedbc;box-shadow:0 2px 0 #163e40}
.balance{box-shadow:0 3px 0 #b59a61,0 5px 9px #133e4322}.target{box-shadow:0 4px 0 #b99a5c,0 8px 14px #123f4333}
.sheet{background:linear-gradient(155deg,#fffaf0,#f3ead6);border:2px solid #e5c78c;box-shadow:inset 0 0 0 3px #fff7de,0 6px 0 #9d8052,0 20px 70px #001c3370;padding:19px 17px 22px;border-radius:25px;max-width:450px}
.sheet>header{margin-bottom:15px;padding:0 5px 13px;border-bottom:1px solid #d9c496}
#sheet-body,.collection-grid,.sheet,#shop-content{scrollbar-width:none}#sheet-body::-webkit-scrollbar,.collection-grid::-webkit-scrollbar,.sheet::-webkit-scrollbar,#shop-content::-webkit-scrollbar{display:none;width:0;height:0}
#sheet-body{overflow-x:hidden;padding:0 2px 4px}.shop-wallet{background:transparent;color:#806128;padding:3px;font-family:'Lilita One',sans-serif;font-size:29px}.shop-wallet img{width:37px;height:37px}
.tabs{background:#e4dac4;border-radius:15px;padding:4px;gap:4px;margin:12px 0}.tabs button{font-size:17px;background:none;border-radius:11px;padding:10px}.tabs button.active{background:linear-gradient(#398f80,#236f68);box-shadow:0 2px 0 #20544e;color:#fff5d7}
.shop-row,.shop-row.pack{display:grid;grid-template-columns:48px minmax(0,1fr) 80px;gap:7px;min-width:0;min-height:102px;margin:8px 0;padding:15px 15px;background:transparent url('assets/premium-shop-card.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
.shop-row>div{min-width:0}.shop-row strong,.shop-row.pack strong{font-size:16px;line-height:1.15;display:flex;align-items:center;flex-wrap:wrap;gap:3px;overflow-wrap:anywhere}.shop-row p{font-size:10px;line-height:1.3;margin:5px 0 0;color:#70806e}.shop-row>img,.shop-row.pack>img{width:48px;height:51px;object-fit:contain}.shop-row .hint-mark{width:42px;height:44px;border-radius:14px;font-size:29px}
.shop-row .question{width:20px;height:20px;min-width:20px;font-size:12px;box-shadow:none;margin:0}
.buy,.sheet .buy,.shop-row.pack .buy{background:transparent url('assets/premium-play-button.webp') center/100% 100% no-repeat;border:0;box-shadow:none;border-radius:0;color:#fff7d8;min-width:0;width:80px;min-height:48px;height:48px;padding:8px;justify-content:center;gap:2px;font-size:12px;text-shadow:0 1px 1px #08433d;letter-spacing:0;white-space:normal}
.buy:disabled{opacity:.65;filter:saturate(.45)}.buy img{width:15px;height:17px}.pack .buy{font-size:11px}
.collection-count{text-align:center;font-size:13px;color:#7c815f;margin:0 0 14px}.jewel-card{border:1px solid #e2d2b2;background:linear-gradient(#fffdf7,#f0e5ce);padding:13px 3px;min-width:0}.jewel-card strong{overflow-wrap:anywhere;font-size:10px}.jewel-card.unseen{opacity:1;background:#e7dfcd;color:#8d9585;border:1px dashed #c0bea6}.jewel-card.unseen strong{color:#8a9485;font-weight:400;font-size:9px}.mystery-gem{width:68px;height:68px;display:inline-flex;justify-content:center;align-items:center;color:#a8af99;font-family:'Lilita One',sans-serif;font-size:35px}.recipe .mystery-gem{width:36px;height:39px;font-size:25px}
.toggle-row{background:#f0e8d6;border:1px solid #e2d4b5;border-radius:16px;padding:13px 14px;margin:9px 0;min-height:59px;gap:8px}.toggle-row>span{font-weight:700;font-size:14px}.toggle{background:#2b8b78;min-width:72px;min-height:34px;box-shadow:inset 0 2px 3px #145b5544;border:1px solid #226955;color:#fff9e0;padding:8px 12px;font-weight:800}.toggle.off{background:#c8cdbb;color:#65776a;border-color:#b5c1aa;box-shadow:inset 0 2px 3px #56714e22}.sound-slider{width:42%;min-width:0;accent-color:#2f8a76}.toggle-row output{font-size:11px;color:#6b7e6c;min-width:32px}.menu-actions{margin:15px 0 6px;gap:8px}.menu-actions button,.support-list button{background:#e9e0cc;border:1px solid #d9c9a6;color:#3b6256;min-height:48px}.menu-actions button span{color:#6e8873;font-size:18px}.sheet .muted{color:#788474}.sheet .primary{max-width:100%;min-width:0;width:100%;font-size:16px}.sheet .legal-links{margin-top:8px}.version{color:#879380}.hint-mark{color:#3e7b6d;background:#efe0b9;box-shadow:inset 0 2px 0 #fff8,0 3px 0 #c6b17d}
#launch{background:#123e44 url('assets/premium-title-background.webp') center/cover no-repeat;padding:0;overflow:hidden;isolation:isolate;align-items:flex-start}
#launch:before{content:'';position:absolute;inset:0;background:linear-gradient(transparent,#09373919 25%,#083b4333 55%,transparent 70%);z-index:-1;pointer-events:none}
.launch-inner{position:relative;width:min(90%,420px);padding-top:clamp(110px,23svh,230px);z-index:1}.launch-title{font-family:'Lilita One',sans-serif;font-size:clamp(43px,12vw,62px);font-weight:400;line-height:.94;letter-spacing:1px;color:#fff0bd;-webkit-text-stroke:1px #956c36;paint-order:stroke fill;text-shadow:0 3px 0 #806032,0 5px 10px #002f34b0;margin:0}.launch-subtitle{font-family:'Lilita One',sans-serif;font-weight:400;color:#ecdcad;font-size:16px;letter-spacing:5px;margin:15px 0 40px;text-shadow:0 2px 3px #123e43}
#launch-play{width:min(280px,85%);min-width:0;height:82px;font-size:27px;letter-spacing:1.3px;margin:auto}.load-track{background:#163e43;border-color:#b19c68}.load-track span{background:linear-gradient(90deg,#5abbaa,#f9dda0)}#load-status{color:#fff3cf;text-shadow:0 1px 3px #083d43;font-size:12px}
.launch-sparkles{position:absolute;inset:0;pointer-events:none}.launch-sparkles i{position:absolute;left:var(--x);top:var(--y);width:22px;height:22px;background:#fff5d5;clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);opacity:0;animation:title-glint 4.8s var(--delay) infinite;filter:drop-shadow(0 0 6px #ffdc8c)}@keyframes title-glint{0%,65%,100%{opacity:0;transform:scale(.25) rotate(0)}75%{opacity:.85;transform:scale(1) rotate(15deg)}85%{opacity:.15;transform:scale(.45) rotate(35deg)}}
@media(max-width:360px){.sheet{padding:17px 10px}.shop-row,.shop-row.pack{grid-template-columns:37px minmax(0,1fr) 68px;gap:5px;padding:13px;min-height:97px}.shop-row>img,.shop-row.pack>img{width:37px;height:44px}.buy,.sheet .buy,.shop-row.pack .buy{width:68px;font-size:11px}.shop-row strong,.shop-row.pack strong{font-size:14px}.sheet h1{font-size:25px}}
@media(max-height:740px){.deal-row{height:58px;min-height:58px}.deal-row .primary{height:58px;min-height:58px}.launch-inner{padding-top:21svh}.launch-subtitle{margin-bottom:28px}}
@media(prefers-reduced-motion:reduce){.launch-sparkles{display:none}}
#deck-count{font-family:'Trebuchet MS',Arial,sans-serif;font-size:11px;line-height:15px;min-width:26px;padding:1px 5px;bottom:0;text-shadow:none;background:#fff1cb;color:#224d47;border-color:#d9b66b}

#performance-readout{position:fixed;left:50%;bottom:max(4px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:9999;max-width:95vw;white-space:nowrap;padding:4px 9px;border-radius:8px;background:#002e32ed;color:#fff3d4;font:12px system-ui;pointer-events:none}#performance-readout[hidden]{display:none}
