@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@400;500;600;700&display=swap');
:root{--ink:#193f41;--coral:#ed7969}*{box-sizing:border-box}body{margin:0;background:#143639;color:var(--ink);font-family:'DM Sans',sans-serif}button{font:700 15px 'Fredoka',sans-serif;cursor:pointer;border:0;color:inherit;transition:transform .15s,filter .15s}button:hover{filter:brightness(1.08);transform:translateY(-2px)}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #e99c38;outline-offset:3px}button:disabled{cursor:not-allowed;filter:grayscale(.65);opacity:.55;transform:none}[hidden]{display:none!important}#app{max-width:1800px;margin:auto;min-height:100dvh;background:#f7efd9;padding:0 28px}header{height:100px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--ink);font:700 23px/.95 'Fredoka',sans-serif;letter-spacing:.4px}.brand small{display:block;font-size:16px;letter-spacing:6px;color:#db7865;margin-top:6px}.brand-icon{font-size:45px;color:#da8b4e}.stats{display:flex;gap:12px}.pill{min-width:124px;display:grid;grid-template-columns:30px 1fr;grid-template-rows:25px 15px;column-gap:10px;padding:10px 18px;background:#fffaf0;border:1px solid #e2dac4;border-radius:15px;box-shadow:0 3px 0 #e8dfc8}.pill>span{grid-row:1/3;align-self:center;font-size:28px}.pill b{font:600 24px 'Fredoka'}.pill small{font-size:9px;letter-spacing:1.5px;font-weight:700;color:#8b9788}.heart{color:#dc6e65}.coin{color:#d89b31}nav{display:flex;gap:8px}nav button{border:1px solid #d8d4bc;background:#eee8d5;border-radius:12px;min-width:41px;height:41px;font-size:18px}#field{position:relative;border:6px solid #e8dfc7;border-radius:24px;overflow:hidden;background:#95b781;box-shadow:0 4px 0 #d8d1b8;height:min(64vh,710px);min-height:350px}canvas{width:100%;height:100%;display:block;touch-action:none}.location{position:absolute;left:28px;top:24px;pointer-events:none;display:flex;flex-direction:column;gap:4px;padding:14px 20px;background:#fffaebed;border:1px solid #fff8de;border-radius:13px;box-shadow:0 4px 15px #28433c10}.location>span{font-size:9px;letter-spacing:2px;color:#83947d;font-weight:700}.location strong{font:500 21px 'Fredoka'}.location small{font-size:11px;color:#7b8b78}.field-caption{position:absolute;left:24px;bottom:16px;background:#214640e6;color:#fff7df;border:1px solid #ffffff25;border-radius:20px;padding:9px 16px;font-size:11px;pointer-events:none}.field-caption i{display:inline-block;width:6px;height:6px;background:#edc86a;border-radius:50%;margin-right:8px}footer{min-height:153px;display:flex;align-items:center;justify-content:space-between;gap:22px}.objective{display:flex;gap:13px;align-items:center;min-width:210px}.shield{width:43px;height:49px;background:#244b47;color:#f8db91;border-radius:10px 10px 22px 22px;text-align:center;padding-top:7px;font-size:28px}.objective div{display:flex;flex-direction:column;gap:6px}.objective small{font-size:9px;letter-spacing:1.5px;color:#8a998a;font-weight:700}.objective strong{font:500 18px 'Fredoka'}.objective div>span{font-size:10px;color:#8a998a}.cards{display:flex;gap:10px;align-items:center}.card{position:relative;width:112px;height:129px;border-radius:15px;border:2px solid #dbd7c3;background:#fff9e9;box-shadow:0 4px 0 #d7d0ba;display:flex;align-items:center;flex-direction:column;padding:5px 8px 8px}.card.selected{border-color:#dc9560;background:#fff0cd;box-shadow:0 0 0 3px #f0c780,0 5px 0 #d7aa65;transform:translateY(-4px)}.portrait{width:73px;height:73px;background-image:none;background-size:400% 100%;background-repeat:no-repeat}.card strong{font:600 13px 'Fredoka';margin:1px 0 4px}.card small{font-size:9px;color:#82927e}.price{color:#a77428;font-size:12px;font-weight:700;margin-top:3px}.key{position:absolute;left:7px;top:6px;color:#a3ae98;font-size:9px}.wave-actions{display:flex;flex-direction:column;align-items:center;gap:10px;min-width:175px}.wave-actions small{font-size:10px;color:#8b9a87}#next,.primary{background:var(--coral);color:#fff7e5;border:1px solid #d56b5d;box-shadow:0 4px 0 #c85f52,inset 0 0 0 4px #ffffff15;border-radius:12px;padding:17px 21px;letter-spacing:1px}#next span,.primary span{margin-left:15px}.bottom-note{padding:0 2px 18px;display:flex;justify-content:space-between;color:#96a18c;font-size:8px;letter-spacing:1.4px}#toast{position:absolute;top:22px;left:50%;transform:translateX(-50%);background:#214640f0;color:#fff4d6;padding:12px 22px;border-radius:10px;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:3}#toast.show{opacity:1}#inspector{position:absolute;right:22px;top:22px;width:230px;background:#fff6df;border:2px solid #e4d7b5;border-radius:16px;padding:18px;box-shadow:0 8px 30px #133a3a30;z-index:2}#inspector h3{font:600 22px 'Fredoka';margin:0 0 5px}#inspector p{font-size:12px;line-height:1.6;color:#7a8b78}#inspector .close{position:absolute;right:8px;top:7px;background:transparent}#inspector button.action{width:100%;padding:11px 5px;border-radius:8px;margin-top:8px;background:#285851;color:#fff3d2}#inspector button.sell{background:#eee4cb;color:#826b51}.overlay{position:fixed;inset:0;background:#173e40ba;backdrop-filter:blur(7px);z-index:10;display:grid;place-items:center;padding:25px}.welcome{max-width:1050px;width:100%;display:grid;grid-template-columns:1.05fr 1fr;background:#fff5df;border:7px solid #f0e3c6;border-radius:25px;overflow:hidden;box-shadow:0 30px 90px #071e2460}.welcome-art{background:#bfd0ab;min-height:505px}.welcome-copy{padding:46px 40px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#b28b4c}h1{font:600 45px/1.05 'Fredoka';margin:20px 0;color:#204944}h1 em{font-style:normal;color:#d77a61}.welcome p{font-size:14px;line-height:1.8;color:#7c8c77}.instructions{display:flex;flex-direction:column;gap:11px;font-size:12px;margin:22px 0}.instructions b{color:#c49249;margin-right:10px}.welcome-copy>small{display:block;font-size:10px;color:#929b85;margin-top:18px}.primary{font-size:14px}.dialog{background:#fff3d8;border:6px solid #e4d6b6;border-radius:24px;padding:36px;max-width:490px;text-align:center;box-shadow:0 20px 60px #133a3a50}.dialog h2{font:600 35px 'Fredoka';margin:10px 0}.dialog p{color:#7b8973;font-size:14px;line-height:1.8}.dialog .big-icon{font-size:55px}.dialog button{margin:8px;padding:13px 24px;border-radius:10px;background:#e77e67;color:#fff8df}@media(min-width:1500px){#field{height:68vh}}@media(max-width:1100px){#app{padding:0 14px}.objective{display:none}.cards{gap:8px}footer{justify-content:center}.pill{min-width:100px;padding:9px 12px}.brand{font-size:20px}.brand-icon{font-size:34px}.brand small{font-size:12px}.stats{gap:7px}nav{gap:4px}}@media(max-width:700px){header{height:83px;flex-wrap:wrap;gap:5px}.brand{font-size:15px}.brand-icon{display:none}.brand small{font-size:10px;letter-spacing:3px}.pill{min-width:65px;padding:5px 8px;grid-template-columns:16px 1fr;column-gap:5px;grid-template-rows:19px 10px}.pill>span{font-size:19px}.pill b{font-size:17px}.pill small{font-size:6px;letter-spacing:.5px}nav button{min-width:27px;width:27px;height:31px;font-size:14px}nav #help{display:none}.location{top:12px;left:12px;padding:9px 12px}.location strong{font-size:16px}.location small{display:none}#field{height:56vh;min-height:310px;border-width:3px;border-radius:16px}.field-caption{left:10px;bottom:10px;max-width:95%;font-size:9px}.card{width:70px;height:110px;padding:4px}.portrait{width:57px;height:61px}.card strong{font-size:10px}.card small{font-size:7px}.price{font-size:11px}.cards{gap:5px}footer{gap:9px;min-height:170px;flex-wrap:wrap;padding:13px 0}.wave-actions{min-width:120px;gap:6px}#next{padding:12px 15px;font-size:12px}.wave-actions small{font-size:9px}.bottom-note{font-size:6px;letter-spacing:.4px}.bottom-note span:last-child{display:none}.welcome{grid-template-columns:1fr;max-width:430px}.welcome-art{min-height:170px;background-position:center 35%}.welcome-copy{padding:23px}h1{font-size:34px;margin:13px 0}.welcome p{font-size:12px}.instructions{margin:15px 0;gap:8px}.welcome-copy>small{font-size:9px}#inspector{right:10px;top:10px;width:190px;padding:14px}#toast{font-size:11px;width:max-content;max-width:85%;top:95px}.overlay{padding:15px}.dialog{padding:24px}}
.portrait{background-image:none;object-fit:contain}.card canvas{width:73px;height:73px;touch-action:auto}
@media(max-width:700px){#field{height:390px;min-height:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#d4b878 #dfe5c3;touch-action:pan-x}#game{width:810px;min-width:810px;height:380px;touch-action:pan-x}.location{padding:8px 12px}.location:after{content:'Swipe the meadow to explore →';font-size:9px;color:#829475}.field-caption{white-space:nowrap}.card canvas{width:57px;height:61px}#app{padding-bottom:8px}footer{min-height:173px}}
/* The game frame uses a dark textile palette so the sunlit world stays central. */
body{background:#102d2b;background-image:radial-gradient(ellipse at 50% 0,#2c5950 0,transparent 68%);color:#f6e7bf}
#app{max-width:1920px;height:100dvh;min-height:650px;display:grid;grid-template-rows:80px minmax(300px,1fr) 150px 22px;gap:0;padding:0 24px;background:radial-gradient(ellipse at 50% 15%,#28554b70,transparent 65%)}
header{height:auto;padding:0 8px}.brand{color:#f4e6be;text-shadow:0 2px 0 #0b2726}.brand small{color:#f4a382}.brand-icon{color:#efcb81;filter:drop-shadow(0 2px 2px #09251d)}
.pill{border-color:#9b946657;background:linear-gradient(145deg,#fff3d7,#e6d5ae);box-shadow:0 3px 0 #102f2a,0 4px 12px #071e2730;color:#274d45;padding:8px 18px}
.pill b{text-shadow:0 1px 0 #fff9dc}.pill small{color:#777f63}.heart{color:#cf735f}.coin{color:#b48739}
nav button{background:linear-gradient(#365f51,#254a41);color:#ead49e;border:1px solid #b29b5a66;box-shadow:0 3px 0 #122e28}
#field{height:auto;min-height:0;border:3px solid #b69b61;border-radius:19px;box-shadow:0 0 0 5px #173f35,0 0 0 6px #a5a17a33,0 15px 50px #071d2880;isolation:isolate;background:#244c3e}
.location{top:16px;left:18px;padding:11px 17px;background:linear-gradient(120deg,#173e35ed,#1d483bdb);border:1px solid #d6bd8066;box-shadow:0 5px 18px #122e3a35;color:#f7e5b6;backdrop-filter:blur(10px)}
.location>span{color:#b8bf91;font-size:8px;letter-spacing:2.6px}.location strong{font-size:20px;font-weight:500}.location small{color:#bbcaac;font-size:10px}
.field-caption{background:#183f35e0;border-color:#cbb87c55;color:#f3e6c0;left:18px;bottom:13px;box-shadow:0 3px 12px #102b2526}
footer{min-height:0;padding:14px 8px 9px}.objective strong{color:#f0e1b9}.objective small{color:#b5bd92}.objective div>span{color:#a3bba3}.shield{background:linear-gradient(#3a6654,#244a3e);border:1px solid #bca06566;box-shadow:0 3px 12px #102e2929;color:#eed090}
.cards{gap:12px}.card{width:112px;height:128px;padding:4px 8px 6px;background:linear-gradient(145deg,#fff0cf,#dfcda4);border:1px solid #f2d89a;box-shadow:0 4px 0 #0c3029,0 6px 15px #0a211e40;color:#244b40;overflow:visible}
.card:before{content:'';position:absolute;inset:4px;border:1px dashed #aa9a6c55;border-radius:11px;pointer-events:none}.card canvas{position:relative;z-index:1;width:86px;height:80px;filter:drop-shadow(2px 3px 1px #354f3e35)}.card strong{font-size:12px;letter-spacing:.7px;margin:0 0 2px}.card small{color:#758166;font-size:9px}.price{color:#936d2b;margin-top:3px}.key{color:#819172;left:9px;top:8px;z-index:2}.card.selected{border-color:#fff2b0;background:linear-gradient(135deg,#fff7d2,#edcf89);box-shadow:0 0 0 2px #e6c773,0 0 24px #edcf7940,0 6px 0 #123a2f;transform:translateY(-4px)}
.wave-actions small{color:#aabe9b}#next,.primary{background:linear-gradient(160deg,#f1a27b,#d97861);border:1px solid #ffd1a0;box-shadow:0 4px 0 #954f42,0 7px 17px #102c2940,inset 0 0 0 4px #ffffff12;color:#fff6df;text-shadow:0 1px 1px #a25f4c}#next:disabled{opacity:.65;filter:grayscale(.35)}.bottom-note{color:#9bb094;padding:0 9px 10px;letter-spacing:1.3px;font-size:7px}
#toast{background:linear-gradient(135deg,#194c3ded,#13372fed);border:1px solid #dcc78a88;color:#fff1c6;box-shadow:0 6px 22px #0c2c3240;top:18px}#inspector{background:linear-gradient(140deg,#fff1cf,#e5d5ae);border-color:#c7ae72;color:#244b40;box-shadow:0 10px 40px #0a302a66}
.overlay{background:#0b2929bd;backdrop-filter:blur(10px)}.welcome{border-color:#c9b17a;box-shadow:0 0 0 1px #f8e3a9,0 30px 100px #031c20aa}.welcome-art{background-image:none;background-position:75% center;position:relative}.welcome-art:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0c3e3355,transparent 50%)}.welcome-copy{color:#234b40;background:radial-gradient(at top right,#fff8e5,#eddfbd)}.dialog{color:#244b40;border-color:#c8af75}
@media(max-width:1100px){#app{padding:0 16px;grid-template-rows:78px minmax(300px,1fr) 147px 20px}.cards{gap:10px}.card{width:108px}.brand{font-size:19px}}
@media(max-width:700px){#app{height:auto;min-height:100dvh;display:block;padding:0 12px 12px}header{height:89px;padding:8px 2px;row-gap:5px}.brand{font-size:14px}.brand small{font-size:9px;color:#edaa83}.stats{gap:6px}.pill{padding:5px 9px;min-width:66px}nav button{min-width:28px;height:31px}#field{height:384px;border-width:2px;border-radius:13px;overflow-x:auto;overflow-y:hidden;touch-action:pan-x;scrollbar-color:#bca371 #315341}#game{width:810px;min-width:810px;height:380px;touch-action:pan-x}.location{top:11px;left:12px;padding:9px 12px}.location strong{font-size:16px}.location:after{color:#b5c59c}.field-caption{left:12px;bottom:12px;white-space:nowrap;font-size:9px}footer{padding:17px 0 12px;gap:12px;min-height:194px}.cards{gap:7px}.card{width:76px;height:119px;padding:5px}.card canvas{width:63px;height:70px}.card strong{font-size:10px;letter-spacing:.2px}.card small{font-size:7px}.price{font-size:11px}.key{left:7px;top:7px}.bottom-note{font-size:6px;padding:0 3px;color:#b1c0a0}.welcome-art{background-position:75% 35%}.welcome-copy{padding:24px}.welcome{border-width:4px}#inspector{position:fixed;right:18px;top:100px;width:215px;z-index:6}#toast{top:95px;font-size:10px}#next{padding:12px 24px}}
.card canvas{width:62px;height:70px;flex-shrink:0}.card strong{line-height:14px}.card small{line-height:11px}.card .price{font-size:11px;line-height:13px}.card{padding-top:5px;padding-bottom:6px}
@media(max-width:700px){.card canvas{width:56px;height:64px}.card strong{line-height:12px}.card small{line-height:9px}.card .price{line-height:12px}}
.location{top:12px;padding:8px 12px;gap:3px}.location>span{font-size:8px;line-height:10px}.location strong{font-size:17px;line-height:20px}.location small{display:none}
@media(max-width:700px){.location{top:10px;padding:8px 11px}.location strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){button{transition:none}button:hover{transform:none}}
@media(max-width:700px){.location>span,.location:after{display:none}.location{padding:6px 10px}}
/* All scene and character artwork is now real-time WebGL geometry. */
.welcome-art{background:none!important;background-image:none!important;background-color:#bfd0ab!important;min-height:505px;overflow:hidden}.welcome-art:after{display:none}.welcome-art canvas{width:100%;height:100%;position:absolute;inset:0;touch-action:none}
.cards{position:relative}.portrait{width:62px;height:70px;flex-shrink:0;background:none!important}.model-previews{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;pointer-events:none;z-index:2;filter:none!important}.card strong,.card small,.card .price{position:relative;z-index:3}
.camera-tools{position:absolute;right:14px;bottom:13px;display:flex;gap:5px;z-index:3}.camera-tools button{height:33px;min-width:34px;border-radius:8px;background:#244b3fe8;color:#ffe6b2;border:1px solid #cbb87c77;font-size:16px;box-shadow:0 2px 5px #12352b44}.camera-tools button:nth-child(2){font-size:12px}.pause-banner{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:20px 50px;border:1px solid #d2bb78;border-radius:15px;color:#fff1c8;background:#173d36ed;font:600 35px Fredoka,sans-serif;pointer-events:none;display:none}.paused .pause-banner{display:block}
#field{background:#9bb1a0}.field-caption{max-width:65%}
@media(max-width:700px){.portrait{width:56px;height:64px}.welcome-art{min-height:180px!important}.camera-tools{position:fixed;right:18px;top:96px;bottom:auto;gap:3px}.camera-tools button{height:28px;min-width:28px;font-size:13px}.camera-tools button:nth-child(2){font-size:10px}.camera-tools #zoomIn,.camera-tools #zoomOut{display:none}.field-caption{max-width:85%}.location{max-width:175px;top:10px}.location strong{font-size:13px}}
