:root{--plate-blue:url('assets/ui-v5/button-blue.png');--plate-gold:url('assets/ui-v5/button-gold.png');--plate-red:url('assets/ui-v5/button-red.png');--plate-nav:url('assets/ui-v5/nav-plate.png');--plate-resource:url('assets/ui-v5/resource-plate.png')}
.plate-button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:64px;padding:13px 12%;background:var(--plate-blue) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;color:#fff6d2;font-size:17px;font-weight:800;text-shadow:0 2px 2px #143647;transition:transform .15s,filter .15s;white-space:normal;line-height:1.3}.plate-button img{width:31px;height:31px;object-fit:contain;flex:none}.plate-button.gold{background-image:var(--plate-gold);color:#fff9d9;text-shadow:0 2px 2px #87601a}.plate-button.red{background-image:var(--plate-red)}.plate-button:active:not(:disabled){transform:translateY(2px) scale(.98);filter:brightness(1.15)}.plate-button:disabled{filter:saturate(.25) brightness(.7);cursor:not-allowed}.battle-button{background:var(--plate-blue) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;min-height:91px;padding:15px 13%;grid-template-columns:43px 1fr;gap:6px}.battle-button>span{font-size:25px;line-height:1.2}.battle-button>small{font-size:11px}.battle-button>img{width:43px;height:43px}.home-top{align-items:flex-start}.home-progress{border:0;border-radius:0;background:var(--plate-resource) center/100% 100% no-repeat;padding:10px 19px;min-width:170px;min-height:60px;gap:4px;box-shadow:none}.home-progress img{width:38px;height:38px}.home-progress span{font-size:11px}.home-progress b{font-size:23px}.home-top .icon-button{width:58px;height:58px;background:none;border:0;box-shadow:none;padding:0}.home-top .icon-button img{width:100%;height:100%}.home-title{top:13%}.home-command{bottom:145px}.home-route{position:absolute;bottom:35px;left:25px;right:25px;display:flex;align-items:center;justify-content:center;gap:12px;margin:auto;max-width:430px;border-top:1px solid #e9c77d44;padding:13px 0}.home-route img{width:55px;height:55px;object-fit:contain}.home-route p{margin:0;font-size:12px;color:#a8c6d0;line-height:1.5}.home-route b{display:block;color:#ffdf8f;font-size:17px;margin-bottom:3px}.home-links{gap:2px;justify-content:space-between}.home-links button{flex-direction:column;gap:0;font-size:12px;min-height:67px;padding:0}.home-links img{width:44px;height:44px}.home-version{bottom:9px}.home-title>p{font-size:12px}.home-command .selected-mission{background:linear-gradient(135deg,#163a4ce8,#102a3fe8);border-color:#d2b36788}.home-title .title-rule{width:160px}
/* Dedicated pages occupy their own screen with bounded, readable scrolling. */
.command-page{position:absolute;inset:0;z-index:22;background:radial-gradient(ellipse at 80% 0,#31576d77,transparent 50%),linear-gradient(#152f47,#0a2034);color:#fff1cb;display:flex;flex-direction:column;overflow:hidden}.command-header{display:flex;align-items:center;gap:14px;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px;border-bottom:1px solid #d4b57255;background:linear-gradient(#1c4053,#122c42);box-shadow:0 3px 12px #071a2b66;flex:none;z-index:1}.command-header>div{flex:1;min-width:0}.command-header h2{font-size:25px;line-height:1.25;margin:0;color:#fff0bc}.command-header p{font-size:11px;margin:0 0 3px;color:#b6d3d8}.nav-back{min-height:53px;min-width:103px;font-size:15px;padding:10px 20px;background-image:var(--plate-nav)}.nav-back img{width:23px;height:23px;transform:rotate(180deg)}.page-wallet{position:relative;display:grid;grid-template-columns:34px 40px;align-items:center;min-height:59px;min-width:115px;padding:9px 16px 12px;background:var(--plate-resource) center/100% 100% no-repeat;border:0;color:#ffe6a3}.page-wallet img{width:31px;height:31px;grid-row:1/3}.page-wallet b{font:800 19px Arial;text-align:center}.page-wallet span{font-size:9px;color:#c8dfd8;text-align:center}.page-content{flex:1;overflow:auto;padding:24px max(24px,calc((100% - 1160px)/2)) 30px;scrollbar-width:thin;scrollbar-color:#b69a55 #173449;overscroll-behavior:contain;touch-action:pan-y}.page-intro{font-size:15px;color:#b4cfd7;line-height:1.8;max-width:800px;margin:0 0 22px}.page-footnote{font-size:13px;color:#9ab9c7;line-height:1.8}.section-label{font-size:22px;color:#ffdf98;margin:24px 0 13px}.command-nav{flex:none;display:flex;justify-content:center;gap:8px;padding:6px 15px max(6px,env(safe-area-inset-bottom));background:linear-gradient(#193a4d,#102b40);border-top:1px solid #e5ca7b66;box-shadow:0 -4px 16px #07182966;z-index:1}.command-nav button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:59px;width:min(28vw,220px);padding:8px 10px;background:var(--plate-nav) center/100% 100% no-repeat;color:#c8d9db;font-size:16px;font-weight:700}.command-nav button img{width:38px;height:38px;object-fit:contain}.command-nav button.selected{background-image:var(--plate-blue);color:#fff1bc}.world-atlas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.atlas-world{position:relative;padding:0;overflow:hidden;text-align:right;color:#fff1cc;background:linear-gradient(#244b60,#153347);border:2px solid #a88e5777;border-radius:20px;box-shadow:0 6px 0 #061b2c,inset 0 0 0 3px #e1cb7e12;transition:transform .15s,border-color .15s}.atlas-world:active{transform:translateY(3px)}.atlas-world>img{display:block;width:100%;height:220px;object-fit:cover;object-position:50% 44%;background:#26404f;border-bottom:2px solid #b8a46666}.atlas-world>div{padding:15px 17px 18px}.atlas-world h3{font-size:24px;line-height:1.25;margin:3px 0 7px}.atlas-world small{font-size:11px;color:#f2d487}.atlas-world p{font-size:13px;line-height:1.7;color:#b3d0d6;margin:0}.world-hero{height:min(45vh,400px);width:100%;border:2px solid #d5b76f;border-radius:20px;overflow:hidden;box-shadow:0 5px #071b2d;margin-bottom:21px;background:#244454}.world-hero img{width:100%;height:100%;object-fit:cover;object-position:50% 45%}.world-action-row{display:flex;gap:12px;max-width:390px}.world-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:650px}.stage-node{display:grid;grid-template-columns:50px 1fr;gap:3px 10px;align-items:center;padding:15px;color:#fff0bd;background:linear-gradient(#2c5a70,#1d405a);border:1px solid #d6c17977;border-radius:16px;box-shadow:0 4px #071e31}.stage-node>b{font-size:30px;grid-row:1/3}.stage-node img{width:37px;height:37px;object-fit:contain;justify-self:center;filter:grayscale(1) brightness(.5)}.stage-node span{font-size:12px}.stage-node.completed img{filter:none}.stage-node:disabled{opacity:.5}.shop-tabs{display:flex;gap:8px;overflow:auto;padding:2px 2px 12px;margin-bottom:10px}.shop-tab{flex:none;min-width:86px;padding:9px 18px;color:#b7cfd5;background:#23495c;border:1px solid #688e9977;border-radius:10px;font-size:14px;font-weight:700}.shop-tab.selected{background:#346c83;color:#ffe7a1;border-color:#e0c080}.shop-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}.shop-weapon{position:relative;display:flex;flex-direction:column;align-items:center;min-width:0;padding:10px 9px 14px;background:radial-gradient(ellipse at 50% 28%,#466577,#18394e 70%);color:#fff2cc;border:1px solid #91acaa66;border-radius:17px;box-shadow:0 5px #091f32}.shop-weapon>img{display:block;width:100%;height:150px;object-fit:contain;filter:drop-shadow(0 7px 4px #061b2b99)}.shop-weapon h3{font-size:17px;line-height:1.4;text-align:center;margin:8px 0 3px}.shop-weapon small{font-size:11px;color:#a8c8d0}.shop-price{font-size:16px;font-weight:800;color:#ffdf8e;margin-top:8px;padding:3px 15px;background:#0d2b3f;border-radius:7px}.shop-price.unaffordable{color:#eaa28c}.weapon-detail{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:30px}.weapon-turntable{position:relative;min-height:370px;display:grid;place-items:center;border:1px solid #c4b07177;background:radial-gradient(ellipse,#436c7f55,transparent 68%);border-radius:24px;overflow:hidden}.weapon-turntable::after{content:"";position:absolute;width:70%;height:24px;border:2px solid #f5d78366;border-radius:50%;bottom:35px;background:#12344755;box-shadow:0 0 35px #79d6e42b}.weapon-turntable img{position:relative;z-index:1;width:95%;max-height:400px;object-fit:contain;filter:drop-shadow(0 12px 8px #06192da6)}.weapon-spec>p{font-size:18px;line-height:1.8;color:#bcd8dc}.weapon-spec dl{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:25px 0}.weapon-spec dl>div{padding:13px;background:#1c4055;border:1px solid #a1b3a444;border-radius:12px}.weapon-spec dt{font-size:12px;color:#97bdc9}.weapon-spec dd{font-size:25px;font-weight:800;margin:3px 0 0;color:#ffe2a0;line-height:1.1}.buy-weapon{width:100%;min-height:78px;font-size:20px}.weapon-spec>.page-footnote{font-size:13px}.base-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:22px}.base-tower{background:linear-gradient(#284f64,#18374d);border:1px solid #bda56877;border-radius:20px;padding:15px;text-align:center;box-shadow:0 4px #0a1e31}.base-tower>img{width:100%;height:145px;object-fit:contain}.base-tower h3{font-size:20px;margin:8px 0 4px}.base-tower p{font-size:13px;color:#aacecf;margin:0 0 8px}.base-tower .plate-button{width:100%;font-size:14px;min-height:57px}.base-upgrades{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;max-width:750px}.base-upgrades .plate-button{font-size:15px;min-height:70px}
/* Free placement uses a paused game board, a real ghost and one explicit commit. */
.build-entry{position:absolute;left:12px;bottom:154px;width:175px;z-index:7;min-height:56px;font-size:13px;padding:10px 18px}.build-entry img{width:31px;height:31px}.planning-bar,.placement-dock,.tower-dock{position:absolute;z-index:12;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(570px,calc(100% - 24px));background:linear-gradient(145deg,#20465dec,#102c43f5);border:2px solid #d5b66e;border-radius:21px;box-shadow:0 5px #061b2ca3,0 12px 30px #07162e66;padding:14px 16px;color:#fff0c6}.planning-bar{display:grid;grid-template-columns:1fr 1fr;gap:9px}.planning-bar>div{grid-column:1/-1;display:flex;align-items:center;gap:10px}.planning-bar>div img{width:45px;height:45px;object-fit:contain}.planning-bar p{margin:0;font-size:15px;line-height:1.5}.planning-bar p b,.planning-bar p span{display:block}.planning-bar p span{font-size:11px;color:#abc9d1}.planning-bar .plate-button{min-height:60px;font-size:16px;padding:12px 12%}.planning-bar .plate-button img{width:28px;height:28px}.placement-summary{display:flex;align-items:center;gap:14px}.placement-summary>img{width:83px;height:83px;object-fit:contain;flex:none}.placement-summary h2{font-size:22px;line-height:1.3;margin:3px 0}.placement-summary p{font-size:13px;color:#b4d0d8;margin:0;line-height:1.5}.placement-summary #placement-kind{font-size:11px;color:#e4ca88}.placement-summary #placement-status{color:#9fe9ba}.placement-summary #placement-status.invalid{color:#ffac90}.placement-buttons{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;margin-top:9px}.placement-buttons .plate-button{min-height:60px;padding:11px 12%;font-size:16px}.placement-dock>small{display:block;text-align:center;color:#8fb4c2;font-size:10px;margin-top:5px}.tower-summary{display:flex;align-items:center;gap:10px;padding-left:34px}.tower-summary>img{width:75px;height:75px;object-fit:contain}.tower-summary h2{font-size:21px;line-height:1.3;margin:3px 0}.tower-summary p{font-size:12px;margin:5px 0;color:#acd1d4}.tower-actions{display:flex;gap:10px;margin-top:7px}.tower-actions .plate-button{flex:1;min-height:60px;padding:11px 12%;font-size:15px}.tower-actions img{width:31px;height:31px}#game[data-mode=planning]>.hud-bottom,#game[data-mode=building]>.hud-bottom{visibility:hidden;pointer-events:none}#game:not([data-screen=battle])>.build-entry,#game[data-mode=planning]>.build-entry,#game[data-mode=building]>.build-entry{display:none}#game:not([data-screen=battle])>.hud-top,#game:not([data-screen=battle])>.hud-bottom,#game:not([data-screen=battle])>.view-tools,#game:not([data-screen=battle])>#castle-energy,#game:not([data-screen=battle])>#feedback-layer,#game:not([data-screen=battle])>#structure-labels{visibility:hidden;pointer-events:none}#game[data-mode=building]>.view-tools{pointer-events:none;opacity:.35}.command-page .page-content> .plate-button{width:min(100%,380px)}
@media(max-width:1000px){.world-atlas{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.atlas-world>img{height:190px}.page-content{padding:20px 22px 28px}.base-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.command-header{padding:10px 10px 8px;gap:7px}.command-header h2{font-size:20px}.command-header p{font-size:9px;line-height:1.4}.nav-back{min-width:78px;min-height:46px;font-size:12px;padding:9px 14px;gap:3px}.nav-back img{width:18px;height:18px}.page-wallet{min-width:83px;min-height:48px;grid-template-columns:26px 26px;padding:8px 11px}.page-wallet img{width:25px;height:25px}.page-wallet b{font-size:16px}.page-wallet span{font-size:7px;white-space:nowrap}.page-content{padding:18px 16px 23px}.page-intro{font-size:13px;margin-bottom:17px;line-height:1.75}.world-atlas{grid-template-columns:1fr;gap:18px}.atlas-world{display:grid;grid-template-columns:46% 1fr;min-height:165px;border-radius:17px}.atlas-world>img{height:100%;min-height:165px;border:0;border-left:1px solid #c8b47677}.atlas-world>div{padding:15px 12px}.atlas-world h3{font-size:22px;line-height:1.3}.atlas-world p{font-size:12px;line-height:1.65}.atlas-world small{font-size:10px}.world-hero{height:270px;border-radius:17px}.command-nav{gap:3px;padding:5px 7px max(5px,env(safe-area-inset-bottom))}.command-nav button{width:33%;min-height:62px;padding:8px 6px;gap:2px;font-size:11px}.command-nav button img{width:28px;height:28px}.world-stages{gap:8px}.stage-node{padding:10px 7px;grid-template-columns:27px 1fr;gap:3px 5px;border-radius:12px}.stage-node>b{font-size:25px}.stage-node img{width:30px;height:30px}.stage-node span{font-size:10px}.section-label{font-size:20px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.shop-weapon{padding:7px 5px 13px}.shop-weapon>img{height:134px}.shop-weapon h3{font-size:16px}.shop-weapon small{font-size:10px}.shop-price{font-size:15px}.shop-tabs{gap:6px}.shop-tab{min-width:64px;padding:8px 12px;font-size:12px}.weapon-detail{grid-template-columns:1fr;gap:10px}.weapon-turntable{min-height:250px;height:260px;border-radius:18px}.weapon-turntable img{height:260px;width:95%}.weapon-turntable::after{bottom:21px}.weapon-spec>p{font-size:15px;line-height:1.7;margin:10px 0}.weapon-spec dl{gap:9px;margin:13px 0}.weapon-spec dl>div{padding:11px}.weapon-spec dt{font-size:11px}.weapon-spec dd{font-size:23px}.buy-weapon{font-size:17px;min-height:73px;padding:14px 12%}.buy-weapon img{width:30px;height:30px}.base-grid{gap:12px}.base-tower{padding:10px;border-radius:16px}.base-tower>img{height:110px}.base-tower h3{font-size:16px}.base-tower p{font-size:11px}.base-upgrades{grid-template-columns:1fr;gap:7px}.base-upgrades .plate-button{min-height:65px}.home-command{bottom:138px;left:19px;right:19px}.home-route{bottom:28px;left:22px;right:22px;padding:11px 0}.home-route img{width:48px;height:48px}.home-route b{font-size:16px}.home-route p{font-size:11px}.home-top{left:15px;right:15px;top:14px}.home-top .icon-button{width:52px;height:52px}.home-progress{min-width:147px;min-height:54px;padding:8px 14px}.home-progress img{width:33px;height:33px}.home-progress b{font-size:21px}.home-progress span{font-size:10px}.home-links img{width:39px;height:39px}.home-links button{font-size:11px;min-height:61px}.home-links{margin-top:13px}.home-title{top:14%}.battle-button{min-height:89px}.battle-button>span{font-size:25px}.build-entry{width:163px;bottom:151px;font-size:12px}.planning-bar,.placement-dock,.tower-dock{padding:11px 12px}.placement-summary>img{width:76px;height:76px}.placement-summary h2{font-size:20px}.placement-summary p{font-size:12px}.planning-bar .plate-button{font-size:14px}.placement-buttons{gap:7px}.placement-buttons .plate-button{font-size:14px}.tower-actions .plate-button{font-size:14px}}
@media(max-width:540px) and (max-height:700px){.home-command{bottom:112px}.home-route{bottom:22px;padding:8px 0}.home-route img{width:40px;height:40px}.home-route b{font-size:14px}.home-route p{font-size:10px}.home-title{top:15%}.home-links{margin-top:5px}.home-links button{min-height:54px;font-size:10px}.home-links img{width:34px;height:34px}.battle-button{min-height:78px}.battle-button>span{font-size:23px}.selected-mission{margin-bottom:8px}.home-top .icon-button{width:47px;height:47px}.home-progress{min-height:48px;min-width:140px}.build-entry{bottom:138px}.placement-summary>img{width:64px;height:64px}.placement-summary h2{font-size:18px}.placement-buttons .plate-button{min-height:53px}.planning-bar .plate-button{min-height:53px}.planning-bar p b{font-size:13px}.planning-bar p span{font-size:10px}}
@media(min-width:701px) and (min-height:551px){.home-command{bottom:165px}.home-route{right:7%;left:auto;width:360px;bottom:45px}.home-title{top:17%}.home-links{gap:0}.home-links img{width:45px;height:45px}.home-links button{font-size:12px}.home-progress{min-width:180px}.planning-bar{left:auto;right:20px;transform:none;max-width:460px}.placement-dock,.tower-dock{left:auto;right:20px;transform:none;max-width:430px}}
@media(max-height:550px) and (min-width:541px){.home-title{top:16%;right:8%;width:260px}.home-title>p{font-size:9px}.home-command{bottom:24px;right:6%;width:315px;max-width:43%}.home-route{left:5%;right:auto;bottom:28px;width:40%;max-width:340px;flex-direction:row;padding-top:11px}.home-route img{width:50px;height:50px}.home-route b{font-size:16px}.home-route p{font-size:11px}.home-progress{min-height:48px;min-width:153px;padding:8px 15px}.home-progress img{width:30px;height:30px}.home-progress b{font-size:18px}.home-top .icon-button{width:48px;height:48px}.home-command .selected-mission{display:none}.battle-button{min-height:73px;padding:12px 14%;grid-template-columns:36px 1fr;grid-template-rows:27px 14px}.battle-button>span{font-size:23px}.battle-button>small{font-size:9px}.battle-button>img{width:36px;height:36px}.home-links{margin-top:6px}.home-links button{font-size:10px;min-height:48px}.home-links img{width:29px;height:29px}.command-header{padding:7px 13px;gap:12px}.command-header h2{font-size:21px}.command-header p{font-size:9px}.nav-back{min-height:43px;min-width:90px;font-size:13px}.page-wallet{min-height:45px}.command-nav{position:absolute;left:10px;top:76px;bottom:12px;flex-direction:column;gap:8px;padding:8px;border:1px solid #b69e6166;border-radius:14px;width:96px;background:#0f2b40e8}.command-nav button{width:100%;min-height:73px;flex-direction:column;gap:0;font-size:10px;padding:10px 5px}.command-nav button img{width:28px;height:28px}.page-content{padding:15px 20px 25px 128px}.world-atlas{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.atlas-world>img{height:155px}.atlas-world h3{font-size:20px}.atlas-world p{font-size:12px}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.shop-weapon>img{height:120px}.weapon-detail{grid-template-columns:1fr 1fr;gap:18px}.weapon-turntable{min-height:250px;height:250px}.weapon-turntable img{height:250px}.weapon-spec>p{font-size:14px}.weapon-spec dl{gap:7px;margin:11px 0}.weapon-spec dl>div{padding:8px}.weapon-spec dd{font-size:20px}.weapon-spec dt{font-size:10px}.buy-weapon{min-height:64px;font-size:14px;padding:12px 11%}.build-entry{left:12px;bottom:13px;width:174px;min-height:54px}.planning-bar,.placement-dock,.tower-dock{left:auto;right:12px;bottom:12px;transform:none;width:330px;padding:10px 12px;border-radius:17px}.planning-bar{gap:3px}.planning-bar>div img{width:35px;height:35px}.planning-bar p b{font-size:13px}.planning-bar p span{font-size:10px}.planning-bar .plate-button{min-height:53px;font-size:12px}.planning-bar .plate-button img{width:23px;height:23px}.placement-summary>img{width:60px;height:60px}.placement-summary h2{font-size:18px}.placement-summary p{font-size:11px}.placement-buttons{gap:6px;margin-top:5px}.placement-buttons .plate-button{min-height:52px;font-size:12px}.placement-buttons .plate-button img{width:23px;height:23px}.placement-dock>small{font-size:9px}.tower-summary>img{width:58px;height:58px}.tower-summary h2{font-size:18px}.tower-actions{margin-top:2px}.tower-actions .plate-button{min-height:52px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.plate-button,.atlas-world{transition:none!important}.weapon-turntable img{animation:none!important}}
.page-wallet img{grid-row:1}.page-wallet span{grid-column:1/-1;font-size:10px;line-height:1.1}.page-wallet{grid-template-columns:30px 36px}.home-command .battle-button{padding-top:22px;padding-bottom:19px;min-height:103px}.home-command .battle-button>span{font-size:24px}.home-command .battle-button>small{font-size:10px}
@media(max-width:540px){.page-wallet{min-width:96px;min-height:54px;padding:8px 14px;grid-template-columns:28px 32px}.page-wallet span{font-size:9px}.home-command .battle-button{min-height:99px}.home-command .battle-button>span{font-size:23px}}
@media(max-width:540px) and (max-height:700px){.home-command .battle-button{min-height:88px;padding-top:19px;padding-bottom:16px}.home-command .battle-button>span{font-size:21px}.home-command .battle-button>small{font-size:9px}}
@media(max-height:550px) and (min-width:541px){.home-command .battle-button{min-height:83px;padding-top:17px;padding-bottom:15px}.home-command .battle-button>span{font-size:21px}}

.base-tower .manage-tower{background-image:var(--plate-nav);min-height:53px;font-size:12px;margin-top:5px}

#upgrade-receipt{position:fixed;z-index:85;top:max(18px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(520px,calc(100vw - 28px));display:flex;align-items:center;gap:12px;padding:16px 12px;background:linear-gradient(135deg,#173c4d,#23566a);border:2px solid #d8b55e;border-radius:20px;box-shadow:0 8px 0 #092635,0 18px 50px #0008;color:#fff4ce;direction:rtl}#upgrade-receipt[hidden]{display:none}#upgrade-receipt>img{width:66px;height:66px;object-fit:contain}#upgrade-receipt strong{font-size:20px}#upgrade-receipt p{margin:7px 0;font-size:14px;line-height:1.65}#upgrade-receipt small{color:#ffdc8b}#receipt-close{background:#123441;border:1px solid #6d8d91;color:white;border-radius:50%;width:32px;height:32px;flex-shrink:0;align-self:flex-start;font-size:24px}#upgrade-receipt[data-variant=rejected]{border-color:#d9886c}#upgrade-receipt.arrived{animation:receipt-arrive .32s ease-out}.upgrade-reason{display:block;text-align:center;color:#fff0bc;font-size:13px;margin:8px 0 14px}.base-upgrades>div>.plate-button{width:100%}#current-build{position:fixed;z-index:65;bottom:max(5px,env(safe-area-inset-bottom));left:9px;font:10px sans-serif;color:#f9eccc;background:#143135bd;padding:3px 8px;border-radius:8px;pointer-events:none}#version-banner{position:fixed;z-index:86;bottom:35px;left:12px;background:#234c5d;color:#fff3be;border:1px solid #e2c36c;border-radius:12px;padding:12px}.boost-pulse{animation:boost-pulse .55s ease-in-out 3}@keyframes receipt-arrive{from{translate:0 -12px}to{translate:0 0}}@keyframes boost-pulse{50%{filter:brightness(1.8);box-shadow:0 0 22px #ffda70}}@media(prefers-reduced-motion:reduce){#upgrade-receipt.arrived,.boost-pulse{animation:none}}

#receipt-close img{width:30px;height:30px;object-fit:contain}#receipt-close{padding:0;background:transparent;border:0}
