@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@400;500;600;700;800&display=swap');:root{font-family:'Sarabun','Segoe UI',Tahoma,sans-serif;color:#fff}*{box-sizing:border-box;user-select:none;-webkit-user-select:none;caret-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:radial-gradient(circle at 20% 10%,#317d99,transparent 28%),linear-gradient(145deg,#102843,#32204c)}button{font:inherit}.game{width:min(100vw,calc(100dvh*.5625),580px);aspect-ratio:9/16;height:auto;max-height:100dvh;margin:auto;padding:9px;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:7px}.game>header{display:flex;justify-content:space-between;align-items:center}.game h1{margin:0;font-size:22px}.game header small{color:#73e3fb;font-weight:700}.game header button{width:42px;height:42px;border:1px solid #ffffff24;border-radius:14px;background:#173650;color:#fff}.res{display:grid;grid-template-columns:repeat(3,1fr) auto;gap:5px}.res>div{padding:7px;border-radius:13px;background:linear-gradient(#365673,#172e4c);font-size:12px}.res button{padding:4px;border:1px solid #ffe48666;border-radius:11px;background:linear-gradient(#ffec8d,#dda73b);font-size:7px}.quest{padding:8px 10px;display:flex;justify-content:space-between;align-items:center;border:1px solid #ffffff1d;border-radius:16px;background:linear-gradient(120deg,#24506cdd,#302859dd)}.quest div{display:grid}.quest small{font-size:8px;color:#b8cada}.quest button{padding:6px 9px;border:0;border-radius:10px;background:#6adb61;color:#173813;font-size:8px;font-weight:700}.quest button:disabled{background:#344d63;color:#9cb0c0}.board-wrap{min-height:0;padding:7px;border:3px solid #ad591f;border-radius:23px;background:linear-gradient(#ffc25c,#db7d1e);overflow:hidden}.board{display:none}#board{width:100%;aspect-ratio:6/8;display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(8,1fr);gap:3px;padding:4px;border-radius:15px;background:#c8ad9f}.cell{position:relative;min-width:0;min-height:0;aspect-ratio:1;border:0;border-radius:9px;background:#ead9cd;box-shadow:inset 0 1px #fff9;display:grid;place-items:center;contain:layout paint style;isolation:isolate;touch-action:none}.cell:nth-child(12n+1),.cell:nth-child(12n+3),.cell:nth-child(12n+5),.cell:nth-child(12n+8),.cell:nth-child(12n+10),.cell:nth-child(12n+12){background:#d8c2b5}.item{position:relative;width:78%;aspect-ratio:1;display:grid;place-items:center;border-radius:38%;background:var(--c);box-shadow:inset 0 3px #ffffff77,inset 0 -5px #0002,0 4px 8px #69423155;font-size:clamp(15px,4vw,29px);font-weight:700;pointer-events:none}.item img{position:absolute;inset:-8%;width:116%;height:116%;object-fit:contain;opacity:0}.item.has{background:transparent;box-shadow:none}.item.has>span{opacity:0}.item.has img{opacity:1}.captive{background:linear-gradient(145deg,#7f6a68,#5c4d50)!important;box-shadow:inset 0 0 0 2px #40383b,inset 0 7px 12px #0005}.captive .item{width:66%;filter:grayscale(.2) brightness(.72)}.chain{position:absolute;z-index:4;font-size:22px;filter:drop-shadow(0 2px 2px #000);pointer-events:none}.captive::after{content:'';position:absolute;inset:3px;border:1px dashed #ffd98b66;border-radius:7px;pointer-events:none}.generator::before,.generator::after{content:'';position:absolute;z-index:5;width:5px;height:5px;border-radius:50%;background:#fff5a1;animation:twinkle 2s infinite}.generator::before{right:15%;top:12%}.generator::after{left:16%;bottom:18%;animation-delay:1s}@keyframes twinkle{0%,70%,100%{opacity:0;transform:scale(.2)}80%{opacity:1;transform:scale(1)}}.gauge{position:absolute;z-index:5;left:10%;right:10%;bottom:3px;height:5px;border-radius:9px;background:#263342cc;overflow:hidden}.gauge em{display:block;height:100%;background:linear-gradient(90deg,#57daf0,#8fea67);transition:width .3s}.ghost,.spawnGhost{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;filter:drop-shadow(0 10px 8px #0006)}.merge .item{animation:merge .7s cubic-bezier(.18,.82,.2,1)}@keyframes merge{0%{opacity:.2;transform:scale(.35) rotate(-8deg)}35%{opacity:1;transform:scale(1.18,.82) rotate(4deg)}62%{transform:scale(.92,1.1) rotate(-2deg)}100%{transform:none}}.land .item{animation:land .6s cubic-bezier(.2,.8,.2,1.3)}@keyframes land{0%{transform:translateY(-18px) scale(.8,1.15)}45%{transform:translateY(2px) scale(1.18,.8)}100%{transform:none}}nav{height:58px;padding:4px;display:grid;grid-template-columns:repeat(5,1fr);gap:3px;border:1px solid #ffffff1d;border-radius:18px;background:#102641ed}nav button{border:0;border-radius:11px;background:transparent;color:#a9bbcd;display:grid;place-content:center;font-size:18px}nav small{font-size:7px}dialog{width:min(calc(100% - 24px),600px);max-height:90dvh;padding:18px;border:1px solid #ffffff24;border-radius:23px;color:#fff;background:linear-gradient(150deg,#173751,#281f47);box-shadow:0 24px 70px #000a}dialog::backdrop{background:#030913c7;backdrop-filter:blur(8px)}dialog .close{position:absolute;right:10px;top:10px;width:34px;height:34px;border:0;border-radius:50%;background:#ffffff14;color:#fff}#levelMap{max-height:65dvh;overflow:auto;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:5px;touch-action:pan-y}#levelMap button{min-height:65px;padding:5px;display:grid;place-content:center;border:1px solid #ffffff1c;border-radius:15px;color:#fff;background:#ffffff0c}#levelMap b{font-size:20px}#levelMap small{font-size:6px}#levelMap em{color:#ffe375;font-size:8px;font-style:normal}#levelMap .current{background:linear-gradient(#66dff0,#5065d8);box-shadow:0 0 18px #62dcf488}#levelMap .done{background:linear-gradient(#68de75,#328c57)}#levelMap .locked{filter:grayscale(.7);opacity:.58}#unlockNext,#rewardOk{width:100%;margin-top:10px;padding:11px;border:0;border-radius:12px;background:linear-gradient(#ffe783,#dfa334);font-weight:700}#rewardText{display:grid;gap:7px;padding:15px;border-radius:15px;background:#ffffff0c}.particle{position:fixed;width:8px;height:8px;border-radius:50%;background:#fff18d;box-shadow:0 0 9px #ffc33a;animation:p .7s ease-out both}@keyframes p{to{opacity:0;transform:rotate(var(--a)) translateX(55px) scale(.1)}}#toast{position:fixed;z-index:10000;left:50%;bottom:70px;transform:translate(-50%,25px);opacity:0;padding:9px 14px;border-radius:99px;background:#10243bf2;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}@media(max-height:720px){.res{display:none}.game{gap:4px}.quest{padding:5px 8px}}

/* V1.3 dynamic research orders and audio controls */
.game{grid-template-rows:auto auto auto auto minmax(0,1fr) auto}.orders{padding:6px 7px;border:1px solid #ffffff1b;border-radius:15px;background:#102943d9}.orders>header{display:flex;justify-content:space-between;padding:0 3px 4px}.orders header small{font-size:7px;color:#a9bdcf}.orders>div{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.orders button{min-width:0;height:48px;padding:5px;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:5px;border:1px solid #ffffff18;border-radius:12px;color:#fff;background:#ffffff0a;text-align:left}.orders button>span{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:var(--c);font-size:19px;box-shadow:inset 0 2px #ffffff66}.orders button>div{min-width:0;display:grid}.orders button b{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.orders button small{font-size:7px;color:#a9becf}.orders button em{padding:4px;border-radius:7px;color:#9eb0bf;background:#30485e;font-size:7px;font-style:normal}.orders button.ready{border-color:#75e67b88;background:#5ed7651a}.orders button.ready em{color:#163810;background:#68dc5e;font-weight:700}#settingsDialog label{margin:8px 0;padding:10px;display:flex;align-items:center;justify-content:space-between;border-radius:12px;background:#ffffff0c}#settingsDialog input[type=range]{width:130px;accent-color:#61dcee}@media(max-height:760px){.orders header{display:none}.orders{padding:4px}.orders button{height:41px}.orders button>span{width:31px;height:31px}.game{gap:4px}}

/* V1.4 modular bottom navigation, premium shop and bounded spawn */
#bottomNav{position:relative;z-index:30;pointer-events:auto}#bottomNav button{position:relative;pointer-events:auto;touch-action:manipulation;transition:transform .14s,background .18s,color .18s}#bottomNav button:active{transform:scale(.9)}#bottomNav button.active{color:#78e4fa;background:#48d7ef18;box-shadow:inset 0 0 0 1px #62dff044}
.app-dialog{overflow:auto;touch-action:pan-y}.app-dialog>small{color:#75def6;letter-spacing:.11em}.app-dialog>p{color:#aec1d2;font-size:10px}.inventory-list,.codex-list{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.inventory-list article,.codex-list article{position:relative;min-width:0;padding:8px;display:grid;grid-template-columns:48px 1fr;gap:8px;align-items:center;border:1px solid #ffffff1a;border-radius:14px;background:#ffffff0c}.inventory-list article>span,.codex-list article>span{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:var(--c);font-size:23px}.inventory-list article div,.codex-list article div{min-width:0;display:grid}.inventory-list b,.codex-list b{font-size:9px}.inventory-list small,.codex-list small{font-size:7px;color:#76daf2}.codex-list article img{position:absolute;left:6px;top:6px;width:50px;height:50px;object-fit:contain;opacity:0}.codex-list article.asset-loaded>span{opacity:0}.codex-list article.asset-loaded img{opacity:1}.codex-list article.locked{filter:grayscale(1);opacity:.42}.empty{grid-column:1/-1;padding:20px;text-align:center;color:#a9bdce}
.premium-shop{padding:0;overflow:hidden;background:linear-gradient(150deg,#132f4b,#281d48)}.premium-shop>.close{z-index:5}.shop-head{position:relative;min-height:110px;padding:20px 70px 15px 18px;background:radial-gradient(circle at 85% 18%,#80e5ff55,transparent 28%),linear-gradient(135deg,#205674,#483276);border-bottom:1px solid #ffffff20}.shop-head h2{margin:3px 0}.shop-head p{margin:0;color:#c2d6e6;font-size:9px}.shop-head>span{position:absolute;right:24px;top:27px;color:#ffec85;font-size:45px;filter:drop-shadow(0 0 13px #72e5ff)}.shop-wallet{margin:10px 13px 0;display:flex;justify-content:flex-end;gap:7px}.shop-wallet b{padding:6px 9px;border-radius:99px;background:#ffffff0e;font-size:10px}.shop-wallet i{font-style:normal}.shop-list{padding:10px 13px 15px;display:grid;gap:8px}.shop-card{min-height:78px;padding:9px;display:grid;grid-template-columns:58px 1fr auto;gap:9px;align-items:center;border:1px solid #ffffff20;border-radius:16px;color:#fff;background:#ffffff0c;text-align:left}.shop-card>span{width:54px;height:54px;display:grid;place-items:center;border-radius:18px;background:var(--c);font-size:28px;box-shadow:inset 0 3px #ffffff66,0 7px 13px #0003}.shop-card>div{min-width:0;display:grid}.shop-card small{color:#72dff7;font-size:7px;letter-spacing:.1em}.shop-card b{font-size:12px}.shop-card p{margin:2px 0;color:#adc0d1;font-size:8px}.shop-card em{padding:7px 8px;border-radius:10px;background:#08182799;color:#ffe272;font-size:9px;font-style:normal;font-weight:700}.shop-card.green{background:linear-gradient(110deg,#45c59120,#ffffff09)}.shop-card.violet{background:linear-gradient(110deg,#a36ff028,#f5c44d12)}
.spawn-projectile{position:fixed!important;left:0!important;top:0!important;z-index:12000!important;min-width:0!important;max-width:none!important;margin:0!important;pointer-events:none!important;will-change:transform;transform-origin:center;filter:drop-shadow(0 10px 7px #0006)}.spawn-land-v14 .item{animation:spawnLandV14 .62s cubic-bezier(.18,.82,.2,1.25)}@keyframes spawnLandV14{0%{transform:translateY(-11px) scale(.9,1.08)}32%{transform:translateY(2px) scale(1.12,.86)}58%{transform:translateY(-3px) scale(.96,1.05)}78%{transform:translateY(1px) scale(1.025,.98)}100%{transform:none}}
dialog{z-index:1000}dialog::backdrop{z-index:999}.board-wrap{position:relative;z-index:1}@media(max-width:450px){.inventory-list,.codex-list{grid-template-columns:1fr}}

/* ChronoMerge v3 */
.item{animation:itemBreathV3 var(--breath,5.5s) ease-in-out var(--delay,0s) infinite;transform-origin:50% 66%}@keyframes itemBreathV3{0%,68%,100%{transform:none}78%{transform:translateY(-.9px) scale(1.012,1.016)}89%{transform:translateY(.35px) scale(.997,1)}}.ghost,.spawn-projectile,.captive .item,.generator .item,.merge .item,.spawn-land-v2 .item{animation:none!important}.visual-order{position:relative;min-width:0;height:64px!important;padding:5px!important;display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;overflow:visible}.visual-order .order-item{width:48px;height:48px;justify-self:center;filter:drop-shadow(0 0 4px #fff9)}.visual-order strong{position:absolute;right:7px;bottom:5px;color:#fff;font-family:Arial,sans-serif;font-size:14px;font-weight:900;text-shadow:0 2px 4px #000}.visual-order.ready{border-color:#ffe26f!important;box-shadow:0 0 13px #ffd94c88,inset 0 0 10px #ffe47322}.visual-order.ready .order-item{filter:drop-shadow(0 0 9px #ffe96f);animation:orderJiggle .7s ease-in-out infinite}@keyframes orderJiggle{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(2deg) translateY(-2px)}}.gen-level{position:absolute;z-index:8;right:3px;top:3px;width:18px;height:14px;padding:2px;display:flex;gap:1px;align-items:flex-end;border:1px solid #fff;border-radius:3px;background:#243446bb;box-shadow:0 1px 3px #0005}.gen-level::after{content:'';position:absolute;right:-3px;top:4px;width:2px;height:5px;background:#fff;border-radius:0 1px 1px 0}.gen-level i{flex:1;height:3px;border-radius:1px;background:#ffffff28}.gen-level i.on{background:#fff;box-shadow:0 0 3px #fff}.generator-upgrade .item{animation:generatorUpgrade .8s cubic-bezier(.15,.85,.2,1)}@keyframes generatorUpgrade{0%{filter:brightness(1);transform:scale(.6)}35%{filter:brightness(2);transform:scale(1.2) rotate(5deg)}70%{transform:scale(.94) rotate(-2deg)}100%{filter:none;transform:none}}.merge-hint .item{animation:hintJiggle 1s ease-in-out 1!important}@keyframes hintJiggle{0%,100%{transform:none}25%{transform:translateX(-3px) rotate(-3deg)}50%{transform:translateX(3px) rotate(3deg)}75%{transform:translateX(-2px) rotate(-2deg)}}.asset-product{position:relative;min-height:105px!important;display:grid;place-items:center}.asset-product .item{width:58px;height:58px}.asset-product strong{color:#ffe477;font-size:11px}.codex-list article{grid-template-columns:52px 1fr}.codex-list article>.item{width:48px;height:48px}.codex-list article>div{display:grid;gap:3px}.codex-list article>div small{color:#a9bfd0;font-size:7px}.clear-moment{position:fixed;z-index:20000;inset:0;display:grid;place-items:center;color:#fff9a0;font-family:Arial,sans-serif;font-size:clamp(65px,18vw,130px);font-weight:1000;letter-spacing:.08em;text-shadow:0 7px 0 #a66816,0 0 35px #ffe367;animation:clearMoment 1.2s cubic-bezier(.18,.82,.2,1) both;pointer-events:none}@keyframes clearMoment{0%{opacity:0;transform:scale(.2) rotate(-7deg)}35%{opacity:1;transform:scale(1.15) rotate(2deg)}70%{transform:scale(.96)}100%{opacity:0;transform:scale(1.3)}}.bonus-moment{position:fixed;z-index:15000;transform:translate(-50%,-50%);color:#fff38b;font-family:Arial,sans-serif;font-size:23px;font-weight:1000;text-shadow:0 3px #8c5410,0 0 13px #ffe46d;animation:bonusMoment 1s ease-out both;pointer-events:none}@keyframes bonusMoment{0%{opacity:0;transform:translate(-50%,-20%) scale(.4)}30%{opacity:1;transform:translate(-50%,-80%) scale(1.2)}100%{opacity:0;transform:translate(-50%,-150%) scale(.9)}}.permanent-lock{background:radial-gradient(circle,#665a60,#3d3942)!important;opacity:.3}.pending{background:#ffffff10!important}.pending::after{content:'';width:9px;height:9px;border-radius:50%;background:#ffffff55;animation:pendingV3 .7s ease-in-out infinite}@keyframes pendingV3{50%{opacity:.2;transform:scale(.65)}}#levelMap .done{filter:grayscale(.55);opacity:.55}#levelMap .done small{color:#d8e0e8;font-weight:900;letter-spacing:.08em}.quest #questName{font-size:10px}.quest #questText{font-size:8px;line-height:1.35}.gauge{isolation:isolate}@media(prefers-reduced-motion:reduce){.item,.visual-order.ready .order-item,.merge-hint .item{animation:none!important}}
#unlockNext{display:none!important}

/* v3 research order containment and delivery */
.orders{overflow:hidden}.orders>div{align-items:stretch}.visual-order{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;height:58px!important;padding:3px!important;overflow:hidden!important;contain:layout paint}.visual-order .order-item{position:relative!important;width:44px!important;height:44px!important;max-width:calc(100% - 8px)!important;max-height:calc(100% - 8px)!important;margin:auto!important;justify-self:center!important;align-self:center!important;border-radius:14px!important}.visual-order .order-item img{inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}.visual-order strong{z-index:5;right:4px!important;bottom:3px!important;padding:1px 4px;border-radius:7px;background:#0b1829cc;font-size:12px!important;line-height:1.15}.order-delivery-ghost{position:fixed!important;left:0!important;top:0!important;z-index:18000!important;pointer-events:none!important;animation:none!important;will-change:transform,opacity;filter:drop-shadow(0 5px 6px #0007) drop-shadow(0 0 4px #fff9)}.order-delivery-ghost img{inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}.order-receive-pulse{animation:orderReceivePulse .48s cubic-bezier(.17,.85,.25,1)}@keyframes orderReceivePulse{0%{transform:scale(1)}45%{transform:scale(1.08);box-shadow:0 0 18px #ffe66e}100%{transform:scale(1)}}
/* Normal board items keep breathing; only transient visuals opt out */
.cell:not(.captive):not(.generator):not(.merge):not(.spawn-land-v2):not(.generator-upgrade)>.item{animation:itemBreathV3 var(--breath,5.5s) ease-in-out var(--delay,0s) infinite!important}.ghost,.spawn-projectile,.order-delivery-ghost{animation:none!important}

/* v3 progression, reset and stronger high-level hint */
.orders.orders-empty{display:none!important}#levelMap .unlockable{background:linear-gradient(#a978ec,#5b48bb);box-shadow:0 0 16px #b980ff88;opacity:1}#unlockNext{display:none!important}#unlockNext[style*="display: block"]{display:block!important}.developer-reset{width:100%;margin-top:12px;padding:11px;border:1px solid #ff8a8a66;border-radius:12px;color:#ffd7d7;background:#7f283088;font-weight:900;letter-spacing:.08em}.merge-hint .item{animation:highestPairGuide 1.05s cubic-bezier(.2,.75,.25,1) 1!important;filter:drop-shadow(0 0 7px #fff6) drop-shadow(0 0 9px var(--c))}@keyframes highestPairGuide{0%,100%{transform:none}18%{transform:translateX(-4px) rotate(-4deg) scale(1.03)}38%{transform:translateX(4px) rotate(4deg) scale(1.045)}58%{transform:translateX(-3px) rotate(-3deg) scale(1.03)}78%{transform:translateX(2px) rotate(2deg) scale(1.02)}}

/* v3 shop clarity, reward receipt and map wallet */
.map-wallet{position:sticky;top:0;z-index:5;margin:0 0 10px;padding:7px;display:flex;justify-content:center;gap:7px;border:1px solid #ffffff20;border-radius:14px;background:#132d47ee;backdrop-filter:blur(7px)}.map-wallet b{padding:5px 9px;border-radius:99px;background:#ffffff0d;font-size:10px}.map-wallet i{font-style:normal;font-variant-numeric:tabular-nums}.shop-list{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}.clear-product{width:100%;min-height:82px!important;padding:9px!important;display:grid!important;grid-template-columns:62px 1fr!important;gap:10px!important;align-items:center!important;text-align:left!important;overflow:hidden}.clear-product>.item{width:56px!important;height:56px!important;max-width:56px!important}.clear-product>.item img{inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}.clear-product>div{min-width:0;display:grid;gap:3px}.clear-product>div>b{font-size:11px;color:#fff}.clear-product>div>small{font-size:7px;color:#afc3d4;white-space:normal}.clear-product>div>strong{justify-self:start;margin-top:3px;padding:4px 8px;border-radius:8px;color:#ffe37a;background:#0b1829aa;font-size:10px}#rewardDialog{text-align:center}#rewardDialog h2{color:#ffe584}#rewardText{grid-template-columns:repeat(3,1fr);font-variant-numeric:tabular-nums}#rewardText b{padding:14px 5px;border:1px solid #ffffff1d;border-radius:13px;background:#ffffff0c;font-size:13px}#rewardOk{background:linear-gradient(#ffe98b,#dfa83e)}.quest #questText{max-width:320px;white-space:normal}.quest{min-height:52px}

/* ChronoMerge v4: mature command header, grouped missions, 6x6 board */
.game{grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:7px}.command-head{position:relative!important;padding:11px 12px 10px!important;display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;border:1px solid #77ddec30;border-radius:20px;background:radial-gradient(circle at 16% 10%,#53d9ee24,transparent 26%),linear-gradient(145deg,#173c59,#172a47 58%,#2a244d);box-shadow:inset 0 1px #ffffff20,0 9px 24px #07142266;overflow:hidden}.command-head::after{content:'';position:absolute;right:-30px;top:-55px;width:150px;height:150px;border:1px solid #8be7f329;border-radius:50%;box-shadow:0 0 45px #5ed7e51a;pointer-events:none}.brand-orbit{display:flex;align-items:center;gap:10px;min-width:0}.brand-orbit>span{width:39px;height:39px;display:grid;place-items:center;border:1px solid #8ceaf156;border-radius:50%;color:#ffe68b;background:radial-gradient(circle,#4dd7ee33,#152f4d 65%);box-shadow:0 0 16px #59dbe744}.brand-orbit small{color:#7fe7f1!important;font-size:7px;letter-spacing:.14em}.brand-orbit h1{margin:2px 0 0!important;font-family:Georgia,serif;font-size:18px!important;white-space:nowrap}.head-actions{z-index:2}.head-actions button{width:40px!important;height:40px!important;border-radius:13px!important;background:#ffffff0c!important;box-shadow:inset 0 1px #ffffff22}.command-head .res{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(3,1fr) auto!important;gap:5px}.command-head .res>div{height:33px;padding:4px 8px;display:flex;align-items:center;gap:5px;border:1px solid #ffffff14;border-radius:10px;background:#081b2b66;box-shadow:inset 0 1px #ffffff12}.command-head .res>div span{font-size:13px}.command-head .res>div b{font-size:10px;font-variant-numeric:tabular-nums}.mission-panel{padding:8px!important;display:grid!important;gap:7px!important;border:1px solid #79ddec30!important;background:linear-gradient(145deg,#173d58d9,#25254ed9)!important;box-shadow:inset 0 1px #ffffff16,0 7px 18px #07131f55}.mission-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.mission-heading>div{display:grid}.mission-heading small{color:#77dfed;font-size:6px;letter-spacing:.12em}.mission-heading b{font-size:10px}.mission-heading #claimLevel{min-width:78px;height:30px;padding:5px 8px}.mission-grid{display:grid!important;grid-template-columns:repeat(3,1fr);gap:5px;width:100%}.mission-check{min-width:0;padding:6px;display:grid;grid-template-columns:auto 1fr auto;gap:4px;align-items:center;border:1px solid #ffffff14;border-radius:10px;background:#071a2a66}.mission-check i{width:17px;height:17px;display:grid;place-items:center;border-radius:50%;color:#8fa9bb;background:#ffffff0d;font-size:8px;font-style:normal}.mission-check b{font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mission-check em{color:#a9bfce;font-size:7px;font-style:normal;font-variant-numeric:tabular-nums}.mission-check.done{border-color:#7de48a55;background:#54cd6720}.mission-check.done i{color:#173e20;background:#73dc80}.orders>div{grid-template-columns:repeat(3,minmax(0,1fr))!important}.visual-order{aspect-ratio:1!important;height:auto!important;min-height:0!important;padding:5px!important;display:grid!important;place-items:center!important}.visual-order .order-item{width:70%!important;height:70%!important;max-width:52px!important;max-height:52px!important}.board-wrap{min-height:0;display:grid;place-items:center}.board-wrap #board{width:min(100%,calc(100dvh - 345px));max-width:100%;aspect-ratio:1!important;grid-template-columns:repeat(6,1fr)!important;grid-template-rows:repeat(6,1fr)!important}.clear-product{border-color:#80ddea2c!important;background:linear-gradient(115deg,#18364f,#211f42)!important}@media(max-height:760px){.command-head{padding:7px!important}.command-head .res{display:none!important}.mission-check{padding:4px}.board-wrap #board{width:min(100%,calc(100dvh - 250px))}}
#rewardText b{display:grid;gap:3px}#rewardText b small{color:#8edfeb;font-size:7px;text-transform:uppercase;letter-spacing:.08em}.milestone-reward{grid-column:1/-1;color:#ffe985!important;background:linear-gradient(110deg,#8d6b261f,#ffde6628)!important;box-shadow:0 0 15px #ffd96833}

/* v4 responsive board containment fix */
html,body{min-width:0;min-height:0}.game{box-sizing:border-box!important;width:min(100vw,580px)!important;height:100dvh!important;max-height:100dvh!important;aspect-ratio:auto!important;overflow:hidden!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important}.command-head,.mission-panel,.orders,nav{min-height:0;min-width:0}.board-wrap{box-sizing:border-box!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;overflow:hidden!important;display:grid!important;place-items:center!important;padding:7px!important}.board-wrap #board{box-sizing:border-box!important;flex:none!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;aspect-ratio:1!important;margin:auto!important}.game.compact-layout{padding:6px!important;gap:4px!important}.game.compact-layout .command-head{padding:6px 8px!important}.game.compact-layout .brand-orbit>span{width:31px;height:31px}.game.compact-layout .brand-orbit h1{font-size:15px!important}.game.compact-layout .command-head .res>div{height:28px}.game.compact-layout .mission-panel{padding:5px!important;gap:4px!important}.game.compact-layout .mission-check{padding:3px}.game.compact-layout .orders{padding:5px}.game.compact-layout .orders header{display:none}.game.compact-layout nav{height:49px}.game.micro-layout .command-head .res{display:none!important}.game.micro-layout .brand-orbit>span{display:none}.game.micro-layout .mission-heading small{display:none}.game.micro-layout .mission-check{padding:2px}.game.micro-layout .mission-check i{width:14px;height:14px}.game.micro-layout .visual-order{max-height:54px}.game.micro-layout nav{height:43px}.game.micro-layout nav small{display:none}

/* v4 board-first vertical priority */
.game{grid-template-rows:auto auto auto minmax(0,1fr) auto!important;gap:4px!important}
/* Research orders: compact rail, approximately 70% less vertical space */
.orders{box-sizing:border-box!important;min-height:0!important;height:40px!important;max-height:40px!important;padding:3px 6px!important;border-radius:12px!important;overflow:hidden!important;background:linear-gradient(110deg,#102d44cc,#1d2344cc)!important}
.orders>header{display:none!important}
.orders>#orderList{height:34px!important;min-height:0!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;overflow:hidden!important}
.visual-order{flex:0 0 54px!important;width:54px!important;height:34px!important;min-height:34px!important;max-height:34px!important;aspect-ratio:auto!important;padding:2px 4px!important;display:grid!important;grid-template-columns:28px 1fr!important;place-items:center!important;border-radius:9px!important;overflow:hidden!important}
.visual-order .order-item{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;max-width:28px!important;max-height:28px!important;margin:0!important}
.visual-order strong{position:static!important;justify-self:center!important;align-self:center!important;padding:0!important;background:transparent!important;font-size:9px!important;line-height:1!important;text-shadow:0 1px 3px #000!important}
/* Mission checklist: compact status strip instead of a tall content block */
.mission-panel{min-height:0!important;max-height:68px!important;padding:5px 7px!important;gap:4px!important;border-radius:13px!important}
.mission-heading{height:22px!important;min-height:22px!important;gap:5px!important}
.mission-heading small{display:none!important}
.mission-heading b{font-size:8px!important;line-height:1!important}
.mission-heading #claimLevel{height:22px!important;min-width:70px!important;padding:2px 7px!important;font-size:7px!important;border-radius:8px!important}
.mission-grid{display:flex!important;align-items:center!important;gap:4px!important;width:100%!important;min-width:0!important;overflow:hidden!important}
.mission-check{flex:1 1 0!important;min-width:0!important;height:31px!important;padding:3px 4px!important;grid-template-columns:13px minmax(0,1fr)!important;grid-template-rows:1fr 1fr!important;column-gap:3px!important;row-gap:0!important;border-radius:8px!important}
.mission-check i{grid-row:1/3!important;width:13px!important;height:13px!important;font-size:6px!important;align-self:center!important}
.mission-check b{font-size:6px!important;line-height:1!important}
.mission-check em{font-size:6px!important;line-height:1!important;justify-self:start!important}
/* The board owns the reclaimed space */
.board-wrap{padding:5px!important;border-width:2px!important;border-radius:18px!important}
nav{margin-top:0!important}
.game.compact-layout .orders,.game.micro-layout .orders{height:34px!important;max-height:34px!important;padding:2px 5px!important}
.game.compact-layout .orders>#orderList,.game.micro-layout .orders>#orderList{height:30px!important}
.game.compact-layout .visual-order,.game.micro-layout .visual-order{height:30px!important;min-height:30px!important;max-height:30px!important}
.game.compact-layout .visual-order .order-item,.game.micro-layout .visual-order .order-item{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}
.game.compact-layout .mission-panel,.game.micro-layout .mission-panel{max-height:60px!important;padding:4px 6px!important}
.game.micro-layout .mission-heading{height:18px!important;min-height:18px!important}
.game.micro-layout .mission-check{height:27px!important;padding:2px 3px!important}
@media(max-width:360px){.mission-check b{display:none!important}.mission-check{grid-template-columns:13px 1fr!important}.mission-check em{align-self:center!important;font-size:7px!important}.visual-order{flex-basis:50px!important;width:50px!important}}
.command-head{grid-template-rows:auto auto auto!important}.head-actions{display:flex;gap:5px}.head-actions #eraProjectButton{position:relative;font-size:15px}.head-actions #eraProjectButton span{position:absolute;right:-3px;top:-4px;padding:2px 3px;border-radius:7px;background:#0b1b2c;color:#87e4ef;font-size:5px;font-weight:800}.evolution-hud{grid-column:1/-1!important;width:100%!important;height:19px!important;padding:2px 5px!important;display:grid!important;grid-template-columns:auto 1fr auto!important;gap:6px!important;align-items:center!important;border:1px solid #79dfec2c!important;border-radius:8px!important;color:#c5f5f8!important;background:#071a2b88!important}.evolution-hud span,.evolution-hud small{font-size:6px!important}.evolution-hud i{height:4px;overflow:hidden;border-radius:9px;background:#ffffff15}.evolution-hud em{display:block;width:0;height:100%;border-radius:9px;background:linear-gradient(90deg,#5cdbe9,#a87cf1,#ffe36e);transition:width .35s}.evolution-hud.ready{border-color:#ffe17488!important;box-shadow:0 0 12px #ffd75c44}.project-dialog #eraProjectRequirements{display:grid;gap:7px}.project-requirement{padding:8px;display:grid;grid-template-columns:42px 1fr auto;gap:8px;align-items:center;border:1px solid #ffffff18;border-radius:12px;background:#ffffff0c}.project-requirement .item{width:38px;height:38px}.project-requirement div{display:grid}.project-requirement b{font-size:9px}.project-requirement small{font-size:7px;color:#9fb9ca}.project-requirement button{padding:6px 8px;border:0;border-radius:8px;background:#65d978;color:#15391b;font-size:7px;font-weight:800}.project-dialog #claimProjectReward{width:100%;margin-top:10px;padding:10px;border:0;border-radius:11px;background:linear-gradient(#ffe982,#dca33a);font-weight:800}.evolution-choices,.specialization-dialog #specializationChoices{display:grid;gap:8px}.evolution-choices button,.specialization-choice{padding:12px;display:grid;gap:3px;border:1px solid #75dce944;border-radius:13px;color:#fff;background:linear-gradient(120deg,#173c55,#282548);text-align:left;font-weight:800}.evolution-choices small,.specialization-choice small{color:#a8c2d2;font-size:8px}.generator-specialization{position:absolute;left:3px;top:3px;z-index:8;padding:2px 4px;border-radius:6px;background:#0e2338cc;color:#8ee8f2;font-size:5px}

/* v5.1 progression clarity and independent controls */
:root,button,input,dialog{font-family:'Sarabun','Segoe UI',Tahoma,sans-serif!important}.brand-orbit h1{font-family:'Sarabun','Segoe UI',Tahoma,sans-serif!important;font-weight:800!important}.command-head{grid-template-columns:minmax(0,1fr) auto!important;column-gap:14px!important;overflow:visible!important}.brand-orbit{min-width:0!important}.brand-orbit>div{min-width:0}.head-actions{position:relative!important;z-index:20!important;display:grid!important;grid-template-columns:repeat(2,64px)!important;gap:10px!important;align-items:start!important}.head-actions .head-action{position:relative!important;width:64px!important;height:58px!important;padding:7px 5px 5px!important;display:grid!important;grid-template-rows:1fr auto!important;place-items:center!important;border:1px solid #a7c7ef2d!important;border-radius:16px!important;background:linear-gradient(145deg,#253a5b,#1b2c4b)!important;color:#fff!important;box-shadow:inset 0 1px #ffffff22,0 7px 15px #07132155!important;pointer-events:auto!important;overflow:visible!important}.head-actions .head-action i{font-size:20px!important;font-style:normal!important;line-height:1!important}.head-actions .head-action small{font-size:8px!important;color:#c4d5e7!important;line-height:1!important}.head-actions #eraProjectButton span{position:absolute!important;right:-5px!important;top:-6px!important;padding:3px 5px!important;border-radius:9px!important;background:#08253b!important;color:#68edf5!important;font-size:7px!important;z-index:3!important}.head-actions .project-action:hover,.head-actions .map-action:hover{transform:translateY(-1px);border-color:#70e0ec66!important}.mission-panel{max-height:none!important;padding:9px 11px!important;gap:8px!important;border-radius:16px!important}.mission-heading{height:auto!important;min-height:28px!important;display:flex!important;align-items:center!important}.mission-heading>div{display:grid!important;gap:2px}.mission-heading small{display:block!important;color:#7bdfe9!important;font-size:8px!important}.mission-heading b{font-size:12px!important;line-height:1.2!important}.mission-difficulty{flex:none;padding:4px 8px;border:1px solid #ffffff18;border-radius:99px;background:#0a1e31aa;color:#ffd96f;font-size:8px;font-weight:700}.mission-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important}.mission-check{height:auto!important;min-height:34px!important;padding:6px 8px!important;display:grid!important;grid-template-columns:18px minmax(0,1fr) auto!important;grid-template-rows:1fr!important;column-gap:6px!important;border-radius:10px!important}.mission-check i{grid-row:auto!important;width:18px!important;height:18px!important;font-size:8px!important}.mission-check b{display:block!important;font-size:8px!important;line-height:1.2!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.mission-check em{justify-self:end!important;font-size:8px!important;font-weight:700!important}.mission-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:6px;border-top:1px solid #ffffff12}.mission-footer>small{min-width:0;color:#a9bfce;font-size:8px;line-height:1.25}.mission-footer #claimLevel{position:static!important;flex:none!important;min-width:135px!important;height:34px!important;padding:6px 12px!important;border-radius:10px!important;font-size:9px!important}.mission-footer #claimLevel:not(:disabled){box-shadow:0 0 14px #68dd7466}.project-reward-summary{margin:8px 0 10px;padding:9px 11px;display:grid;gap:3px;border:1px solid #ffe27b3d;border-radius:11px;background:linear-gradient(110deg,#7d602521,#ffdf6830)}.project-reward-summary b{color:#ffe581;font-size:9px}.project-reward-summary span{font-size:8px;color:#ecf7ff}.project-help{margin:9px 0 0!important;padding:7px 9px;border-radius:9px;background:#0a1c2e99;color:#9fdde4!important;font-size:8px!important;line-height:1.4}.project-requirement button:disabled{opacity:.65!important;cursor:not-allowed}.project-dialog #claimProjectReward:disabled{filter:grayscale(.7);opacity:.55}.game.compact-layout .head-actions{grid-template-columns:repeat(2,54px)!important;gap:7px!important}.game.compact-layout .head-actions .head-action{width:54px!important;height:48px!important;border-radius:13px!important}.game.compact-layout .head-actions .head-action small{font-size:7px!important}.game.compact-layout .mission-panel{max-height:none!important;padding:6px 8px!important}.game.compact-layout .mission-grid{gap:4px!important}.game.compact-layout .mission-check{min-height:28px!important;padding:4px 6px!important}.game.compact-layout .mission-footer #claimLevel{height:29px!important;min-width:118px!important}.game.micro-layout .head-actions{grid-template-columns:repeat(2,46px)!important}.game.micro-layout .head-actions .head-action{width:46px!important;height:42px!important}.game.micro-layout .head-actions .head-action small{display:none!important}.game.micro-layout .mission-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.game.micro-layout .mission-footer>small{display:none}.game.micro-layout .mission-footer #claimLevel{width:100%!important;min-width:0!important}@media(max-width:380px){.head-actions{grid-template-columns:repeat(2,50px)!important;gap:6px!important}.head-actions .head-action{width:50px!important;height:48px!important}.brand-orbit>span{display:none}.mission-grid{grid-template-columns:1fr!important}.mission-footer{align-items:stretch;flex-direction:column}.mission-footer #claimLevel{width:100%!important}}
.item.asset-missing>.symbol{opacity:1!important}.item.asset-missing{background:radial-gradient(circle,#ffffff20,var(--c,#4fa)55%,#0000 72%)}
#unlockNext.visible{display:block!important}.mission-footer #claimLevel.level-clear{position:relative!important;color:#fff!important;background:linear-gradient(135deg,#2d455e,#172a40)!important;border:1px solid #7fdbe755!important;letter-spacing:.16em!important;text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:#ff6c6c;cursor:not-allowed;opacity:1!important}.mission-footer #claimLevel.level-clear::after{content:'ปลดล็อกด่านถัดไป';position:absolute;left:50%;bottom:-15px;transform:translateX(-50%);width:max-content;color:#86dce5;font-size:6px;letter-spacing:0;text-decoration:none}.mission-footer:has(#claimLevel.level-clear){padding-bottom:12px}

/* ChronoMerge v5.3: top navigation, era themes, transactional rewards */
:root{--era-a:#49d5ec;--era-b:#6f63df;--era-c:#ffd46c;--era-cell-a:#d9e5ef;--era-cell-b:#bacbd9;--era-board:#16354e;--era-glow:#5cdef06b}
html,body{background:radial-gradient(circle at 18% 8%,color-mix(in srgb,var(--era-a) 42%,transparent),transparent 31%),linear-gradient(145deg,#0b2138,color-mix(in srgb,var(--era-b) 28%,#171d3d))!important;transition:background .6s ease}
.game{grid-template-rows:auto auto auto minmax(0,1fr)!important;padding-bottom:8px!important}
#bottomNav,nav{display:none!important}
.command-head{border-color:color-mix(in srgb,var(--era-a) 32%,transparent)!important;background:radial-gradient(circle at 14% 5%,color-mix(in srgb,var(--era-a) 26%,transparent),transparent 30%),linear-gradient(145deg,#17354f,color-mix(in srgb,var(--era-b) 28%,#172640))!important;box-shadow:inset 0 1px #ffffff20,0 9px 25px color-mix(in srgb,var(--era-glow) 52%,#0005)!important;transition:background .55s,border-color .55s,box-shadow .55s}
.command-head::after{border-color:color-mix(in srgb,var(--era-a) 28%,transparent)!important;box-shadow:0 0 48px color-mix(in srgb,var(--era-glow) 42%,transparent)!important}
.head-actions.top-menu{display:grid!important;grid-template-columns:repeat(3,48px)!important;gap:6px!important;max-width:156px!important;align-content:start!important}
.head-actions.top-menu .head-action{width:48px!important;height:46px!important;padding:5px 3px 4px!important;border-radius:12px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--era-a) 13%,#243553),color-mix(in srgb,var(--era-b) 15%,#172940))!important;border-color:color-mix(in srgb,var(--era-a) 24%,#ffffff18)!important;box-shadow:inset 0 1px #ffffff1b,0 4px 10px #07132144!important}
.head-actions.top-menu .head-action i{font-size:16px!important}.head-actions.top-menu .head-action small{display:block!important;font-size:6px!important;color:#d1dfec!important}.head-actions.top-menu .head-action:active{transform:scale(.93)}
.head-actions.top-menu #eraProjectButton span{right:-3px!important;top:-5px!important;font-size:6px!important;background:color-mix(in srgb,var(--era-board) 88%,#000)!important;color:var(--era-a)!important}
.evolution-hud em{background:linear-gradient(90deg,var(--era-a),var(--era-b),var(--era-c))!important;box-shadow:0 0 8px var(--era-glow)!important}
.board-wrap{border-color:color-mix(in srgb,var(--era-c) 68%,var(--era-b))!important;background:linear-gradient(155deg,color-mix(in srgb,var(--era-c) 75%,#fff),color-mix(in srgb,var(--era-b) 65%,#17223b))!important;box-shadow:0 10px 30px color-mix(in srgb,var(--era-glow) 42%,#0006),inset 0 1px #ffffff55!important;transition:background .6s,border-color .6s,box-shadow .6s}
#board{background:color-mix(in srgb,var(--era-board) 60%,#c8ad9f)!important}.cell{background:var(--era-cell-a)!important;transition:background .5s}.cell:nth-child(12n+1),.cell:nth-child(12n+3),.cell:nth-child(12n+5),.cell:nth-child(12n+8),.cell:nth-child(12n+10),.cell:nth-child(12n+12){background:var(--era-cell-b)!important}
.game.era-matter{--era-a:#4ddff1;--era-b:#7468ec;--era-c:#ffc95f;--era-cell-a:#dce7ef;--era-cell-b:#b9cad8;--era-board:#19364d;--era-glow:#50dff06b}
.game.era-life{--era-a:#5ce5c0;--era-b:#368cb5;--era-c:#8de779;--era-cell-a:#d8e8df;--era-cell-b:#b7d1c4;--era-board:#174940;--era-glow:#4ee3ae66}
.game.era-nature{--era-a:#91dc62;--era-b:#8da341;--era-c:#e0b65a;--era-cell-a:#e1e8cc;--era-cell-b:#c2d0a9;--era-board:#36512d;--era-glow:#88d75761}
.game.era-human{--era-a:#ef9b52;--era-b:#ad5b42;--era-c:#ffd078;--era-cell-a:#ead9ca;--era-cell-b:#cdb7a4;--era-board:#5a372c;--era-glow:#ef884f61}
.game.era-civilization{--era-a:#66d9ec;--era-b:#8b62e5;--era-c:#f4d86c;--era-cell-a:#dce4ef;--era-cell-b:#bac5d7;--era-board:#252c55;--era-glow:#8569e867}
.mission-footer #claimLevel.level-clear{pointer-events:none!important}.mission-footer #claimLevel.reward-pending{pointer-events:none!important;opacity:.7!important}
@media(max-width:460px){.command-head{grid-template-columns:minmax(0,1fr) 102px!important}.head-actions.top-menu{grid-template-columns:repeat(2,48px)!important;max-width:102px!important}.head-actions.top-menu .head-action{width:48px!important;height:42px!important}.head-actions.top-menu .head-action small{font-size:5.5px!important}}
@media(max-height:650px){.head-actions.top-menu .head-action{height:38px!important}.head-actions.top-menu .head-action small{display:none!important}.head-actions.top-menu{gap:4px!important}.command-head{padding:6px!important}}

/* v5.7 glass-fluid generator gauge, tactile controls and event moments */
.item.has{background:transparent!important;box-shadow:none!important}.item.has>img{display:block!important;visibility:visible!important;opacity:1!important;z-index:2!important}.item.has>.symbol{opacity:0!important;visibility:hidden!important}.inventory-list article>.inventory-item{position:relative!important;width:46px!important;height:46px!important;display:grid!important;place-items:center!important}.inventory-list article>.inventory-item img{position:absolute!important;inset:-8%!important;width:116%!important;height:116%!important;object-fit:contain!important}.inventory-list article>.inventory-item.has img{opacity:1!important;visibility:visible!important}.captive>.item.has img,.generator>.item.has img{opacity:1!important;visibility:visible!important;filter:none!important}
button{transform-origin:center;will-change:transform,filter;transition:transform 110ms cubic-bezier(.2,.8,.2,1),filter 130ms,box-shadow 130ms}button.ui-press:not(:disabled){transform:translateY(2px) scale(.94)!important;filter:brightness(.9) saturate(1.08)!important;box-shadow:inset 0 3px 7px #0005!important}button.ui-release:not(:disabled){animation:uiButtonRelease 210ms cubic-bezier(.18,.9,.28,1.35)!important}@keyframes uiButtonRelease{0%{transform:translateY(2px) scale(.94)}55%{transform:translateY(-1px) scale(1.045)}100%{transform:none}}
.generator.generator-tap .item,.generator.generator-tap-active .item{animation:generatorTapBounce 260ms cubic-bezier(.18,.9,.28,1.45)!important}@keyframes generatorTapBounce{0%{transform:none}28%{transform:translateY(3px) scale(.88,.82)}62%{transform:translateY(-5px) scale(1.09,.98)}100%{transform:none}}
/* Glass tube keeps current cyan-green palette */
.gauge{position:absolute!important;z-index:9!important;left:9%!important;right:9%!important;bottom:4px!important;height:8px!important;padding:1px!important;overflow:hidden!important;border:1px solid #dffcff9c!important;border-radius:999px!important;background:linear-gradient(180deg,#f4ffff32 0 24%,#071b2cdd 28% 100%)!important;box-shadow:inset 0 1px 1px #fff9,inset 0 -2px 4px #00101dcc,0 1px 4px #00121dcc,0 0 7px #44dfe24f!important;isolation:isolate!important}.gauge::before{content:'';position:absolute;z-index:5;left:7%;right:7%;top:1px;height:2px;border-radius:99px;background:linear-gradient(90deg,#fff0,#fff9 25%,#fff4 72%,#fff0);pointer-events:none}.gauge::after{content:'';position:absolute;z-index:4;inset:1px;border-radius:99px;box-shadow:inset 0 0 2px #fff8;pointer-events:none}.gauge em{position:relative!important;display:block!important;height:100%!important;border-radius:999px!important;background:linear-gradient(90deg,#39dcec 0%,#48e6cf 52%,#8dea67 100%)!important;box-shadow:0 0 5px #4de5db,0 0 9px #6fe78999,inset 0 1px #eaffd4aa!important;transition:width 430ms cubic-bezier(.12,.78,.18,1.08)!important;overflow:hidden!important;transform-origin:left center}.gauge em::before,.gauge em::after{content:'';position:absolute;pointer-events:none}.gauge em::before{left:-25%;top:-85%;width:150%;height:180%;border-radius:45%;background:radial-gradient(ellipse at 50% 100%,#efffffad 0 8%,#ffffff20 28%,transparent 55%);animation:gaugeLiquidDrift 2.2s ease-in-out infinite alternate}.gauge em::after{right:-5px;top:-2px;width:13px;height:9px;border-radius:50%;background:#a7ff9b;filter:blur(2px);opacity:.7}.gauge.gauge-momentum em{animation:gaugeMomentum 720ms cubic-bezier(.12,.82,.16,1) both}.gauge.gauge-momentum em::before{animation:gaugeSurge 720ms cubic-bezier(.16,.78,.2,1) both}.gauge.gauge-momentum em::after{animation:gaugeBrakeBubble 720ms ease-out both}@keyframes gaugeLiquidDrift{0%{transform:translateX(-4%) rotate(-1deg)}100%{transform:translateX(8%) rotate(1.5deg)}}@keyframes gaugeMomentum{0%{transform:scaleX(.94) skewX(-4deg)}42%{transform:scaleX(1.035) skewX(3deg)}68%{transform:scaleX(.992) skewX(-1deg)}100%{transform:none}}@keyframes gaugeSurge{0%{transform:translateX(-35%) scaleX(.72);opacity:.2}42%{transform:translateX(20%) scaleX(1.12);opacity:.9}70%{transform:translateX(5%) scaleX(.96);opacity:.6}100%{transform:translateX(0);opacity:.45}}@keyframes gaugeBrakeBubble{0%{transform:translateX(-12px) scale(.6);opacity:0}42%{transform:translateX(7px) scale(1.3);opacity:1}68%{transform:translateX(-2px) scale(.9);opacity:.75}100%{transform:none;opacity:.65}}
/* Merge overlap and white morph */
#board{position:relative!important}.merge-morph-layer{position:absolute;inset:0;z-index:80;pointer-events:none;overflow:visible}.merge-morph-layer .merge-ghost{position:absolute!important;width:54px!important;height:54px!important;margin:0!important;translate:-50% -50%;animation:mergeGhostConverge 165ms cubic-bezier(.2,.75,.25,1) forwards!important}.merge-ghost-b{animation-delay:18ms!important}.merge-ghost img{opacity:.88!important;filter:drop-shadow(0 0 5px #fff8)!important}.merge-morph-layer::after{content:'';position:absolute;left:var(--merge-x);top:var(--merge-y);width:54px;height:54px;translate:-50% -50%;border-radius:50%;background:#fff;opacity:0;box-shadow:0 0 14px #fff,0 0 28px #fff;animation:mergeWhiteBloom 330ms ease-out forwards}.merge-result-reveal>.item{animation:mergeResultReveal 210ms cubic-bezier(.18,.86,.25,1.25)!important}@keyframes mergeGhostConverge{0%{opacity:.9;transform:scale(1);filter:blur(0)}70%{left:var(--merge-x);top:var(--merge-y);opacity:.75;transform:scale(.9);filter:blur(2px) brightness(1.6)}100%{left:var(--merge-x);top:var(--merge-y);opacity:0;transform:scale(.72);filter:blur(6px) brightness(3)}}@keyframes mergeWhiteBloom{0%,22%{opacity:0;transform:scale(.35);filter:blur(8px)}45%{opacity:.96;transform:scale(.92);filter:blur(3px)}68%{opacity:.74;transform:scale(1.08);filter:blur(6px)}100%{opacity:0;transform:scale(1.34);filter:blur(12px)}}@keyframes mergeResultReveal{0%{opacity:0;transform:scale(.45);filter:blur(7px) brightness(2.6)}55%{opacity:1;transform:scale(1.12);filter:blur(0) brightness(1.25)}100%{opacity:1;transform:none;filter:none}}
/* Jackpot-style contextual announcement after dialogs close */
.jackpot-moment{position:fixed;z-index:30000;inset:0;display:grid;place-items:center;pointer-events:none;opacity:0;transition:opacity .18s;background:radial-gradient(circle,#08182cd1 0 20%,#030816bb 46%,transparent 75%)}.jackpot-moment.show{opacity:1}.jackpot-moment.leave{opacity:0;transition-duration:.35s}.jackpot-rays{position:absolute;width:min(76vw,430px);aspect-ratio:1;border-radius:50%;background:repeating-conic-gradient(from 0deg,#fff0 0 8deg,#ffe58334 9deg 13deg,#fff0 14deg 23deg);animation:jackpotSpin 7s linear infinite}.jackpot-card{position:relative;min-width:min(82vw,390px);padding:22px 28px 24px;display:grid;gap:5px;text-align:center;border:1px solid #ffe9898a;border-radius:24px;background:linear-gradient(145deg,#143654f2,#27224ff2);box-shadow:inset 0 1px #ffffff42,0 18px 55px #000a,0 0 34px #ffe47855;animation:jackpotPop 1.65s cubic-bezier(.16,.86,.2,1) both}.jackpot-card small{color:#77e7f2;font-size:10px;font-weight:800;letter-spacing:.18em}.jackpot-card strong{color:#fff3a0;font-size:clamp(28px,8vw,54px);line-height:1;text-shadow:0 4px #9e6218,0 0 24px #ffe36e}.jackpot-card span{color:#d5e3ef;font-size:11px}.tone-cyan .jackpot-card{border-color:#71e8f09c;box-shadow:inset 0 1px #ffffff42,0 18px 55px #000a,0 0 36px #5de8ef66}.tone-cyan .jackpot-card strong{color:#bdfaff;text-shadow:0 4px #24758a,0 0 24px #66eff5}.tone-violet .jackpot-card{border-color:#b98cf5a3}.tone-violet .jackpot-card strong{color:#e6d2ff;text-shadow:0 4px #65419e,0 0 24px #b576ff}@keyframes jackpotSpin{to{transform:rotate(360deg)}}@keyframes jackpotPop{0%{opacity:0;transform:scale(.35) rotate(-3deg)}28%{opacity:1;transform:scale(1.12) rotate(1deg)}48%{transform:scale(.96)}68%,88%{transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.gauge em::before,.gauge.gauge-momentum em,.gauge.gauge-momentum em::after,.jackpot-rays,.jackpot-card,button.ui-release,.generator.generator-tap .item{animation:none!important}}

/* v5.8 persistent progression, liquid evolution and local order celebration */
/* Keep the classic orange board; Era only changes the world behind it. */
.board-wrap{border-color:#ad591f!important;background:linear-gradient(#ffc25c,#db7d1e)!important;box-shadow:0 10px 30px var(--era-glow),inset 0 1px #fff7!important}#board{background:#c8ad9f!important}.cell{background:#ead9cd!important}.cell:nth-child(12n+1),.cell:nth-child(12n+3),.cell:nth-child(12n+5),.cell:nth-child(12n+8),.cell:nth-child(12n+10),.cell:nth-child(12n+12){background:#d8c2b5!important}
/* Evolution glass tube and liquid */
.evolution-hud{position:relative!important;height:23px!important;padding:3px 6px!important;overflow:visible!important;border:1px solid #dffcff77!important;background:linear-gradient(180deg,#eaffff1f 0 26%,#07192ad9 30% 100%)!important;box-shadow:inset 0 1px 1px #fff8,inset 0 -2px 5px #0009,0 0 9px var(--era-glow)!important}.evolution-hud>i{position:relative;height:7px!important;padding:1px;overflow:hidden!important;border:1px solid #edffff66;border-radius:999px;background:#061625dd!important;box-shadow:inset 0 1px #fff5,inset 0 -2px 4px #000b}.evolution-hud>i::after{content:'';position:absolute;z-index:4;left:7%;right:7%;top:1px;height:2px;border-radius:99px;background:linear-gradient(90deg,#fff0,#fff9 28%,#fff3 76%,#fff0)}.evolution-hud em{position:relative!important;height:100%!important;overflow:hidden;border-radius:99px!important;background:linear-gradient(90deg,#47dbea,#9677ee 57%,#ffe36e)!important;box-shadow:0 0 6px #74eaf2,0 0 10px #a67cff88,inset 0 1px #fff9!important;transition:width 470ms cubic-bezier(.12,.8,.18,1.08)!important;transform-origin:left center}.evolution-hud em::before,.evolution-hud em::after{content:'';position:absolute;pointer-events:none}.evolution-hud em::before{left:-25%;top:-100%;width:150%;height:190%;border-radius:45%;background:radial-gradient(ellipse at 50% 100%,#ffffffb0 0 7%,#ffffff25 27%,transparent 56%);animation:evolutionLiquidDrift 2.5s ease-in-out infinite alternate}.evolution-hud em::after{right:-5px;top:-2px;width:14px;height:10px;border-radius:50%;background:#fff5a5;filter:blur(2px);opacity:.65}.evolution-hud.evolution-momentum em{animation:evolutionMomentum 760ms cubic-bezier(.12,.82,.16,1) both}.evolution-hud.evolution-momentum em::before{animation:evolutionSurge 760ms cubic-bezier(.16,.78,.2,1) both}.evolution-hud.evolution-momentum em::after{animation:evolutionBrake 760ms ease-out both}@keyframes evolutionLiquidDrift{from{transform:translateX(-5%) rotate(-1deg)}to{transform:translateX(9%) rotate(1.4deg)}}@keyframes evolutionMomentum{0%{transform:scaleX(.94) skewX(-4deg)}43%{transform:scaleX(1.04) skewX(3deg)}68%{transform:scaleX(.992) skewX(-1deg)}100%{transform:none}}@keyframes evolutionSurge{0%{transform:translateX(-38%) scaleX(.7);opacity:.2}44%{transform:translateX(22%) scaleX(1.12);opacity:1}72%{transform:translateX(4%) scaleX(.96);opacity:.6}100%{transform:none;opacity:.45}}@keyframes evolutionBrake{0%{transform:translateX(-12px) scale(.6);opacity:0}44%{transform:translateX(8px) scale(1.35);opacity:1}70%{transform:translateX(-2px) scale(.9)}100%{transform:none;opacity:.68}}
/* Strong guidance after a project reward or whenever a choice is ready. */
.evolution-hud.ready,.evolution-hud.evolution-guide{z-index:35;animation:evolutionReadyBreath 1.05s ease-in-out infinite!important;border-color:#fff08dbb!important;box-shadow:0 0 10px #ffe86c,0 0 24px #bc7cffaa,inset 0 1px #fff!important}.evolution-hud.ready::before,.evolution-hud.evolution-guide::before{content:'แตะเพื่อเลือกพลัง';position:absolute;right:1px;bottom:calc(100% + 4px);padding:3px 7px;border-radius:99px;background:#ffe778;color:#382812;font-size:7px;font-weight:900;white-space:nowrap;box-shadow:0 0 10px #ffe36e;animation:evolutionGuideFloat .8s ease-in-out infinite alternate}.evolution-hud.ready::after,.evolution-hud.evolution-guide::after{content:'✦';position:absolute;right:12%;top:-10px;color:#fff18b;font-size:12px;text-shadow:0 0 8px #fff,0 0 14px #b879ff;animation:evolutionSpark .65s ease-in-out infinite alternate}@keyframes evolutionReadyBreath{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.018,1.12);filter:brightness(1.35)}}@keyframes evolutionGuideFloat{from{transform:translateY(1px) scale(.98)}to{transform:translateY(-3px) scale(1.04)}}@keyframes evolutionSpark{from{opacity:.35;transform:rotate(-12deg) scale(.7)}to{opacity:1;transform:rotate(15deg) scale(1.35)}}
/* Research-order praise bursts from the completed order itself. */
.order-praise{position:fixed;z-index:24000;translate:-50% -50%;width:1px;height:1px;pointer-events:none}.order-praise strong{position:absolute;left:0;top:0;translate:-50% -50%;color:#fff195;font-family:Arial,sans-serif;font-size:clamp(24px,7vw,40px);font-weight:1000;font-style:italic;letter-spacing:.02em;white-space:nowrap;text-shadow:0 3px #9c5910,0 0 7px #fff,0 0 18px #ffc838;animation:orderPraiseText .86s cubic-bezier(.12,.84,.2,1) both}.order-praise small{position:absolute;left:0;top:26px;translate:-50% 0;color:#fff4bd;font-size:9px;font-weight:800;white-space:nowrap;text-shadow:0 2px 4px #000;animation:orderPraiseDetail .8s ease-out both}.order-praise i{position:absolute;left:0;top:0;width:7px;height:7px;border-radius:50%;background:#ffe56d;box-shadow:0 0 8px #fff,0 0 13px #ffc427;animation:orderFirework .72s ease-out both}.order-praise i:nth-of-type(1){--x:52px;--y:-31px}.order-praise i:nth-of-type(2){--x:22px;--y:-54px}.order-praise i:nth-of-type(3){--x:-28px;--y:-49px}.order-praise i:nth-of-type(4){--x:-57px;--y:-16px}.order-praise i:nth-of-type(5){--x:-48px;--y:31px}.order-praise i:nth-of-type(6){--x:-8px;--y:51px}.order-praise i:nth-of-type(7){--x:39px;--y:43px}.order-praise i:nth-of-type(8){--x:61px;--y:6px}@keyframes orderPraiseText{0%{opacity:0;transform:translateY(12px) scale(.28) rotate(-7deg)}34%{opacity:1;transform:translateY(-18px) scale(1.18) rotate(2deg)}62%{transform:translateY(-23px) scale(.96)}100%{opacity:0;transform:translateY(-46px) scale(1.05)}}@keyframes orderPraiseDetail{0%,20%{opacity:0;transform:translateY(5px)}45%{opacity:1;transform:translateY(-7px)}100%{opacity:0;transform:translateY(-24px)}}@keyframes orderFirework{0%{opacity:1;transform:translate(0,0) scale(.4)}60%{opacity:1;transform:translate(var(--x),var(--y)) scale(1)}100%{opacity:0;transform:translate(calc(var(--x)*1.2),calc(var(--y)*1.2)) scale(.1)}}
@media(prefers-reduced-motion:reduce){.evolution-hud em::before,.evolution-hud.evolution-momentum em,.evolution-hud.ready,.evolution-hud.evolution-guide,.order-praise strong,.order-praise small,.order-praise i{animation:none!important}}

/* v6.0 7x9 board and reference-inspired command header */
.game{width:min(100vw,620px)!important;grid-template-rows:auto auto auto minmax(0,1fr)!important;padding:6px!important;gap:5px!important}.command-head.resource-command-head{padding:7px 8px!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important;gap:6px!important;border-radius:17px!important;overflow:visible!important}.compact-brand{display:none!important}.command-head .res{grid-column:1!important;grid-row:1!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}.command-head .res>.resource-capsule{position:relative!important;height:38px!important;min-width:0!important;padding:4px 7px 4px 30px!important;display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid #f3d9ac88!important;border-radius:999px!important;background:linear-gradient(180deg,#fff7e3,#e7d4bd)!important;color:#60452f!important;box-shadow:inset 0 2px #fff,inset 0 -3px 6px #9d765b26,0 3px 8px #07132150!important}.command-head .res>.resource-capsule>span:first-child{position:absolute;left:-2px;top:50%;translate:0 -50%;width:33px;height:33px;display:grid;place-items:center;font-size:22px;filter:drop-shadow(0 2px 2px #0004)}.command-head .res>.resource-capsule>b{font-size:13px!important;font-weight:800!important;font-variant-numeric:tabular-nums;white-space:nowrap}.command-head .res>.level-capsule{padding-left:37px!important}.level-capsule>div{width:100%;display:grid!important;grid-template-columns:auto 1fr;align-items:center;gap:3px}.level-capsule small{display:none}.level-capsule strong{font-size:13px;font-weight:900}.level-star{left:-3px!important;width:38px!important;height:38px!important;color:#d8e95a;font-size:36px!important;text-shadow:0 2px #708220,0 0 5px #fff}.level-star b{position:absolute;inset:0;display:grid;place-items:center;color:#44521c;font-size:11px;text-shadow:none}.level-progress{height:10px;overflow:hidden;border:2px solid #94aa3b;border-radius:999px;background:#e6edbd;box-shadow:inset 0 1px 3px #70882255}.level-progress em{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(#dafa75,#91bd28);box-shadow:inset 0 1px #fff8;transition:width .35s}.command-head .res>#dev{display:none!important}
.head-actions.single-row-menu{grid-column:1!important;grid-row:2!important;width:100%!important;max-width:none!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px!important}.head-actions.single-row-menu .head-action{width:100%!important;height:36px!important;min-width:0!important;padding:3px 2px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;border-radius:10px!important}.head-actions.single-row-menu .head-action i{font-size:14px!important}.head-actions.single-row-menu .head-action small{font-size:6px!important}.evolution-hud{grid-column:1!important;grid-row:3!important;height:38px!important;padding:5px 7px!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:7px!important;border-radius:13px!important}.evolution-hud>span{font-size:9px!important;font-weight:500!important;white-space:nowrap}.evolution-hud>span b{font-size:15px!important;font-weight:900!important;margin-left:3px}.evolution-hud>small{font-size:7px!important;font-weight:800!important}.evolution-hud>i{height:16px!important;padding:2px!important;border-radius:999px!important}.evolution-hud em{background-size:260% 100%!important}.evolution-hud[data-progress="flow"] em,.evolution-hud[data-progress="glow"] em,.evolution-hud[data-progress="breathing"] em,.evolution-hud[data-progress="critical"] em{background:linear-gradient(90deg,#47dbea,#6e8bf4,#b972f1,#ffe56f,#58efbc,#47dbea)!important;background-size:260% 100%!important;animation:evolutionGradient var(--evo-speed,2s) linear infinite}.evolution-hud[data-progress="glow"]{box-shadow:0 0 9px #7beefa55,inset 0 1px #fff7!important}.evolution-hud[data-progress="breathing"]{animation:evoPercentBreath 1.35s ease-in-out infinite}.evolution-hud[data-progress="critical"]{background:linear-gradient(90deg,#050711,#221338,#10253c,#050711)!important;border-color:#ffe46b99!important;box-shadow:0 0 13px #ffe56d88,0 0 24px #b973ff55!important;animation:evoCriticalBreath .9s ease-in-out infinite}.evolution-hud[data-progress="critical"] em{background:linear-gradient(90deg,#ff5858,#ffda58,#63ef8f,#55dff5,#9271ff,#ff65ce,#ff5858)!important;background-size:300% 100%!important}.evolution-hud.evo-level-up{animation:evoGaugeQuake 1.05s cubic-bezier(.16,.8,.25,1)!important}.evolution-hud.evo-level-up em{animation:evoRainbowReverse .7s linear reverse!important;background:linear-gradient(90deg,#ff5858,#ffda58,#63ef8f,#55dff5,#9271ff,#ff65ce,#ff5858)!important;background-size:300% 100%!important}.evolution-hud.evo-level-up::before{content:'';position:absolute;inset:-4px;border-radius:16px;background:#fff;opacity:0;pointer-events:none;animation:evoFlash .7s ease-out}.order-praise strong{font-family:'Sarabun','Segoe UI',sans-serif!important}
#board{width:100%;height:100%;aspect-ratio:7/9!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-template-rows:repeat(9,minmax(0,1fr))!important;gap:3px!important;padding:4px!important}.board-wrap #board{aspect-ratio:7/9!important}.cell{aspect-ratio:auto!important;border-radius:8px!important}.cell:nth-child(14n+1),.cell:nth-child(14n+3),.cell:nth-child(14n+5),.cell:nth-child(14n+7),.cell:nth-child(14n+9),.cell:nth-child(14n+11),.cell:nth-child(14n+13),.cell:nth-child(14n+16),.cell:nth-child(14n+18),.cell:nth-child(14n+20),.cell:nth-child(14n+22),.cell:nth-child(14n+24),.cell:nth-child(14n+26),.cell:nth-child(14n+28){background:#d8c2b5!important}.item{width:82%!important;font-size:clamp(12px,3.2vw,24px)!important}.board-wrap{padding:5px!important}
@keyframes evolutionGradient{to{background-position:-260% 0}}@keyframes evoPercentBreath{0%,100%{transform:scaleY(1);filter:brightness(1)}50%{transform:scaleY(1.08);filter:brightness(1.18)}}@keyframes evoCriticalBreath{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.012,1.12);filter:brightness(1.35)}}@keyframes evoRainbowReverse{to{background-position:300% 0}}@keyframes evoGaugeQuake{0%{transform:none}12%{transform:translateX(-5px) rotate(-.4deg)}22%{transform:translateX(5px) rotate(.4deg)}34%{transform:translateX(-4px)}46%{transform:translateX(4px)}60%{transform:translateX(-2px)}75%{transform:translateX(2px)}100%{transform:none}}@keyframes evoFlash{0%,18%{opacity:0}35%{opacity:.96;box-shadow:0 0 28px #fff,0 0 50px #ffe66b}100%{opacity:0}}
@media(max-width:390px){.command-head .res{gap:3px!important}.command-head .res>.resource-capsule{height:34px!important;padding-left:25px!important;padding-right:3px!important}.command-head .res>.resource-capsule>span:first-child{width:28px;height:28px;font-size:18px}.command-head .res>.resource-capsule>b{font-size:11px!important}.level-star{font-size:31px!important}.head-actions.single-row-menu{gap:3px!important}.head-actions.single-row-menu .head-action{height:32px!important}.evolution-hud{height:34px!important}.evolution-hud>i{height:13px!important}}
@media(max-height:720px){.command-head.resource-command-head{padding:4px 6px!important;gap:3px!important}.command-head .res>.resource-capsule{height:30px!important}.head-actions.single-row-menu .head-action{height:29px!important}.evolution-hud{height:30px!important;padding:3px 6px!important}.evolution-hud>i{height:11px!important}.mission-panel{max-height:58px!important}.orders{height:32px!important;max-height:32px!important}}

/* v6.1 landscape 9x7 board, responsive vertical fit and strict asset containment */
.game{width:min(100vw,760px)!important;height:100dvh!important;max-height:100dvh!important;padding:clamp(4px,1vw,8px)!important;grid-template-rows:auto auto auto minmax(0,1fr)!important;gap:clamp(3px,.7vh,6px)!important}.command-head.resource-command-head{padding:clamp(4px,.8vh,7px)!important;gap:clamp(3px,.65vh,6px)!important}.command-head .res>.resource-capsule{height:clamp(31px,4.6vh,40px)!important}.head-actions.single-row-menu .head-action{height:clamp(29px,4.2vh,37px)!important}.evolution-hud{height:clamp(31px,4.6vh,40px)!important}.mission-panel{max-height:clamp(78px,12vh,132px)!important;overflow:hidden!important}.mission-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mission-check{min-height:clamp(27px,4.4vh,39px)!important;padding:4px 6px!important}.mission-footer{padding-top:3px!important}.orders{height:clamp(32px,4.8vh,41px)!important;max-height:41px!important}.board-wrap{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;padding:clamp(4px,.8vw,7px)!important;display:grid!important;place-items:center!important;overflow:hidden!important;border-radius:18px!important;background:linear-gradient(#ffc25c,#db7d1e)!important}#board{box-sizing:border-box!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;aspect-ratio:9/7!important;grid-template-columns:repeat(9,minmax(0,1fr))!important;grid-template-rows:repeat(7,minmax(0,1fr))!important;gap:clamp(2px,.45vw,4px)!important;padding:clamp(3px,.55vw,5px)!important;background:#bfa99d!important;border-radius:14px!important}.cell{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:1/1!important;overflow:hidden!important;contain:layout paint style!important;border-radius:clamp(5px,.85vw,9px)!important;background:#f0e1d6!important;box-shadow:inset 0 1px #fff,inset 0 -2px 4px #9d74644a!important}.cell:nth-child(18n+2),.cell:nth-child(18n+4),.cell:nth-child(18n+6),.cell:nth-child(18n+8),.cell:nth-child(18n+10),.cell:nth-child(18n+12),.cell:nth-child(18n+14),.cell:nth-child(18n+16),.cell:nth-child(18n+18),.cell:nth-child(18n+19),.cell:nth-child(18n+21),.cell:nth-child(18n+23),.cell:nth-child(18n+25),.cell:nth-child(18n+27),.cell:nth-child(18n+29),.cell:nth-child(18n+31),.cell:nth-child(18n+33),.cell:nth-child(18n+35){background:#c7ad9f!important}.cell>.item{box-sizing:border-box!important;width:84%!important;height:84%!important;max-width:84%!important;max-height:84%!important;overflow:hidden!important;border-radius:30%!important}.cell>.item img{inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}.captive>.item{width:70%!important;height:70%!important}.generator>.item{width:80%!important;height:80%!important}.ghost,.spawn-projectile,.order-delivery-ghost{box-sizing:border-box!important;left:0;top:0;margin:0!important;translate:none!important;transform-origin:center!important;animation:none!important;pointer-events:none!important}.ghost img,.spawn-projectile img,.order-delivery-ghost img{inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}
/* Project button advertises an immediately available contribution. */
#eraProjectButton.project-ready{border-color:#ffe570cc!important;background:linear-gradient(145deg,#32506a,#59451e)!important;box-shadow:0 0 8px #ffe56c,0 0 20px #ffce4f99,inset 0 1px #fff7!important;animation:projectReadyPulse 1.05s ease-in-out infinite!important}#eraProjectButton.project-ready::after{content:'พร้อมส่ง';position:absolute;right:-4px;bottom:-5px;padding:2px 5px;border-radius:99px;background:#ffe56f;color:#493410;font-size:6px;font-weight:900;box-shadow:0 0 8px #ffe675;white-space:nowrap}#eraProjectButton.project-ready i{filter:drop-shadow(0 0 6px #fff29a)}@keyframes projectReadyPulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.045);filter:brightness(1.28)}}
@media(max-width:480px){.game{width:100vw!important}.command-head .res>.resource-capsule{padding-left:26px!important}.command-head .res>.resource-capsule>b{font-size:11px!important}.head-actions.single-row-menu{gap:3px!important}.head-actions.single-row-menu .head-action small{font-size:5.5px!important}.mission-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mission-check:nth-child(n+5){display:none!important}}
@media(max-height:760px){.command-head .res>.resource-capsule{height:30px!important}.head-actions.single-row-menu .head-action{height:27px!important}.evolution-hud{height:29px!important}.mission-panel{max-height:70px!important;padding:4px 6px!important}.mission-heading{min-height:19px!important}.mission-grid{display:flex!important;overflow:hidden!important}.mission-check{height:27px!important;min-height:27px!important;padding:2px 4px!important}.mission-check b{font-size:6px!important}.mission-footer{display:none!important}.orders{height:29px!important;max-height:29px!important}.visual-order{height:25px!important;min-height:25px!important;max-height:25px!important}.visual-order .order-item{width:21px!important;height:21px!important}}

/* v6.2 definitive board geometry: one cell-size source, no inherited row compression */
.board-wrap{align-items:center!important;justify-items:center!important;align-content:center!important;justify-content:center!important;overflow:hidden!important}#board{box-sizing:content-box!important;display:grid!important;align-items:stretch!important;justify-items:stretch!important;align-content:start!important;justify-content:start!important;grid-auto-flow:row!important;gap:var(--board-gap,3px)!important;padding:4px!important;aspect-ratio:auto!important;max-width:calc(100% - 8px)!important;max-height:calc(100% - 8px)!important}.board-wrap #board{aspect-ratio:auto!important}.cell{box-sizing:border-box!important;width:var(--cell-size)!important;height:var(--cell-size)!important;min-width:var(--cell-size)!important;min-height:var(--cell-size)!important;max-width:var(--cell-size)!important;max-height:var(--cell-size)!important;aspect-ratio:1!important;align-self:stretch!important;justify-self:stretch!important;padding:0!important;overflow:hidden!important}.cell>.item{position:relative!important;width:84%!important;height:84%!important;min-width:0!important;min-height:0!important;max-width:84%!important;max-height:84%!important;align-self:center!important;justify-self:center!important;overflow:hidden!important}.cell>.item img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}.cell .gauge{max-width:82%!important}.permanent-lock{overflow:hidden!important}

/* v6.3 layout cleanup: board fills orange playfield; mission/header no overflow */
html,body{min-height:100%;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important}.game{width:min(100vw,900px)!important;height:auto!important;min-height:100dvh!important;max-height:none!important;margin:0 auto!important;grid-template-rows:auto auto auto auto!important;align-content:start!important;overflow:visible!important}.command-head.resource-command-head{overflow:hidden!important}.command-head .res{padding-left:8px!important}.command-head .res>.level-capsule{overflow:visible!important;padding-left:43px!important}.level-star{left:2px!important;top:50%!important;translate:0 -50%!important;width:40px!important;height:40px!important;display:grid!important;place-items:center!important;line-height:1!important}.level-star b{position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;padding:0!important;margin:0!important;transform:translateY(-.5px)!important;color:#3f521c!important;font-size:11px!important;font-weight:900!important;line-height:1!important}.level-capsule>div{display:grid!important;grid-template-columns:auto minmax(44px,1fr)!important;gap:7px!important}.level-prefix{display:block!important;color:#fff!important;font-size:11px!important;font-weight:900!important;line-height:1!important;-webkit-text-stroke:.45px #775a3b;text-shadow:0 1px #775a3b,0 0 2px #fff}.level-progress{width:100%!important;align-self:center!important}.mission-panel{box-sizing:border-box!important;height:auto!important;min-height:0!important;max-height:none!important;padding:10px 12px!important;gap:8px!important;overflow:hidden!important}.mission-heading{height:auto!important;min-height:24px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important}.mission-heading #questName{font-size:14px!important;font-weight:900!important;line-height:1!important}.mission-difficulty,.mission-heading small{display:none!important}.mission-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;overflow:visible!important}.mission-check{height:auto!important;min-height:42px!important;padding:7px 9px!important;grid-template-columns:20px minmax(0,1fr) auto!important;grid-template-rows:1fr!important}.mission-check i{grid-row:auto!important;width:20px!important;height:20px!important}.mission-check b{font-size:8px!important;white-space:normal!important;line-height:1.15!important}.mission-check em{font-size:8px!important}.mission-footer{box-sizing:border-box!important;display:flex!important;min-height:38px!important;padding-top:7px!important;overflow:visible!important}.orders{flex:none!important}.board-wrap{box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;padding:clamp(8px,1.5vw,14px)!important;display:grid!important;place-items:center!important;overflow:hidden!important;border-radius:22px!important;background:linear-gradient(#ffc25c,#e68418)!important}.board-wrap #board{margin:0 auto!important;max-width:100%!important;max-height:none!important}.board-wrap:has(#board[style]){min-height:calc(var(--fitted-board-height,420px) + clamp(20px,3vw,32px))!important}
@media(min-width:700px){.board-wrap{padding-left:clamp(12px,2vw,22px)!important;padding-right:clamp(12px,2vw,22px)!important}.mission-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:520px){.game{width:100vw!important;padding:4px!important}.command-head .res{padding-left:4px!important}.command-head .res>.level-capsule{padding-left:35px!important}.level-star{width:34px!important;height:34px!important}.level-prefix{font-size:9px!important}.mission-panel{padding:7px 8px!important}.mission-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mission-check{min-height:36px!important;padding:5px 6px!important}.mission-footer{align-items:stretch!important;flex-direction:column!important}.mission-footer #claimLevel{width:100%!important}.board-wrap{padding:6px!important}}

/* v6.4 CLEAN BOARD RENDERER: this block is the only visual authority for the play grid */
.game{width:min(100vw,900px)!important;height:auto!important;min-height:100dvh!important;max-height:none!important;overflow:visible!important;grid-template-rows:auto auto auto auto!important}.board-wrap{box-sizing:border-box!important;position:relative!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;margin:0!important;padding:8px!important;border:0!important;border-radius:16px!important;background:transparent!important;box-shadow:none!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;overflow:hidden!important}.board-wrap::before,.board-wrap::after{display:none!important;content:none!important}#board,.board-wrap #board{box-sizing:content-box!important;position:relative!important;display:grid!important;flex:none!important;margin:0!important;padding:0!important;gap:var(--board-gap,3px)!important;border:0!important;border-radius:12px!important;background:#6e584e!important;box-shadow:0 8px 22px #0005,inset 0 0 0 1px #ffffff28!important;overflow:hidden!important;aspect-ratio:auto!important;align-content:start!important;justify-content:start!important;align-items:stretch!important;justify-items:stretch!important;grid-auto-flow:row!important;max-width:none!important;max-height:none!important}.cell{box-sizing:border-box!important;position:relative!important;width:var(--cell-size)!important;height:var(--cell-size)!important;min-width:var(--cell-size)!important;min-height:var(--cell-size)!important;max-width:var(--cell-size)!important;max-height:var(--cell-size)!important;margin:0!important;padding:0!important;border:0!important;border-radius:clamp(4px,.7vw,8px)!important;aspect-ratio:1/1!important;display:grid!important;place-items:center!important;overflow:hidden!important;contain:layout paint style!important;isolation:isolate!important;box-shadow:inset 0 1px #ffffff72,inset 0 -2px 4px #4d332f38!important;transition:filter .15s,transform .15s!important}.cell.checker-light{background:#ead7c8!important}.cell.checker-dark{background:#b99684!important}.cell.permanent-lock{background:#594d50!important;opacity:.52!important;box-shadow:inset 0 0 0 1px #ffffff12!important}.cell.captive{background:linear-gradient(145deg,#776267,#4d4349)!important}.cell:hover:not(.permanent-lock){filter:brightness(1.08)}.cell>.item{box-sizing:border-box!important;position:relative!important;width:82%!important;height:82%!important;min-width:0!important;min-height:0!important;max-width:82%!important;max-height:82%!important;margin:0!important;padding:0!important;overflow:hidden!important;align-self:center!important;justify-self:center!important;border-radius:28%!important}.cell>.item img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}.generator>.item{width:80%!important;height:80%!important}.captive>.item{width:68%!important;height:68%!important}.cell .gauge{left:10%!important;right:10%!important;bottom:3px!important;max-width:80%!important}.ghost,.spawn-projectile,.order-delivery-ghost{box-sizing:border-box!important;margin:0!important;translate:none!important;pointer-events:none!important}.ghost img,.spawn-projectile img,.order-delivery-ghost img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}
@media(max-width:520px){.board-wrap{padding:4px!important}#board,.board-wrap #board{border-radius:8px!important}.cell{border-radius:5px!important}}

/* v6.5 detached visuals: never inherit percentage-based in-cell item geometry */
html>.ghost,html>.spawn-projectile,html>.order-delivery-ghost,body>.ghost,body>.spawn-projectile,body>.order-delivery-ghost{position:fixed!important;display:block!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;translate:none!important;animation:none!important;contain:none!important;pointer-events:none!important;align-self:auto!important;justify-self:auto!important;border-radius:18%!important;z-index:30000!important}html>.ghost img,html>.spawn-projectile img,html>.order-delivery-ghost img,body>.ghost img,body>.spawn-projectile img,body>.order-delivery-ghost img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}

/* v6.6 FeedbackDirector local burst */
.feedback-burst{position:fixed;z-index:32000;translate:-50% -50%;width:1px;height:1px;pointer-events:none}.feedback-burst strong{position:absolute;left:0;top:0;translate:-50% -50%;font:1000 italic clamp(20px,5vw,34px)/1 Arial,sans-serif;white-space:nowrap;animation:feedbackBurstText .82s cubic-bezier(.12,.84,.2,1) both}.feedback-burst i{position:absolute;left:0;top:0;width:6px;height:6px;border-radius:50%;animation:feedbackBurstParticle .72s ease-out both}.feedback-gold strong{color:#fff39a;text-shadow:0 3px #977018,0 0 8px #fff,0 0 18px #ffc82f}.feedback-gold i{background:#ffe367;box-shadow:0 0 8px #fff,0 0 12px #ffc72e}.feedback-rainbow strong{color:#fff;background:linear-gradient(90deg,#ff655f,#ffe167,#62efa0,#58daf9,#a276ff,#ff70d0);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 3px #6e4a93) drop-shadow(0 0 9px #fff)}.feedback-burst i:nth-of-type(1){--x:42px;--y:-28px}.feedback-burst i:nth-of-type(2){--x:9px;--y:-47px}.feedback-burst i:nth-of-type(3){--x:-38px;--y:-31px}.feedback-burst i:nth-of-type(4){--x:-45px;--y:17px}.feedback-burst i:nth-of-type(5){--x:-8px;--y:43px}.feedback-burst i:nth-of-type(6){--x:40px;--y:28px}@keyframes feedbackBurstText{0%{opacity:0;transform:translateY(8px) scale(.25) rotate(-5deg)}34%{opacity:1;transform:translateY(-13px) scale(1.18) rotate(2deg)}65%{transform:translateY(-18px) scale(.97)}100%{opacity:0;transform:translateY(-38px) scale(1.04)}}@keyframes feedbackBurstParticle{0%{opacity:1;transform:translate(0,0) scale(.35)}65%{opacity:1;transform:translate(var(--x),var(--y)) scale(1)}100%{opacity:0;transform:translate(calc(var(--x)*1.2),calc(var(--y)*1.2)) scale(.1)}}

/* v7.0 quest-complete jelly reflection and project send controls */
.mission-check{position:relative;overflow:hidden;transform-origin:center}.mission-check.mission-just-completed{animation:missionCompleteBreath 1.45s cubic-bezier(.16,.82,.22,1) both!important;box-shadow:0 0 0 1px #dfffff55,0 0 18px #82f0cd88,inset 0 1px #ffffff80!important}.mission-check.mission-just-completed::after{content:'';position:absolute;z-index:5;left:-55%;top:-45%;width:34%;height:190%;pointer-events:none;transform:skewX(-22deg);background:linear-gradient(90deg,transparent,#ffffff14 18%,#fff 50%,#ffffff20 78%,transparent);filter:blur(.5px);animation:missionJellyWink .72s .2s cubic-bezier(.12,.7,.18,1) both}@keyframes missionCompleteBreath{0%{transform:scale(1);filter:brightness(1)}18%{transform:scale(.96,.9);filter:brightness(1.16)}38%{transform:scale(1.075,1.13);filter:brightness(1.4)}58%{transform:scale(.985,.965)}76%{transform:scale(1.025,1.04)}100%{transform:none;filter:none}}@keyframes missionJellyWink{0%{left:-55%;opacity:0}15%{opacity:1}66%{opacity:.95}100%{left:125%;opacity:0}}
.project-requirement{grid-template-columns:42px minmax(0,1fr) 54px!important}.project-send-button{box-sizing:border-box!important;width:50px!important;height:50px!important;aspect-ratio:1/1!important;padding:0!important;display:grid!important;place-items:center!important;border:1px solid #fff0a988!important;border-radius:14px!important;background:linear-gradient(145deg,#fff09a,#e0a12c)!important;color:#4b3210!important;font-size:11px!important;font-weight:1000!important;box-shadow:inset 0 2px #fff9,inset 0 -4px 8px #9d5b1738,0 5px 12px #0004,0 0 13px #ffd85355!important}.project-send-button:not(:disabled):hover{filter:brightness(1.12);transform:translateY(-1px)}.project-send-button:not(:disabled):active{transform:scale(.9)!important}.project-send-button:disabled{filter:grayscale(.8);opacity:.35}.project-complete-check{width:50px;height:50px;display:grid;place-items:center;color:#b9f2cb;font-size:24px;font-weight:900;opacity:.34;filter:grayscale(.25);text-shadow:0 0 8px #79d99a55}

/* v7.1 cheat tab */
.head-actions.single-row-menu{grid-template-columns:repeat(7,minmax(0,1fr))!important}.cheat-head-action{border-color:#e69cff66!important;background:linear-gradient(145deg,#4b315d,#261c42)!important}.cheat-head-action i{color:#efb4ff;filter:drop-shadow(0 0 5px #d977ff)}.cheat-dialog{max-width:430px!important}.cheat-resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0}.cheat-resource-grid button{min-height:92px;display:grid;place-items:center;gap:2px;border:1px solid #ffffff24;border-radius:18px;background:linear-gradient(145deg,#263e5b,#17283f);color:#fff;box-shadow:inset 0 1px #ffffff20,0 7px 16px #0004}.cheat-resource-grid i{font-size:27px}.cheat-resource-grid b{font-size:16px}.cheat-resource-grid small{color:#adc5d9;font-size:9px}.cheat-custom{padding:12px;border:1px solid #ffffff1c;border-radius:16px;background:#0c1b2c99}.cheat-custom label{display:grid;gap:6px;color:#bcd0df;font-size:10px}.cheat-custom input{width:100%;padding:9px 11px;border:1px solid #ffffff26;border-radius:11px;background:#081524;color:#fff;font:700 14px inherit}.cheat-custom>div{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:9px}.cheat-custom button{padding:8px 4px;border:1px solid #cf99f066;border-radius:10px;background:#312144;color:#f2d6ff;font-size:8px;font-weight:800}.cheat-added{animation:cheatAdded .52s cubic-bezier(.16,.86,.25,1.35)!important}@keyframes cheatAdded{0%{transform:scale(1)}32%{transform:scale(.88);filter:brightness(1.5)}68%{transform:scale(1.12)}100%{transform:none;filter:none}}@media(max-width:520px){.head-actions.single-row-menu{display:flex!important;overflow-x:auto!important;scrollbar-width:none}.head-actions.single-row-menu .head-action{min-width:54px!important}.cheat-resource-grid{gap:5px}.cheat-resource-grid button{min-height:78px}}

/* v7.2 continuous era projects */
.project-reward-summary b::before{content:'◈';margin-right:6px;color:#ffe36f}.project-dialog .project-reward-summary{position:relative;overflow:hidden}.project-dialog .project-reward-summary::after{content:'';position:absolute;left:-35%;top:-60%;width:26%;height:220%;transform:skewX(-22deg);background:linear-gradient(90deg,transparent,#fff8,transparent);animation:projectSummaryShine 3.2s ease-in-out infinite}@keyframes projectSummaryShine{0%,55%{left:-35%;opacity:0}65%{opacity:.7}90%,100%{left:125%;opacity:0}}.project-dialog #eraProjectName{margin-bottom:5px}.project-requirement small{line-height:1.35}.project-dialog #claimProjectReward:not(:disabled){box-shadow:0 0 16px #ffd85d66}
