.forest-bg:after{content:'';position:absolute;inset:0;background:url('assets/moonforest.png') center/cover;opacity:0;transition:opacity 1.2s ease}body[data-biome='moon'] .forest-bg:after{opacity:1}body[data-biome='moon'] .play-area{background:linear-gradient(#64677d,#3d4c60);border-color:#283c48;box-shadow:inset 0 3px #bbc6d255,inset 0 -7px #303a4c,0 9px #172e39,0 16px 50px #08222e88}body[data-biome='moon'] .cell:not(.open):not(.marked){background:linear-gradient(#79acaa,#4d8587);border-color:#92bebb;box-shadow:inset 0 2px #cfeddf66,inset 0 -4px #37666e,0 2px #254f58}body[data-biome='moon'] .cell.open{background:#cbdad0;border-color:#a8bdb6}body[data-biome='ancient'] .forest-bg{filter:saturate(1.15) hue-rotate(-8deg)}.home-screen{min-height:800px}.adventure-home{display:flex;gap:13px;position:relative;z-index:3;width:550px;max-width:96%;margin:24px auto 0}.adventure-tile{display:flex;align-items:center;gap:12px;flex:1;position:relative;padding:10px 14px;border:3px solid #3b5131;border-radius:15px;background:linear-gradient(#5c7847ed,#365338ed);box-shadow:inset 0 2px #bed59866,0 5px #183d2b;min-width:0;text-align:left}.adventure-tile:hover{filter:brightness(1.13);transform:translateY(-2px)}.adventure-tile b{font-size:14px;color:#fff0b6;display:block;letter-spacing:.5px}.adventure-tile small{font-size:10px;color:#cad7a9;display:block;margin-top:4px;line-height:1.4}.tile-emblem{font-size:40px;color:#f7dd91;filter:drop-shadow(0 3px #5c6337)}.adventure-tile em{position:absolute;right:-7px;top:-9px;font-size:15px;font-style:normal;background:#f5d98b;color:#71532e;border:3px solid #695c35;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;box-shadow:0 3px #2d492c}.adventure-tile.has-reward{border-color:#e8ce80;box-shadow:inset 0 2px #f5e7b177,0 5px #425934,0 0 24px #e5ce6333}.relic-art{background-image:url('assets/relics.png');background-repeat:no-repeat;background-size:300% 200%;width:110px;aspect-ratio:1;display:block;border-radius:20px;box-shadow:0 5px 15px #1b292950;position:relative;flex-shrink:0}.relic-0{background-position:0 0}.relic-1{background-position:50% 0}.relic-2{background-position:100% 0}.relic-3{background-position:0 100%}.relic-4{background-position:50% 100%}.relic-5{background-position:100% 100%}.home-relic{width:47px;border-radius:12px;box-shadow:inset 0 0 0 2px #d5c08a44,0 3px #254832}.home-status{padding-top:25px}.forest-spell{position:relative;display:flex;align-items:center;gap:8px;padding:13px 9px 20px;width:100%;border:3px solid #46616c;border-radius:16px;background:linear-gradient(#568c96,#325d73);box-shadow:inset 0 2px #c7eae866,0 5px #183d48;text-align:left;color:#e0f4e2;isolation:isolate;overflow:hidden}.forest-spell b{display:block;font-size:12px;color:#f0eed0}.forest-spell small{display:block;font-size:8px;line-height:1.4;margin-top:4px;color:#b3d4c6}.spell-orb{display:grid;place-items:center;width:32px;height:35px;flex-shrink:0;border-radius:50%;background:radial-gradient(circle,#d1f1d1,#61b4aa 45%,#3c7392 65%,#284f62);color:#edffc8;font-size:28px;box-shadow:0 0 7px #9fe0c966,inset 0 2px #c0e0cd66}.forest-spell em{position:absolute;right:5px;top:4px;font-size:9px;font-style:normal;color:#d7ebd3}.spell-track{position:absolute;bottom:6px;left:9px;right:9px;height:5px;background:#173f5277;border:1px solid #bad9c733;border-radius:4px;overflow:hidden}.spell-track i{display:block;height:100%;width:0;transition:width .45s ease;background:linear-gradient(90deg,#99ceaa,#f5ed9e);box-shadow:0 0 6px #e6f8b3}.forest-spell:disabled{opacity:.75;filter:saturate(.7)}.forest-spell.charged{border-color:#eee0a2;background:linear-gradient(#7fbdaf,#4d8899);box-shadow:inset 0 2px #e2f4c788,0 5px #2f5862,0 0 28px #c9e99955;animation:ready-spell 2.3s ease-in-out infinite}.forest-spell.charged:before{content:'';position:absolute;inset:-50%;z-index:-1;background:conic-gradient(transparent,#e1f5af33,transparent 30%,#e1f5af22,transparent 65%);animation:relic-spin 8s linear infinite}.forest-spell.charged .spell-orb{box-shadow:0 0 13px #e2f5b4a6;color:#fff9cc}.forest-spell.charged small{color:#edf3c5}.forest-spell.charged:hover{filter:brightness(1.13)}.battle-strip .journal-icon{font-size:24px}.journal-icon{color:#f2d797}.journal-list{display:flex;flex-direction:column;gap:11px;margin-top:23px}.journal-row{display:flex;align-items:center;gap:12px;padding:13px 10px;background:linear-gradient(#6f8b54,#4e713f);border:3px solid #33532e;border-radius:14px;box-shadow:inset 0 2px #b8d08b33,0 3px #24452b}.quest-medal{font-size:24px;display:grid;place-items:center;width:45px;height:45px;border-radius:50%;background:radial-gradient(#b5b76f,#827d43);border:3px solid #636338;color:#fae6a1;box-shadow:0 3px #3b542d;flex-shrink:0}.journal-row>div{flex:1;min-width:0}.journal-row b{font-size:14px;display:block;color:#f8eabb}.journal-row small{font-size:10px;color:#ccd7b4;line-height:1.4;display:block;margin:4px 0 7px}.quest-track{height:5px;background:#2f532e80;border-radius:5px;overflow:hidden;box-shadow:inset 0 1px 3px #193b2d66}.quest-track>span{display:block;height:100%;background:linear-gradient(90deg,#c0d383,#f2de94);border-radius:5px;transition:width .4s}.journal-row em{font-size:9px;font-style:normal;color:#c9d5a8;display:block;margin-top:4px}.journal-row>button{min-width:85px;padding:9px 6px;background:linear-gradient(#e4cb87,#bb9e5e);color:#514e2c;font-size:11px;line-height:1.5;font-weight:600;border:2px solid #758449;border-radius:9px;box-shadow:inset 0 2px #fff2be55,0 3px #3e5a32;flex-shrink:0}.journal-row>button:disabled{opacity:.5}.journal-row.claimed{opacity:.65}.journal-row.claimed .quest-medal{background:#b4c484;color:#426838}.journal-row.claimed>button{background:#618651;color:#d8e7bb}.journal-row.quest-ready{border-color:#e1ca7e;box-shadow:inset 0 2px #dfd79833,0 3px #3d5c30,0 0 17px #e3c77022}.relic-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:22px}.relic-card{padding:12px 9px;text-align:center;border:3px solid #3b5731;border-radius:16px;background:radial-gradient(ellipse at 50% 25%,#b2a56a44,#41643c 70%);box-shadow:inset 0 2px #becb8544,0 4px #24492d;min-width:0}.relic-card .relic-art{width:100%;max-width:145px;margin:auto;box-shadow:0 3px 13px #1b302b66,inset 0 0 0 2px #e9d79d33}.relic-card.discovered .relic-art{animation:relic-float 4s ease-in-out infinite}.relic-card.discovered:nth-child(2n) .relic-art{animation-delay:-2s}.relic-status{display:inline-block;margin:10px 0 7px;font-size:7px;letter-spacing:1px;padding:4px 7px;color:#dfd4a0;background:#344f30a1;border:1px solid #bfbd7955;border-radius:5px}.relic-card b{display:block;font-size:13px;color:#ffe8ae;line-height:1.3}.relic-card p{font-size:10px;line-height:1.55;margin:7px 0 0;color:#c6d1a8}.relic-card.undiscovered .relic-art{filter:grayscale(.9) brightness(.45);opacity:.7}.relic-card.undiscovered b{color:#9fb491}.collection-total{margin-top:23px;padding:13px;background:#254b3288;border:2px solid #567849;border-radius:11px;color:#eadc9f;font-size:14px;text-align:center}.collection-total>span{display:block;font-size:10px;color:#c2d3a6;margin-top:5px}.new-relic{display:flex;align-items:center;gap:11px;text-align:left;background:linear-gradient(110deg,#cba76e55,#56764888);border:2px solid #d3bb7c;border-radius:11px;padding:7px 11px;box-shadow:0 3px #244c31,0 0 22px #e4d58d22;margin:2px auto 13px;max-width:95%;animation:new-treasure .6s ease both}.new-relic .relic-art{width:56px;border-radius:10px}.new-relic small{font-size:7px;letter-spacing:1px;color:#e4d9a5;display:block}.new-relic b{font-size:16px;color:#ffe8a5;display:block;margin:4px 0}.new-relic em{font-size:9px;font-style:normal;color:#d2e1b6}.reward-summary{display:flex;justify-content:center;gap:9px;align-items:center;margin:4px 0 12px;font-size:10px;color:#e3d49a}.reward-summary button{background:#d7c17d;color:#42592e;border:2px solid #97ab65;padding:4px 7px;border-radius:7px;font-size:9px}.result{justify-content:flex-start;overflow-y:auto;overscroll-behavior:contain;padding-top:20px}.result .result-animal{width:62px}.result h2{font-size:32px}.result .stars{font-size:27px}.result p{margin-top:4px;margin-bottom:6px}.result .reward-summary+div{margin-top:0}.result-stats{margin-bottom:10px}.result .result-stats:has(+.new-relic){margin-bottom:5px}.result>.gold-button{margin-bottom:4px}.accessory.moon{left:54%;top:52%;width:24%;height:25%;background:linear-gradient(140deg,#aac9e6,#526b99 65%,#d4deb1);clip-path:polygon(15% 0,90% 10%,100% 100%,0 72%);transform:rotate(12deg);border-radius:9px;box-shadow:inset 0 3px #d4e5d6}.accessory.wizard{left:67%;top:2%;width:25%;height:26%;background:linear-gradient(120deg,#b1d8d3,#53759a);clip-path:polygon(40% 0,77% 67%,100% 77%,95% 92%,0 82%,4% 67%,23% 63%);transform:rotate(12deg)}.accessory.wizard:after{content:'✦';position:absolute;left:35%;top:40%;font-size:17px;color:#f9dda0}.rescue-flight{position:fixed;width:56px;height:56px;pointer-events:none;z-index:29;filter:drop-shadow(0 0 12px #f0e29e)}.rescue-flight .character{width:100%;height:100%}.battle-rescue-pill.rescue-arrived{animation:rescue-arrival .5s ease}.board-frame.magic-active:after{content:'';position:absolute;pointer-events:none;inset:-20%;background:radial-gradient(circle,transparent 20%,#e3fbc240 30%,#a6e4ce99 33%,transparent 37%);animation:forest-wave 1.2s ease-out both;z-index:9}.board-frame.magic-active{box-shadow:inset 0 0 35px #d9f6ab55,0 0 55px #a1e6be66}.cell.enchanted{animation:magic-tile 1.3s ease-out both}.cell.rescued:after{content:'✦';position:absolute;right:0;bottom:0;font-size:10px;line-height:1;color:#96722e;text-shadow:0 1px #fff0a8;z-index:4}#moment{position:fixed;inset:0;pointer-events:none;z-index:24;overflow:hidden;opacity:0}#moment.celebrate{animation:victory-light 1.8s ease-out both;background:radial-gradient(ellipse at center,#ffedaa44,transparent 65%)}#moment>span{position:absolute;inset:-75%;background:repeating-conic-gradient(from 0deg,transparent 0 12deg,#ffefb51f 12deg 18deg,transparent 18deg 30deg)}#moment.celebrate>span{animation:relic-spin 25s linear infinite}#reward-notice{position:fixed;top:88px;left:50%;transform:translate(-50%,-35px) scale(.8);opacity:0;pointer-events:none;background:linear-gradient(#72894feF,#3a603def);border:3px solid #dbc585;border-radius:16px;box-shadow:inset 0 2px #e5e9b266,0 6px #294b30,0 9px 35px #1b303b88;padding:12px 23px;text-align:center;z-index:55;min-width:240px;max-width:90vw;transition:opacity .25s,transform .35s cubic-bezier(.2,1.6,.5,1)}#reward-notice.show{opacity:1;transform:translate(-50%,0) scale(1)}#reward-notice strong{display:block;font-size:20px;color:#ffecae;text-shadow:0 2px #476338}#reward-notice span{display:block;font-size:11px;color:#d5e1bd;margin-top:5px}.big-chest{perspective:500px}.big-chest .chest-lid{position:absolute;inset:-4px -4px 45%;background:linear-gradient(90deg,#9d653e 0 12%,#e9b761 12% 18%,#b88146 18% 80%,#e7b96b 80% 88%,#885c39 88%);border:4px solid #67482b;border-radius:12px 12px 5px 5px;box-shadow:inset 0 4px #f0c77d;z-index:3;transform-origin:50% 0;transition:transform .8s cubic-bezier(.2,.7,.3,1)}.big-chest.opened .chest-lid{transform:rotateX(120deg) translateY(-10px)}.big-chest>.treasure-rays{position:absolute;inset:-100px;z-index:-1;background:repeating-conic-gradient(transparent 0 10deg,#ffed9d44 10deg 20deg,transparent 20deg 30deg);opacity:0;border-radius:50%;pointer-events:none}.big-chest.opened>.treasure-rays{opacity:1;animation:relic-spin 15s linear infinite}.seed-shower{position:absolute;inset:0;opacity:0;pointer-events:none;color:#ffdf8b;font-size:40px;text-shadow:0 3px #986936;z-index:6}.seed-shower i,.seed-shower b,.seed-shower em{position:absolute;font:inherit;left:70%;top:10%;color:#fff0b1}.seed-shower b{left:0;top:-10%}.seed-shower em{left:25%;top:35%;font-size:25px}.big-chest.opened>.seed-shower{animation:seed-rise 1.5s ease-out both}.big-chest.opened>.seed-shower i{animation:seed-right 1.4s ease-out both}.big-chest.opened>.seed-shower b{animation:seed-left 1.4s ease-out both}
@keyframes relic-spin{to{transform:rotate(360deg)}}@keyframes relic-float{50%{transform:translateY(-5px);filter:brightness(1.1)}}@keyframes ready-spell{50%{box-shadow:inset 0 2px #e2f4c788,0 5px #2f5862,0 0 40px #c9e99999}}@keyframes forest-wave{0%{transform:scale(.2);opacity:0}20%{opacity:1}100%{transform:scale(1.8);opacity:0}}@keyframes magic-tile{0%{filter:brightness(1.8);transform:scale(.8)}50%{filter:brightness(1.2);box-shadow:0 0 20px #e9f8b8}100%{filter:brightness(1);transform:scale(1)}}@keyframes rescue-arrival{50%{transform:scale(1.12);box-shadow:0 0 22px #f2e39c77}}@keyframes victory-light{0%{opacity:0}30%{opacity:1}100%{opacity:0}}@keyframes new-treasure{0%{transform:scale(.75);opacity:0}70%{transform:scale(1.04)}100%{transform:scale(1);opacity:1}}@keyframes seed-rise{0%{transform:translateY(0) scale(.4);opacity:0}25%{opacity:1}80%{opacity:1}100%{transform:translateY(-100px) scale(1.2);opacity:0}}@keyframes seed-left{to{transform:translate(-60px,20px) rotate(-25deg)}}@keyframes seed-right{to{transform:translate(60px,10px) rotate(35deg)}}
@media(max-width:960px){.forest-spell{flex-direction:column;text-align:center;gap:4px;padding:11px 4px 18px}.forest-spell small{font-size:7px}.forest-spell b{font-size:10px}.forest-spell em{font-size:8px}.journal-row{gap:10px}.adventure-home{width:500px}}
@media(max-width:720px){.home-screen{min-height:890px}.adventure-home{width:320px;max-width:94%;gap:9px;margin-top:20px}.adventure-tile{gap:7px;padding:9px 8px;border-width:2px;border-radius:12px}.adventure-tile b{font-size:11px;letter-spacing:0}.adventure-tile small{font-size:8px;line-height:1.5;margin-top:3px}.tile-emblem{font-size:29px}.home-relic{width:37px;border-radius:9px}.adventure-tile em{width:23px;height:23px;font-size:12px;border-width:2px;right:-6px;top:-9px}.home-status{padding-top:24px;font-size:9px}.battle-strip{gap:8px}.battle-strip>strong{font-size:16px}.battle-rescue-pill{gap:5px;padding:5px 7px}.battle-rescue-pill>b{font-size:9px}.battle-strip .journal-icon{font-size:21px}.battle-skills .abilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.forest-spell{grid-column:1/-1;order:-1;flex-direction:row;text-align:left;padding:11px 12px 17px;gap:10px;border-width:3px;min-height:65px}.forest-spell b{font-size:14px}.forest-spell small{font-size:9px}.forest-spell em{position:static;margin-left:auto;font-size:17px}.spell-orb{width:36px;height:36px;font-size:31px}.spell-track{left:12px;right:12px;bottom:6px}.battle-skills .shield-status{grid-column:auto}.journal-row{gap:9px;padding:11px 8px;border-width:2px}.quest-medal{width:34px;height:34px;font-size:19px;border-width:2px}.journal-row b{font-size:12px}.journal-row small{font-size:9px;line-height:1.5}.journal-row em{font-size:8px}.journal-row>button{min-width:70px;font-size:9px;padding:7px 4px;border-radius:8px}.relic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.relic-card{padding:10px 7px;border-width:2px;border-radius:13px}.relic-card b{font-size:12px}.relic-card p{font-size:10px}.relic-status{font-size:6px;letter-spacing:.6px;margin-top:9px}.relic-card .relic-art{border-radius:14px}.collection-total{font-size:12px}.collection-total span{font-size:9px}.result .result-animal{width:42px}.result{padding-top:12px}.result h2{font-size:27px}.result .stars{font-size:25px}.new-relic{gap:9px;padding:6px 10px;margin-bottom:11px;border-radius:10px}.new-relic .relic-art{width:48px}.new-relic small{font-size:6px;letter-spacing:.7px}.new-relic b{font-size:14px}.new-relic em{font-size:8px}.reward-summary{font-size:8px;gap:6px;margin:2px 0 9px}.reward-summary button{font-size:8px;padding:4px 5px}#reward-notice{top:75px;min-width:240px;padding:10px 15px;border-radius:13px}#reward-notice strong{font-size:18px}#reward-notice span{font-size:10px}.accessory.wizard:after{font-size:12px}.forest-bg:after{background-position:center}}
@media(max-width:390px){.home-screen{min-height:855px}.home-status{gap:10px}.adventure-home{width:300px;gap:8px}.home-relic{width:33px}.adventure-tile b{font-size:10px}.adventure-tile small{font-size:7px}.tile-emblem{font-size:25px}.battle-strip{gap:6px}.battle-strip>strong{font-size:14px}.battle-strip>.game-icon{width:32px;height:32px;font-size:19px;border-width:2px}.battle-rescue-pill{gap:3px;padding:4px 6px}.battle-rescue-pill>b{font-size:8px}.battle-rescue-pill>span{font-size:16px}.journal-row{gap:7px;padding:10px 7px}.quest-medal{width:29px;height:29px;font-size:17px}.journal-row>button{min-width:61px;font-size:8px}.journal-row b{font-size:11px}.journal-row small{font-size:8px}.relic-card p{font-size:9px}.relic-card b{font-size:11px}.forest-spell b{font-size:13px}.forest-spell small{font-size:8px}.forest-spell em{font-size:16px}}
@media(prefers-reduced-motion:reduce){.forest-bg:after{transition:none}.forest-spell.charged,.forest-spell.charged:before,.relic-card.discovered .relic-art,.big-chest.opened>.treasure-rays{animation:none!important}}
.result{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(430px,calc(100vw - 30px));height:auto;max-height:calc(100dvh - 32px);border:4px solid #547342;border-radius:22px;padding:22px 23px;z-index:40;box-shadow:inset 0 3px #b3ce8b55,0 8px #173d2b,0 0 0 100vmax #061e2588,0 25px 80px #071c2b99;overflow-y:auto;isolation:isolate}.result .result-light{z-index:-1}.result .result-animal{width:62px}.result .new-relic{width:100%;max-width:320px;justify-content:center}.result>.text-button{margin-top:8px}.result>.gold-button{min-width:240px;justify-content:center}.result-stats{gap:24px}.result .reward-summary{margin-bottom:10px}@media(max-width:720px){.result{padding:17px 18px;width:min(385px,calc(100vw - 24px));max-height:calc(100dvh - 26px);border-radius:19px}.result .result-animal{width:48px}.result .new-relic{max-width:295px}.result .result-stats{gap:16px}.result h2{font-size:28px}.result p{max-width:280px}.result>.gold-button{min-width:220px}.result>.overline{font-size:7px}.result .stars{font-size:27px}}
