:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183f35;background:#bad8ad;font-synthesis:none;--ink:#183f35;--cream:#fff9e9;--gold:#ffca61;--jade:#245f49;--border:#254b3526}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{height:100dvh;position:relative;isolation:isolate}button,select,input{font:inherit}button,select{cursor:pointer}button{border:0;min-height:44px;border-radius:12px;font-weight:800;color:inherit;touch-action:manipulation;transition:filter .14s,transform .14s}button:hover{filter:brightness(1.08)}button:active{transform:translateY(1px)}button:disabled{cursor:wait;opacity:.58;filter:saturate(.6)}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #9964ff;outline-offset:3px}[hidden]{display:none!important}#world{display:block;position:absolute;inset:0;width:100%;height:100%;touch-action:none}#loading,#fatal{position:absolute;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;padding:24px;background:#e7edcf;text-align:center}#loading b{font-size:clamp(26px,5vw,45px);letter-spacing:-.04em}em{font-style:normal;color:#e3aa3b}.loading-flower{font-size:90px;color:#d88e9d;animation:flower 6s linear infinite}@keyframes flower{to{transform:rotate(360deg)}}#fatal{background:#fff3e4;color:#804848}.topbar{position:absolute;z-index:20;top:calc(18px + env(safe-area-inset-top));left:calc(24px + env(safe-area-inset-left));right:calc(24px + env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;gap:12px;pointer-events:none}.wordmark{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:900;line-height:.92;letter-spacing:.015em;filter:drop-shadow(0 2px 1px #ffffffa0)}.wordmark b{font-size:24px}.wordmark em{font-size:15px;color:#bd8130}.wordmark small{display:block;font-size:8px;letter-spacing:.38em;line-height:2}.flower{font-size:50px;color:#dc8d98;-webkit-text-stroke:1px #f8e7bb}.top-actions{display:flex;align-items:center;gap:7px;pointer-events:auto}.compact,.icon-button,.glass{background:#fff9e9ed;box-shadow:0 3px 0 #183f3533,0 4px 15px #183f3510;border:1px solid #ffffffa0}.compact{padding:0 15px;font-size:13px}.invite{background:#7452af;color:#fff9e9;border-color:#9173c4;max-width:245px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;padding:10px;border-radius:12px}.icon-button svg{width:24px;height:24px}.eyebrow{text-transform:uppercase;letter-spacing:.15em;font-size:11px;font-weight:900;color:#42634e}.launch{position:absolute;top:calc(100px + env(safe-area-inset-top));left:calc(36px + env(safe-area-inset-left));right:calc(36px + env(safe-area-inset-right));bottom:calc(82px + env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr) 356px;gap:32px;min-height:0;pointer-events:none;align-items:center}.launch-copy{align-self:start;margin-top:34px;max-width:370px;pointer-events:auto}.launch-copy h1{font-size:clamp(40px,5.5vw,78px);line-height:.98;letter-spacing:-.06em;margin:18px 0;color:#183f35;text-shadow:0 2px #e3edc9}.launch-copy p{font-size:15px;line-height:1.55;max-width:295px;margin:0}.feature-row{display:flex;gap:22px;margin-top:28px}.feature-row span{display:grid;gap:3px}.feature-row b{font-size:30px;color:#245540;line-height:1}.feature-row small{font-size:11px;font-weight:700}.launch-panel{background:var(--cream);border:1px solid #fffef6;box-shadow:0 8px 0 #27483724,0 20px 50px #27483718;border-radius:25px;padding:20px 20px 18px;display:flex;flex-direction:column;min-height:0;max-height:100%;pointer-events:auto;overflow:hidden}.launch-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 3px 3px;scrollbar-width:thin;scrollbar-color:#b7c3a9 transparent}.panel-kicker{display:flex;align-items:center;justify-content:space-between;color:#637756;text-transform:uppercase;font-size:10px;letter-spacing:.12em;font-weight:900}.tiny-flower{color:#db9aac;font-size:26px}.launch-panel h2{font-size:29px;letter-spacing:-.04em;margin:5px 0 8px}.launch-panel p{font-size:12px;line-height:1.5;color:#59705e;margin:0 0 16px}.map-select{display:grid;grid-template-columns:1fr 1fr;gap:9px}.map-card{position:relative;background:#f0eddd;border:2px solid transparent;padding:8px 7px;text-align:left;border-radius:15px;overflow:hidden;min-height:100px}.map-card.is-active{background:#e9f0d3;border-color:#59784d}.map-card svg{width:100%;height:68px;display:block}.map-card span{display:block;margin-top:3px;font-size:11px}.map-card i{position:absolute;right:7px;bottom:7px;font-style:normal;color:#d79e34}.map-facts{display:flex;gap:8px;margin-top:13px;flex-wrap:wrap}.map-facts span{font-size:10px;font-weight:800;padding:6px 8px;background:#eee9d3;border-radius:7px}.record{font-size:11px;color:#6e765b;margin-top:11px;min-height:14px}.launch-actions{flex:none;padding-top:15px;display:grid;gap:9px}.primary{background:linear-gradient(#ffda7b,#efb342);color:#254836;min-height:52px;font-size:18px;box-shadow:0 4px 0 #b8822a;padding:11px 24px;border:1px solid #ffe6a6}.secondary{background:#e2e8d0;min-height:46px;padding:10px 16px;border:1px solid #a9b991}.menu-footer{position:absolute;z-index:16;left:calc(24px + env(safe-area-inset-left));right:calc(24px + env(safe-area-inset-right));bottom:calc(19px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:12px}.menu-footer nav{display:flex;gap:8px}.glass{font-size:12px;padding:10px 17px}#save-status{font-size:10px;color:#315944;text-shadow:0 1px #d9e9be}.hud{position:absolute;inset:0;pointer-events:none}.hud button,.hud .selection{pointer-events:auto}.resources{position:absolute;top:calc(98px + env(safe-area-inset-top));left:calc(24px + env(safe-area-inset-left));display:flex;gap:2px;filter:drop-shadow(0 3px 1px #183f3520)}.resources>div{min-width:90px;display:grid;gap:4px;padding:11px 15px;background:#234a3de8;color:#fff5dd}.resources>div:first-child{border-radius:13px 0 0 13px}.resources>div:last-child{border-radius:0 13px 13px 0}.resources small{font-size:9px;text-transform:uppercase;letter-spacing:.1em;color:#d7e2c5}.resources b{font-size:20px}.resources .heart{color:#f3a8a8}.resources .gold{color:#ffcf71}.battle-controls{position:absolute;right:calc(24px + env(safe-area-inset-right));top:calc(80px + env(safe-area-inset-top));display:flex;gap:7px}.wave-note{position:absolute;top:calc(181px + env(safe-area-inset-top));left:24px;max-width:340px;font-size:11px;font-weight:800;color:#24503d;text-shadow:0 1px #e4efc9}.players{position:absolute;right:24px;top:139px;display:flex;gap:4px;flex-wrap:wrap;max-width:280px;justify-content:end}.player-chip{font-size:9px;padding:5px 8px;background:#fff8e7bb;border-radius:20px}.selection{position:absolute;right:calc(24px + env(safe-area-inset-right));top:calc(187px + env(safe-area-inset-top));bottom:calc(138px + env(safe-area-inset-bottom));width:300px;max-height:495px;display:flex;flex-direction:column;border:1px solid #fff9e9;background:#fff9e9f5;border-radius:20px;box-shadow:0 7px 0 #25483624,0 20px 40px #234a3d20;padding:15px;overflow:hidden}.selection-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;margin-bottom:10px}.selection-head h2{font-size:20px;letter-spacing:-.03em;margin:4px 0 0}.selection-head .eyebrow{font-size:9px}.selection-head .icon-button{box-shadow:none;background:#e9ead7}.selection-content{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px}.tower-stats{display:flex;gap:5px;margin-bottom:12px}.tower-stats>div{flex:1;padding:8px;background:#e6ead7;border-radius:8px}.tower-stats small{display:block;font-size:9px;color:#65745c}.tower-stats b{font-size:14px;display:block;margin-top:3px}.selection h3{font-size:11px;text-transform:uppercase;letter-spacing:.07em;margin:14px 0 8px;color:#63745b}.branch-button{display:flex;align-items:center;gap:8px;padding:9px;width:100%;margin-bottom:6px;background:#edead8;border:1px solid #d5d6bd;font-size:11px;text-align:left;min-height:48px}.branch-button svg{width:25px;height:25px;flex:none}.branch-button span{flex:1}.branch-button b{color:#976819;white-space:nowrap}.upgrade-button{width:100%;padding:10px;background:#567950;color:#fff9e9;margin-bottom:8px;font-size:12px}.sell-button{width:100%;background:#e8d8cd;color:#855546;font-size:11px;padding:9px}.selection .hint{font-size:10px;line-height:1.55;color:#68765e}.aim{position:absolute;left:50%;bottom:calc(125px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#234a3df0;color:#fff4d8;border-radius:13px;padding:5px 6px 5px 15px;max-width:calc(100% - 32px);font-size:12px;font-weight:800;box-shadow:0 4px 0 #203c2924}.aim .icon-button{color:#183f35;box-shadow:none}.battle-bottom{position:absolute;left:calc(24px + env(safe-area-inset-left));right:calc(24px + env(safe-area-inset-right));bottom:calc(19px + env(safe-area-inset-bottom));display:flex;align-items:end;justify-content:space-between;gap:15px}.tools{display:flex;gap:7px}.tool{display:grid;grid-template-columns:34px 1fr;column-gap:8px;align-items:center;background:#fff9e9ed;border:2px solid #ffffffb3;padding:9px 12px;min-height:75px;text-align:left;box-shadow:0 4px 0 #31533a33;border-radius:14px;min-width:106px}.tool svg{width:30px;height:30px;grid-row:1/3}.tool span{font-size:10px;display:block}.tool small{font-size:10px;color:#967126}.tool.is-active{background:#d6e9bc;border-color:#406b4f;transform:translateY(-3px)}.wave-actions{display:grid;gap:8px;text-align:center;min-width:200px;max-width:300px}.wave-actions small{font-size:9px;font-weight:700;color:#365b41;text-shadow:0 1px #e5efc7}.wave-actions .primary{font-size:14px;min-height:50px}.camera-tools{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(22px + env(safe-area-inset-bottom));display:flex;gap:3px}.camera-tools .icon-button{width:34px;min-width:34px;min-height:34px;padding:8px;background:#264c3cb3;color:#fff5db;box-shadow:none;border:0;border-radius:8px}.camera-tools svg{width:18px;height:18px}dialog{border:1px solid #fff9e9;border-radius:22px;padding:21px;background:#fff9ed;color:#254737;width:min(700px,calc(100% - 28px));max-height:calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));box-shadow:0 30px 120px #173f3559;overflow:auto;overscroll-behavior:contain}dialog::backdrop{background:#142f2a8a;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-21px;padding-top:8px;background:#fff9ed;z-index:3}.dialog-head h2{font-size:25px;letter-spacing:-.03em;margin:4px 0 15px}.dialog-head .icon-button{box-shadow:none;background:#e9ead8}.dialog-body p,#dialog-body p{font-size:13px;line-height:1.65}#dialog-body h3{font-size:15px}.dialog-actions,.pause-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.pause-actions button{flex:1 1 160px}.setting-row{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid #254b351c;font-size:13px}.setting-row input[type=checkbox]{width:21px;height:21px;accent-color:#4e7952}.setting-row input[type=range]{width:140px;accent-color:#4e7952}.setting-row select{padding:10px;border:1px solid #c8ceb6;border-radius:8px;background:#f8f5e8;color:#254737}.book-grid,.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.book-card{padding:15px;border-radius:15px;background:#ececd9;border:1px solid #dee1c8}.book-card svg{width:35px;height:35px;color:#43694d}.book-card h3{margin:10px 0 5px}.book-card p{font-size:11px!important;margin:5px 0}.stats-grid>div{padding:20px;background:#e8ecd8;border-radius:15px}.stats-grid small{display:block;color:#64715d;font-size:11px}.stats-grid b{display:block;font-size:28px;margin-top:8px}.result-mark{font-size:58px;color:#b58a27;text-align:center}.result-summary{text-align:center;font-size:16px;font-weight:800}.dialog-tabs{display:flex;gap:8px}.dialog-tabs button{padding:10px 15px;background:#e5ead3}.dialog-tabs button.is-active{background:#4d7351;color:#fff8e6}#toast{position:absolute;z-index:100;left:50%;bottom:calc(140px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#234e3ff5;color:#fff7dc;padding:14px 20px;border-radius:13px;max-width:calc(100% - 32px);font-size:13px;text-align:center;box-shadow:0 8px 25px #173e3526}button svg{pointer-events:none}body[data-view=battle] .wordmark{transform:scale(.85);transform-origin:top left}
@media(max-width:1100px){.launch{left:24px;right:24px;gap:20px;grid-template-columns:minmax(0,1fr) 330px}.launch-copy h1{font-size:54px}.camera-tools{bottom:125px}.tool{min-width:90px;grid-template-columns:25px 1fr;padding:9px 7px}.tool svg{width:25px;height:25px}.wave-actions{min-width:180px}.selection{width:285px}}@media(max-height:650px) and (min-width:701px){.topbar{top:12px;left:20px;right:20px}.wordmark{font-size:13px}.wordmark b{font-size:20px}.flower{font-size:43px}.launch{top:78px;bottom:68px}.launch-copy{margin-top:10px;max-width:300px}.launch-copy h1{font-size:43px;margin:10px 0}.launch-copy p{font-size:12px;max-width:230px}.feature-row{margin-top:15px;gap:20px}.feature-row b{font-size:23px}.launch-panel{padding:13px 15px}.launch-panel h2{font-size:22px}.launch-panel p{margin-bottom:9px;font-size:11px}.map-card{min-height:83px}.map-card svg{height:48px}.launch-actions{padding-top:10px;gap:6px}.launch-actions .primary{min-height:48px;padding:9px;font-size:17px}.launch-actions .secondary{min-height:44px}.menu-footer{bottom:13px}.resources{top:77px}.wave-note{top:150px}.battle-controls{top:70px}.selection{top:133px;bottom:125px}.camera-tools{bottom:110px}.players{top:120px}.battle-bottom{bottom:15px}.tool{min-height:65px}}
@media(max-width:700px){.topbar{top:calc(11px + env(safe-area-inset-top));left:12px;right:12px;gap:6px}.wordmark{font-size:11px;gap:3px}.wordmark b{font-size:15px}.wordmark em{font-size:9px}.wordmark small{font-size:6px}.flower{font-size:31px}.top-actions{gap:5px}.top-actions .compact{font-size:11px;padding:0 9px;min-height:42px}.top-actions .invite{font-size:0;width:42px;min-width:42px;padding:9px}.top-actions .invite svg{width:23px;height:23px;margin:0!important}.top-actions .icon-button{width:40px;min-width:40px;min-height:42px;padding:9px}.launch{top:calc(68px + env(safe-area-inset-top));bottom:calc(58px + env(safe-area-inset-bottom));left:12px;right:12px;grid-template-columns:1fr;align-items:end;gap:0}.launch-copy{display:none}.launch-panel{height:min(53dvh,415px);max-height:100%;padding:12px 14px;border-radius:22px}.panel-kicker{font-size:8px}.tiny-flower{font-size:20px}.launch-panel h2{font-size:21px;margin:0 0 6px}.launch-panel p{font-size:10px;line-height:1.4;margin-bottom:9px}.map-select{gap:6px}.map-card{min-height:73px;padding:5px 7px;border-radius:11px}.map-card svg{height:42px}.map-card span{font-size:10px}.map-facts{margin-top:8px;gap:4px}.map-facts span{font-size:9px;padding:4px 6px}.record{font-size:10px;margin-top:7px}.launch-actions{padding-top:9px;gap:7px}.launch-actions .primary{min-height:47px;font-size:16px;padding:9px}.launch-actions .secondary{min-height:44px;font-size:12px;padding:8px}.menu-footer{bottom:calc(10px + env(safe-area-inset-bottom));left:12px;right:12px}.menu-footer nav{gap:5px}.glass{font-size:9px;padding:8px 10px;min-height:38px;border-radius:9px}#save-status{font-size:8px;max-width:100px;text-align:right}.resources{left:12px;top:calc(70px + env(safe-area-inset-top))}.resources>div{min-width:68px;padding:8px 10px;gap:3px}.resources small{font-size:7px}.resources b{font-size:16px}.battle-controls{right:12px;top:calc(72px + env(safe-area-inset-top));gap:4px}.battle-controls .icon-button{width:38px;min-width:38px;min-height:40px;padding:9px}.wave-note{left:12px;top:calc(127px + env(safe-area-inset-top));font-size:9px;max-width:220px}.players{top:calc(146px + env(safe-area-inset-top));right:12px;max-width:220px}.player-chip{font-size:8px;padding:3px 6px}.battle-bottom{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));display:grid;gap:9px;grid-template-columns:1fr}.tools{gap:5px}.tool{flex:1;min-width:0;min-height:58px;padding:6px 4px;grid-template-columns:1fr;justify-items:center;text-align:center;gap:2px;border-radius:11px}.tool svg{width:22px;height:22px;grid-row:auto}.tool span{font-size:8px}.tool small{font-size:9px}.wave-actions{min-width:0;max-width:none;gap:5px}.wave-actions .primary{font-size:13px;min-height:46px;padding:8px}.wave-actions small{font-size:8px}.camera-tools{bottom:calc(163px + env(safe-area-inset-bottom))}.camera-tools .icon-button{min-width:34px;min-height:34px}.aim{bottom:calc(202px + env(safe-area-inset-bottom));font-size:10px;min-width:220px}.selection{top:auto;left:12px;right:12px;bottom:calc(166px + env(safe-area-inset-bottom));width:auto;max-height:min(46dvh,330px);padding:11px;border-radius:16px}.selection-head{margin-bottom:7px}.selection-head h2{font-size:17px}.selection-content h3{margin:9px 0 6px}.tower-stats{margin-bottom:7px}.branch-button{min-height:46px}.selection .hint{font-size:9px}#toast{bottom:calc(202px + env(safe-area-inset-bottom));font-size:11px}dialog{padding:16px;max-height:calc(100dvh - 24px)}.dialog-head{top:-16px}.dialog-head h2{font-size:21px}.book-grid{gap:8px}.book-card{padding:11px}}
@media(max-height:440px) and (min-width:701px){.launch{top:65px;bottom:52px;grid-template-columns:minmax(0,1fr) 310px;gap:15px}.launch-copy h1{font-size:32px;max-width:250px}.launch-copy p{display:none}.launch-copy .feature-row{margin-top:12px}.launch-panel{padding:9px 12px}.launch-panel h2{font-size:20px}.launch-panel p{font-size:10px}.map-card{min-height:67px}.map-card svg{height:34px}.launch-actions .primary{min-height:44px;font-size:15px;padding:8px}.launch-actions .secondary{min-height:44px;padding:7px}.menu-footer{bottom:8px}.glass{min-height:36px;padding:7px 12px;font-size:10px}.selection{top:113px;bottom:95px;width:270px;padding:10px}.resources>div{padding:7px 12px}.resources small{font-size:7px}.resources b{font-size:16px}.wave-note{top:134px}.players{top:117px}.battle-bottom{bottom:10px}.tool{min-height:57px;padding:5px 8px}.camera-tools{bottom:88px}.aim{bottom:99px}.wave-actions small{display:none}.wave-actions .primary{min-height:46px}.top-actions .compact{min-height:40px}.top-actions .icon-button{min-height:40px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* The shared social SDK owns the label; its visual icon stays CSS-native. */
.top-actions .invite::before{content:"";display:inline-block;width:22px;height:22px;flex:none;margin-right:7px;vertical-align:middle;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M2 21v-3a7 7 0 0 1 14 0v3M17 3a4 4 0 0 1 0 8M22 21v-3a7 7 0 0 0-4-6'/%3E%3C/svg%3E") center/contain no-repeat}
@media(max-width:700px){.top-actions .invite::before{margin:0}.top-actions .compact,.top-actions .icon-button{min-height:44px}.top-actions .invite,.top-actions .icon-button{width:44px;min-width:44px}}
@media(max-width:360px){.wordmark{font-size:9px}.wordmark b{font-size:13px}.wordmark em{font-size:8px}.wordmark small{font-size:5px}.flower{font-size:25px}.topbar{gap:4px}.top-actions{gap:4px}.top-actions .compact{padding:0 7px}.top-actions .compact:not(.invite){font-size:10px}}
@media(max-width:700px) and (max-height:440px){.battle-bottom{bottom:8px;gap:6px}.tool{min-height:44px;grid-template-columns:18px 1fr;padding:5px;gap:1px}.tool svg{grid-row:1/3;width:18px;height:18px}.tool span{font-size:7px}.tool small{font-size:8px}.wave-actions .primary{min-height:44px}.wave-actions small{display:none}.camera-tools{left:auto;right:12px;top:132px;bottom:auto;transform:none}.camera-tools .icon-button:not(#camera-reset){display:none}.camera-tools .icon-button{width:36px;min-width:36px;min-height:36px}.aim{bottom:111px;min-width:0;max-width:calc(100% - 32px)}.selection{bottom:118px;max-height:calc(100dvh - 177px)}#toast{bottom:118px}}

/* Keep the battlefield large in the site's wide, short iframe. */
@media(min-width:701px) and (max-height:650px),(min-width:701px) and (max-width:1100px){.camera-tools{left:auto;right:20px;top:132px;bottom:auto;transform:none;flex-direction:column;gap:3px}}
@media(min-width:701px) and (max-height:440px){.camera-tools{top:122px}}
/* Compact localized title for the new block-monster identity. */
.wordmark b,.wordmark em{white-space:nowrap}.wordmark .flower{color:#cc9a38;-webkit-text-stroke:0}
@media(max-width:360px){.wordmark{font-size:8px;gap:3px;letter-spacing:0}.wordmark b{font-size:11px}.wordmark em{font-size:7px}.wordmark .flower{font-size:18px;line-height:1}.wordmark small{font-size:5px}}
