/* Approved Success and Campaign only: no Cover, Failure, or playing-field rules. */
.success-logo,.success-stage,.success-title,.success-message,.success-divider,.success-stats,.success-rewards{display:none}
.flick-field #flick-outcome[data-phase=won]:not([hidden]){position:fixed;inset:0;z-index:50;width:min(100%,480px);height:100svh;max-height:100svh;margin:0 auto;padding:12px 18px 24px;display:flex;flex-direction:column;justify-content:flex-start;gap:9px;overflow-y:auto;overscroll-behavior:contain;background:linear-gradient(#03090c12,#03090c28 35%,#03090c8c 75%,#03090cb0),url('../assets/campaign-success.png') center/cover;border:1px solid #8b6b37;backdrop-filter:none;color:#fff0c4;text-align:center}
#flick-outcome[data-phase=won]::before{display:none}
#flick-outcome[data-phase=won]>.failure-heading,#flick-outcome[data-phase=won]>.failure-context,#flick-outcome[data-phase=won]>.eyebrow,#flick-outcome[data-phase=won]>#flick-outcome-title,#flick-outcome[data-phase=won]>#outcome-score,#flick-outcome[data-phase=won]>.outcome-score-label{display:none}
#flick-outcome[data-phase=won] .success-logo{display:block;width:160px;height:98px;object-fit:contain;flex-shrink:0;margin:0 auto 1px;filter:drop-shadow(0 4px 3px #0009)}
#flick-outcome[data-phase=won] .success-stage{display:block;margin:0 28px 10px;padding:10px 4px;background:linear-gradient(#152025,#060e10);border:1px solid #d2a34f;outline:1px solid #684819;outline-offset:2px;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);color:#ffe3a2;font-size:12px;font-weight:800}
#flick-outcome[data-phase=won] .success-title{display:block;color:#ffd36a;font-size:clamp(31px,9vw,44px);font-weight:950;font-style:normal;letter-spacing:-1px;line-height:1.2;text-shadow:0 2px #9e6419,0 4px 2px #000,0 0 22px #dca63880;margin:0}
#flick-outcome[data-phase=won] #flick-stars{display:flex;align-items:center;justify-content:center;gap:10px;letter-spacing:0;margin:0;height:104px;flex-shrink:0;font-size:82px;line-height:1}
#flick-outcome[data-phase=won] #flick-stars span{display:block;color:#ffdb74;text-shadow:0 3px #b27a28,0 0 18px #ffbd4066;filter:drop-shadow(0 4px 4px #0008)}
#flick-outcome[data-phase=won] #flick-stars span:nth-child(2){font-size:100px;transform:translateY(-6px)}
#flick-outcome[data-phase=won] #flick-stars .unearned{color:#84735b;text-shadow:0 2px #141414;filter:none}
#flick-outcome[data-phase=won] .success-message{display:block;font-size:12px;line-height:1.5;margin:0 6px;text-shadow:0 2px 3px #000;font-weight:600}
#flick-outcome[data-phase=won] .success-divider{display:block;color:#f4cb70;font-size:18px;letter-spacing:5px;line-height:22px}
#flick-outcome[data-phase=won] .success-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:13px 3px;background:linear-gradient(#111c20ef,#060e10f2);border:1px solid #d3a250;border-radius:12px;box-shadow:inset 0 0 0 2px #9b6a2522;min-height:76px;flex-shrink:0}
.success-stats>div+div{border-left:1px solid #9d7c40}.success-stats small{display:block;font-size:10px;color:#ecdcae}.success-stats strong{display:block;margin-top:6px;font-size:27px;line-height:1.1;color:#fff8e3}.success-stats>div:last-child strong{color:#ffd16b}
#flick-outcome[data-phase=won] .success-rewards{display:block;margin:2px 0}.success-rewards h3{font-size:14px;color:#ffe4a1;margin:6px 0 12px;letter-spacing:1px}.success-reward-cards{display:flex;justify-content:center;gap:14px}.success-reward-cards>div{width:128px;min-height:106px;padding:9px;background:linear-gradient(#111b20ed,#070e10f5);border:1px solid #c89744;border-radius:12px;box-shadow:inset 0 1px #ffe49d66}.success-reward-cards span{display:block;color:#f9c956;font-size:32px;line-height:34px;text-shadow:0 0 18px #f9ad40}.success-reward-cards strong{display:block;font-size:25px;color:#fff7df;line-height:1.2;margin:3px}.success-reward-cards small{font-size:10px;color:#ead8a7}
#flick-outcome[data-phase=won] #flick-reward{font-size:11px;margin:0;color:#f4dfab;line-height:1.4}
#flick-outcome[data-phase=won] #flick-record{font-size:10px;color:#ffe3a1}
#flick-outcome[data-phase=won] #flick-next{order:6;flex-shrink:0;min-height:58px;margin:6px 0 0;border:2px solid #ffe8a3;border-radius:9px;clip-path:polygon(6% 0,94% 0,100% 50%,94% 100%,6% 100%,0 50%);background:linear-gradient(135deg,#fff0b5,#efc368 45%,#c88b31);box-shadow:inset 0 0 0 3px #a7712f;color:#22180b;text-shadow:0 1px #ffe8a8;font-size:17px;letter-spacing:0;padding:14px 20px}
#flick-outcome[data-phase=won] .outcome-secondary{order:7;display:block;margin:1px 22px}
#flick-outcome[data-phase=won] #flick-retry{width:100%;min-height:52px;margin:0;border:2px solid #edc26d;border-radius:30px;background:linear-gradient(#1a292d,#071013);color:#f5d083;font-size:16px;font-weight:750;padding:12px}
#flick-outcome[data-phase=won] #flick-map{position:absolute;top:15px;left:16px;width:42px;height:42px;min-height:42px;padding:0;margin:0;border:1px solid #edc26d;border-radius:50%;background:#0a171bed;color:#ffe7a1;font-size:31px}
#flick-outcome[data-phase=won] #score-breakdown{order:8;margin:0;color:#f0dfba;font-size:10px}#flick-outcome[data-phase=won] #score-breakdown summary{padding:8px;min-height:32px}
#flick-outcome[data-phase=won] #score-breakdown[open] p{position:relative;inset:auto;box-shadow:none;margin:0;background:#0c181cf5}
/* Campaign shell and independently scrolling chapter terrain. */
body[data-view=map] .game{background:linear-gradient(#07101840,#07101895),url('../assets/campaign-steppe.png') center top/cover;padding:10px 12px 8px;border-inline:1px solid #a88243;height:100svh;overflow:hidden}
body[data-view=map] header{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;height:68px;min-height:68px;margin:0 0 3px;border:0;gap:8px}
body[data-view=map] header .brand{grid-column:2;grid-row:1;display:grid;place-items:center;width:160px;height:68px;justify-self:center;font-size:0}
body[data-view=map] header .brand-mark{display:none}body[data-view=map] .gameplay-brand-image{display:block;width:160px;height:68px;object-fit:contain;filter:drop-shadow(0 3px 3px #0009)}body[data-view=map] #nav-back{grid-column:1;grid-row:1;margin:0}body[data-view=map] #pause{grid-column:3;grid-row:1;margin:0}
body[data-view=map] header .icon{width:40px;height:40px;min-height:40px;border:1px solid #d5a85f;background:linear-gradient(#24333b,#08151d);color:#f5cf83;border-radius:50%}
body[data-view=map] #map-screen{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}
body[data-view=map] .map-heading{text-align:center;padding:0;margin:0 0 5px;flex-shrink:0}body[data-view=map] .map-heading>.eyebrow{display:none}body[data-view=map] #map-title{font-size:19px;line-height:24px;color:#ffe5a1;margin:2px 18px 8px;padding:9px 4px;background:linear-gradient(#152025,#060e10);border:1px solid #d2a34f;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%)}body[data-view=map] #map-campaign-label{font-size:10px;line-height:1.5;color:#fff1ce;margin:0 6px;text-shadow:0 2px 3px #000}body[data-view=map] #map-summary{font-size:9px;color:#f5d88b;margin:5px 0}body[data-view=map] #playtest-status{font-size:9px;margin:0;color:#fff0c7}
body[data-view=map] #map-screen[data-map-mode=playtest] #map-campaign-toggle{display:none}body[data-view=map] #playtest-leaderboard-open{min-height:28px;padding:4px;margin:0 0 4px;font-size:10px;background:#0a151cce;border-color:#bc944e}
body[data-view=map] #stage-map{height:auto;min-height:160px;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:0;border-radius:10px;background:#1a2c27;scrollbar-color:#aa8446 #0c1918;scrollbar-width:thin;scroll-behavior:auto}
.campaign-chapter{position:relative;isolation:isolate;overflow:hidden;background:#24392c;min-height:720px;padding:14px 0 16px;border-top:1px solid #d0a259}
.chapter-heading{margin:0 12px 0;padding:8px 4px;text-align:center;font-size:14px;line-height:20px;color:#ffe6a7;text-shadow:0 2px 3px #000;background:#0a151ccb;border:1px solid #b98b43;border-radius:5px}
.chapter-terrain{height:540px;position:relative;margin:6px 0 0}.chapter-trail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.chapter-trail path{fill:none;stroke:#f7e2a6;stroke-width:1.4;stroke-linecap:round;stroke-dasharray:.05 3;filter:drop-shadow(0 1px 1px #271c0a)}
body[data-view=map] #stage-map .stage-node{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;width:48px;height:48px;min-height:48px;aspect-ratio:1;border:2px solid #cbb987;border-radius:50%;padding:0;background:linear-gradient(145deg,#35403d,#0c1517);color:#fff7e7;font-size:22px;font-weight:800;box-shadow:0 3px 0 #4e493d,0 0 0 3px #23291e77;text-shadow:0 2px 1px #000;overflow:visible;opacity:1;filter:none;z-index:1}
body[data-view=map] #stage-map .stage-node:disabled{background:linear-gradient(145deg,#38403b,#10191a);color:#f1eee4;border-color:#a9a68c;opacity:1;filter:none}body[data-view=map] #stage-map .stage-node:disabled b{font-size:16px;line-height:17px}.stage-lock{font-size:17px;line-height:18px}
body[data-view=map] #stage-map .stage-node.completed,body[data-view=map] #stage-map .stage-node.recommended{background:linear-gradient(140deg,#fbd579,#a56a1e 60%,#5d3b10);border:2px solid #ffe69c;box-shadow:0 3px #6b4f22,0 0 0 3px #b18b43a0,0 0 18px #f2ba4b55}
body[data-view=map] #stage-map .stage-node-stars{position:absolute;top:42px;left:50%;transform:translateX(-50%);white-space:nowrap;color:#ffda6c;font-size:20px;line-height:24px;text-shadow:0 2px #342207,0 0 4px #000;min-height:0;letter-spacing:-2px}
.chapter-card{position:relative;margin:0 16px 0 auto;padding:12px 15px;width:66%;max-width:270px;background:linear-gradient(125deg,#f7e7bb,#d8b87b);border:2px solid #9b7136;border-radius:5px;color:#32230f;box-shadow:0 4px 12px #0008}.chapter-card h3{font-size:16px;margin:0 0 6px;text-transform:uppercase;color:#35250e}.chapter-card p{font-size:11px;line-height:1.5;margin:0 0 7px}.chapter-card strong{display:block;text-align:center;padding-top:5px;border-top:1px solid #a07c43;font-size:23px;color:#35250e}
.campaign-tabs{display:flex;flex-shrink:0;gap:0;border:1px solid #c3974e;border-radius:10px;background:linear-gradient(#101d20f5,#050d10fa);margin-top:7px;min-height:60px;box-shadow:inset 0 0 0 2px #b4873f33}
.campaign-tabs>button,.campaign-tabs>span{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 0;background:none;border:0;border-radius:0;color:#e7c67d;font-size:23px;margin:0;line-height:1.1}.campaign-tabs>span{color:#ffdc83;background:linear-gradient(transparent,#b9872933)}.campaign-tabs>*+*{border-left:1px solid #9b783b!important}.campaign-tabs b{font-size:9px;font-weight:750;line-height:1.2}
body[data-view=map] #map-home{height:27px;min-height:27px;flex-shrink:0;font-size:10px;padding:4px;margin-top:5px;background:#0a151cde;border-color:#b98b43}
body[data-view=map] #map-screen[data-map-mode=legacy] .campaign-tabs{display:none}
@media(max-height:680px){body[data-view=map] header,body[data-view=map] header .brand,body[data-view=map] .gameplay-brand-image{height:46px;min-height:46px}body[data-view=map] #map-title{font-size:16px;padding:5px;margin-bottom:4px}body[data-view=map] #map-campaign-label{font-size:9px}.campaign-tabs{min-height:52px}.flick-field #flick-outcome[data-phase=won]:not([hidden]){padding:8px 14px 20px;gap:7px}#flick-outcome[data-phase=won] .success-logo{height:80px}#flick-outcome[data-phase=won] .success-stage{margin-bottom:5px}#flick-outcome[data-phase=won] #flick-stars{height:90px;font-size:70px}#flick-outcome[data-phase=won] #flick-stars span:nth-child(2){font-size:84px}}
body[data-view=map] button:focus-visible,#flick-outcome[data-phase=won] button:focus-visible{outline-offset:3px}#stage-map .stage-node:focus-visible{outline:3px solid #fff4ba}

.chapter-landscape{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;pointer-events:none}.campaign-chapter:before{content:"";position:absolute;inset:0;background:linear-gradient(#07101218,#08131100 50%,#08100b66);z-index:-1;pointer-events:none}
body[data-view=map] #stage-map{min-width:0;overflow-x:hidden}
body[data-view=map] .campaign-chapter{width:100%;min-width:0}
body[data-view=map] .chapter-terrain{margin-inline:8px;min-width:0}

body[data-view=map] .game{display:flex;flex-direction:column}body[data-view=map] header{flex-shrink:0}

#flick-outcome[data-phase=won] #success-rewards:not([hidden])~#flick-reward{display:none}

#flick-outcome[data-phase=won] #flick-stars span{width:clamp(64px,20vw,80px);height:88px}#flick-outcome[data-phase=won] #flick-stars span:nth-child(2){width:clamp(80px,24vw,96px);height:104px}#flick-stars svg{display:block;width:100%;height:100%;overflow:visible}#flick-stars .unearned .star-base{fill:#322d24;stroke:#88744f}#flick-stars .unearned .star-facets{display:none}

body[data-view=map] .game{margin:0 auto;min-height:0;border-block:0;border-radius:0}

body[data-view=map] #map-screen[data-map-mode=legacy] #level-map{height:auto;min-height:120px;flex:1}
