/* Anchored shared HUD: settings never competes with wallet items for flex space. */
#game #topbar.wallet-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto 43px;grid-template-rows:48px;align-items:center;gap:9px;padding:8px 14px;flex:0 0 66px;min-height:66px;height:66px;box-sizing:border-box}
#game #topbar.wallet-header>*{min-width:0;box-sizing:border-box}
#game #topbar.wallet-header>.player-badge{grid-column:1;grid-row:1;justify-self:start;min-width:0;max-width:190px;width:100%;height:47px;overflow:hidden;padding-right:10px}
#game #topbar.wallet-header .player-badge>span:last-child{min-width:0;overflow:hidden}
#game #topbar.wallet-header .player-badge b{max-width:126px;overflow:hidden;text-overflow:ellipsis}
#game #topbar.wallet-header>.hud-corner{grid-column:3;grid-row:1;justify-self:end;position:static;width:42px;height:42px;min-width:42px;min-height:42px;max-width:42px;padding:5px;margin:0;flex-shrink:0;overflow:hidden;transform:none;box-sizing:border-box;border-radius:13px}
#game #topbar.wallet-header>.hud-corner .icon{display:block;width:27px;height:27px;max-width:100%;max-height:100%;margin:0;object-fit:contain;transform:none}
#game #topbar.wallet-header>.wallet{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:310px;max-width:100%;margin:0;align-items:stretch}
#game #topbar.wallet-header .wallet-resource{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;height:43px;padding:3px 8px 4px;border:1px solid #d9bc79;border-radius:13px;background:linear-gradient(#fff6d6,#e9d2a1);box-shadow:inset 0 0 0 2px #fff7d333,0 2px #735331;color:#30543d;text-align:center;overflow:hidden;font:inherit;touch-action:manipulation}
#game #topbar.wallet-header .wallet-amount{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;min-width:0;height:22px}
#game #topbar.wallet-header .wallet-amount b{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:15px/1 Jua,sans-serif;font-variant-numeric:tabular-nums}
#game #topbar.wallet-header .wallet-amount .icon{display:block;width:23px;height:23px;flex:0 0 23px;object-fit:contain;margin:0}
#game #topbar.wallet-header .wallet-resource small{font:9px/1.15 KongSans,sans-serif;white-space:nowrap;letter-spacing:-.3px;color:#69805a}
#game #topbar.wallet-header .wallet-regular{border-color:#adc48b;background:linear-gradient(#eff5d4,#cbdcad)}
#game #topbar.wallet-header .wallet-regular .icon{filter:hue-rotate(55deg) saturate(.75)}
#game #topbar.wallet-header .wallet-golden{padding-right:15px;border-color:#f0d186;background:linear-gradient(#fff3c2,#f3d17c)}
#game #topbar.wallet-header .wallet-golden small{color:#92712f}
#game #topbar.wallet-header .wallet-golden:after{content:'+';position:absolute;right:4px;top:6px;border-radius:50%;width:12px;height:12px;background:#6e8c49;color:#fff7cf;font:12px/11px Jua,sans-serif;border:1px solid #fff0ad}
@container game (max-width:650px){
 #game #topbar.wallet-header{grid-template-columns:minmax(0,1fr) 41px;grid-template-rows:40px 37px;gap:5px 8px;padding:6px 10px 7px;flex:0 0 95px;min-height:95px;height:95px}
 #game #topbar.wallet-header>.player-badge{grid-column:1;grid-row:1;height:40px;width:173px;max-width:100%;padding-right:8px;gap:2px}
 #game #topbar.wallet-header .avatar-frame{height:39px;width:39px;flex:0 0 39px}
 #game #topbar.wallet-header .avatar-frame img{height:38px;width:38px;object-fit:contain}
 #game #topbar.wallet-header .player-badge b{font-size:12px;max-width:117px}
 #game #topbar.wallet-header .player-badge small{font-size:9px}
 #game #topbar.wallet-header>.hud-corner{grid-column:2;grid-row:1;width:39px;height:39px;min-width:39px;min-height:39px;max-width:39px;padding:4px}
 #game #topbar.wallet-header>.hud-corner .icon{height:26px;width:26px}
 #game #topbar.wallet-header>.wallet{grid-column:1 / -1;grid-row:2;width:100%;gap:7px}
 #game #topbar.wallet-header .wallet-resource{height:37px;min-height:37px;border-radius:12px;padding:2px 8px 3px;gap:0}
 #game #topbar.wallet-header .wallet-amount{height:20px;gap:5px}
 #game #topbar.wallet-header .wallet-amount .icon{height:21px;width:21px;flex-basis:21px}
 #game #topbar.wallet-header .wallet-amount b{font-size:14px}
 #game #topbar.wallet-header .wallet-resource small{font-size:8px}
}
/* Recruitment becomes a legible forest shrine, with a fixed transaction area. */
#game[data-route=recruit]{width:min(100vw,520px);height:100dvh;max-height:1100px;margin:0 auto;border:1px solid #a7ab6d;border-radius:22px;background:#103f33 url('./assets/jungle.jpg') center/cover;box-shadow:0 18px 70px #001e24aa,inset 0 0 0 3px #486c45}
#game[data-route=recruit] #topbar{background:linear-gradient(#1b503ef2,#103d32e8);border-bottom:1px solid #cbbb7d77;box-shadow:0 3px 12px #032b2677}
#game[data-route=recruit] #screen,#game[data-route=recruit][data-recruit-pool=premium] #screen{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:50px 64px minmax(130px,1fr) 60px 144px;gap:8px;padding:8px 12px 9px;min-height:0;overflow:hidden;background:linear-gradient(#14453433,#082f2777)}
#game[data-route=recruit] #screen>*{grid-row:auto;min-width:0;min-height:0}
.summon-title{position:relative;display:flex;align-items:center;gap:9px;padding:4px 12px;border:1px solid #edcf91;border-radius:17px;background:linear-gradient(#fff5d1,#e7d19d);box-shadow:inset 0 0 0 2px #fff7dd77,0 3px #7d5c32;color:#315b3b}
.summon-title>img{width:39px;height:39px;object-fit:contain;filter:drop-shadow(0 2px 1px #8a9c5366)}.summon-title>div{flex:1;min-width:0}.summon-title h1{font:26px/1.05 Jua,sans-serif;margin:0;color:#31583b;text-shadow:0 1px #fff8d9;white-space:nowrap}.summon-title small{font:8px KongSans,sans-serif;color:#89916a;display:block;letter-spacing:1px;margin-bottom:2px}.summon-title>span{font:10px KongSans,sans-serif;padding:4px 8px;border:1px solid #b2bb7b;border-radius:12px;background:#e4e7b8;color:#597143;white-space:nowrap}
#game[data-route=recruit] .recruit-pool-tabs{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:9px;height:100%;min-height:0}
#game[data-route=recruit] .recruit-pool-tabs button{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;padding:5px 8px;min-width:0;border:1px solid #9bb77d;border-radius:18px;background:linear-gradient(#b1cda4,#6f9c77);box-shadow:inset 0 0 0 2px #d8e9bb33,0 3px #315840;color:#f7f3cc;text-shadow:0 1px #45673e}
.recruit-pool-tabs button>img{width:34px;height:34px;object-fit:contain;filter:drop-shadow(0 2px #294e3d55)}.recruit-pool-tabs button>span{display:flex;flex-direction:column;gap:3px;text-align:left}.recruit-pool-tabs button b{font:21px/1 Jua,sans-serif;color:inherit}.recruit-pool-tabs button small{font:9px/1.2 KongSans,sans-serif;color:#e7e9c6}
#game[data-route=recruit] .recruit-pool-tabs button[data-pool=premium]{background:linear-gradient(#a88a51,#7d6545);border-color:#cab47e;color:#fff0c7}
#game[data-route=recruit] .recruit-pool-tabs button.active{border:2px solid #fff0aa;background:linear-gradient(#f8f6c5,#c6dd9a);color:#385d3d;text-shadow:0 1px #f9f4ce;box-shadow:inset 0 0 0 2px #fff9d466,0 3px #668045,0 0 13px #d9e6a333}
#game[data-route=recruit] .recruit-pool-tabs button.active small{color:#6f8051}
#game[data-route=recruit] .recruit-pool-tabs button.active.golden{background:linear-gradient(#fff2ac,#edc66e);color:#755527;border-color:#fff2b0;box-shadow:inset 0 0 0 2px #fff8ca66,0 3px #96703a,0 0 16px #eed18755}
#game[data-route=recruit] .recruit-pool-tabs button.active.golden small{color:#9b7130}
#game[data-route=recruit] .summon-theater{position:relative;isolation:isolate;margin:0;min-height:0;height:100%;border:2px solid #b0b97a;border-radius:24px;background:linear-gradient(#09382b20,#052e27d9 95%),url('./assets/lobby-day.png') 50% 36%/cover;box-shadow:inset 0 0 0 3px #f0e3a329,inset 0 -35px 55px #082b2799,0 4px #052d26,0 8px 16px #052a2666;overflow:hidden}
.summon-theater:before,.summon-theater:after{content:'';position:absolute;top:-3px;left:-3px;width:70px;height:70px;background:url('./assets/forest-corner-v11.svg') center/contain no-repeat;z-index:8;pointer-events:none}.summon-theater:after{left:auto;right:-3px;transform:scaleX(-1)}
.summon-aurora{position:absolute;inset:3% 3% 10%;z-index:0;background:radial-gradient(ellipse at 50% 65%,#d5ef9780,#92d59e33 40%,transparent 70%);pointer-events:none}
#game[data-route=recruit][data-recruit-pool=premium] .summon-theater{border-color:#e1bd6f;background-image:linear-gradient(#4a583411,#082e27e6 95%),url('./assets/lobby-day.png');box-shadow:inset 0 0 0 3px #fff0b13d,inset 0 -40px 55px #282e26a6,0 4px #4f4a2c,0 8px 18px #082c2755}
#game[data-route=recruit][data-recruit-pool=premium] .summon-aurora{background:radial-gradient(ellipse at 50% 65%,#ffe4a3a6,#f9d99a40 40%,transparent 70%)}
.summon-preview-label{position:absolute;left:45px;right:45px;top:12px;text-align:center;font:10px KongSans,sans-serif;color:#fff3c9;text-shadow:0 1px 4px #123e2d;z-index:7;background:#143d2b8c;border:1px solid #d7d6a366;border-radius:12px;padding:4px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.summon-stage-seal{position:absolute;left:20%;right:20%;bottom:13%;height:22%;border-radius:50%;border:2px solid #f3df9c9c;background:radial-gradient(ellipse,#fff6c17a,#a4c9835c 60%,#2f6d4e33 75%);box-shadow:inset 0 0 0 5px #ffe5a133,0 7px #245c3b66,0 0 28px #b5e19a6b;color:#fff2b4;font:42px Jua,sans-serif;text-align:center;transform:perspective(350px) rotateX(42deg);pointer-events:none}
#game[data-route=recruit] .summon-theater .pod-art.closed{left:28%;top:9%;width:44%;height:69%;max-width:none;object-fit:contain;filter:drop-shadow(0 8px 6px #12483288)}
#game[data-route=recruit] .summon-theater .pod-art.opened{left:20%;top:20%;width:60%;height:53%;max-width:none;object-fit:contain}
#game[data-route=recruit][data-recruit-pool=premium] .pod-art.closed{filter:sepia(.18) saturate(.9) drop-shadow(0 0 17px #ffe7a277) drop-shadow(0 8px 5px #334d2c66)}
#game[data-route=recruit] .summon-theater canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:5}
#game[data-route=recruit] .summon-caption{position:absolute;left:13px;right:13px;bottom:10px;padding:7px 8px;border:1px solid #c7d39788;border-radius:14px;background:linear-gradient(90deg,#0e3a2eea,#174d37ed,#0e3a2eea);box-shadow:inset 0 1px #d4e3af22,0 2px 7px #0a302a77;color:#fff4ca;text-shadow:0 1px #16412f;font:18px Jua,sans-serif;z-index:7}
#game[data-route=recruit] .summon-caption strong{display:block;font:22px/1.15 Jua,sans-serif;color:#ffe7a7}.summon-caption span{display:block;font:10px/1.35 KongSans,sans-serif!important;color:#dde9c7;margin-top:3px}
.summon-odds-band{display:flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid #cebc7c;border-radius:16px;background:linear-gradient(#fff3cb,#e6d2a3);box-shadow:inset 0 0 0 2px #fff8d566,0 3px #685331;color:#36583b;overflow:hidden}
.summon-odds-icon{flex:0 0 25px;font:27px Jua,sans-serif;color:#a18436;text-shadow:0 1px #fff9d8}.summon-odds-band>div{flex:1;min-width:0}.summon-odds-band b{display:block;font:15px/1.25 Jua,sans-serif;color:#345a3d}.summon-odds-band small{display:block;font:9px/1.35 KongSans,sans-serif;color:#7a7e54;margin-top:2px}.summon-odds-band>button{flex-shrink:0;font:10px KongSans,sans-serif;color:#5f743e;border:1px solid #b1b97c;background:#edf0c5;border-radius:11px;padding:5px 8px;box-shadow:0 1px #aaa568;white-space:nowrap}
#game[data-route=recruit] .invite-cta{margin:0;display:grid;grid-template-rows:minmax(0,1fr) 40px 18px;gap:5px;align-items:stretch;justify-content:normal;min-height:0}
#game[data-route=recruit] .invite-cta .summon-button{position:relative;min-height:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;gap:16px;padding:7px 17px;border:2px solid #fff1b0;border-radius:23px;background:linear-gradient(#fff7b4,#ffdc69 24%,#f2bd45 76%,#d9a135);box-shadow:inset 0 0 0 2px #bf8d3b,inset 0 4px #fff9cb77,0 4px #8a6532,0 6px 12px #062d2677;color:#335d3b;text-shadow:0 1px #fff3c5;filter:none;overflow:hidden;isolation:isolate}
.summon-button>span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative;z-index:1}.summon-button b{font:23px/1.1 Jua,sans-serif;white-space:nowrap}.summon-button small{font:10px/1.2 KongSans,sans-serif;color:#8b702e;white-space:nowrap}.summon-button em{position:relative;z-index:1;font:26px Jua,sans-serif;font-style:normal;color:#816a2e;border:1px solid #b99751;border-radius:50%;background:#fff1ab66;width:34px;height:34px;display:grid;place-items:center}
#game[data-route=recruit][data-recruit-pool=premium] .summon-button{background:linear-gradient(#fff7c4,#ffd967 24%,#eab54a 76%,#cc9434);border-color:#fff3b1;box-shadow:inset 0 0 0 2px #bd8433,inset 0 4px #fffbd077,0 4px #8b5d2a,0 0 17px #e5cc8152}
.recruit-quick-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-height:0}
#game[data-route=recruit] .recruit-quick-row .secondary{height:40px;min-height:40px;display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid #d4c28d;border-radius:14px;background:linear-gradient(#f3f2d0,#c9d6a6);box-shadow:inset 0 1px #fffce2,0 2px #52734c;color:#3c6242;font:14px/1.1 Jua,sans-serif;padding:4px 8px;filter:none;text-shadow:0 1px #f4f5cb}
#game[data-route=recruit] .recruit-quick-row .secondary small{font:8px KongSans,sans-serif;color:#7a8657}
#game[data-route=recruit] .recruit-quick-row .gold-recharge{background:linear-gradient(#fff1be,#e7cb86);border-color:#e9cf8c;color:#896930}.gold-recharge>span{font-size:19px}
.recruit-status-note{font:9px/1.3 KongSans,sans-serif;color:#cbdcba;text-align:center;margin:2px 0 0;text-shadow:0 1px #123f2c}
#game[data-route=recruit] #navigation{flex:0 0 68px;min-height:68px;border-top:2px solid #e1c07e;background:repeating-linear-gradient(3deg,#73502f00 0 11px,#3e30201f 12px 13px),linear-gradient(#916438,#65452c);border-radius:18px 18px 0 0;box-shadow:inset 0 3px #bd945c,0 -4px 13px #052e2699;padding:5px 7px max(5px,env(safe-area-inset-bottom));filter:none}
#game[data-route=recruit] #navigation .icon{width:36px;height:35px;object-fit:contain}
.gold-charge-heading{display:flex;align-items:center;gap:10px;margin:5px 0 14px;padding:12px;background:linear-gradient(#fff4ca,#ead599);border:1px solid #cdb173;border-radius:17px;color:#49633c}.gold-charge-heading>img{width:49px;height:49px;object-fit:contain;filter:drop-shadow(0 2px #9d8c4c55)}.gold-charge-heading b{display:block;font:18px Jua,sans-serif}.gold-charge-heading span{display:block;font:12px KongSans,sans-serif;margin-top:5px;color:#788254}.gold-charge-heading strong{color:#a3772f}
.gold-charge-products{display:grid;gap:8px}.gold-charge-products button{display:flex;align-items:center;gap:12px;padding:10px 12px;min-height:73px;border:1px solid #bfa66c;border-radius:16px;background:linear-gradient(#fff7d9,#ead69f);box-shadow:inset 0 0 0 2px #fff9de88,0 3px #92733e;color:#49603c;text-align:left;font:inherit}.gold-charge-products img{width:44px;height:44px;object-fit:contain}.gold-charge-products button>span{flex:1}.gold-charge-products b{display:block;font:24px/1 Jua,sans-serif;color:#8a6a2d}.gold-charge-products small{display:block;font:10px KongSans,sans-serif;color:#7f8158;margin-top:3px}.gold-charge-products button>strong{font:19px Jua,sans-serif;white-space:nowrap;color:#4c683d}.gold-charge-odds{font:11px/1.6 KongSans,sans-serif;text-align:center;color:#6f7950}.gold-charge-modal>.secondary{min-height:41px;font-size:15px;margin-top:7px}.gold-charge-modal .purchase-notice{font-size:10px;line-height:1.5}
@media(max-width:599px){#game[data-route=recruit]{width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}}
@container game (max-width:599px){#game[data-route=recruit] #screen,#game[data-route=recruit][data-recruit-pool=premium] #screen{grid-template-rows:47px 58px minmax(130px,1fr) 56px 137px;gap:7px;padding:7px 10px}.summon-title{padding:3px 10px;gap:7px}.summon-title>img{height:33px;width:33px}.summon-title h1{font-size:23px}.summon-title small{font-size:7px;letter-spacing:.4px}.summon-title>span{font-size:9px;padding:3px 6px}.recruit-pool-tabs button>img{height:29px;width:29px}.recruit-pool-tabs button b{font-size:19px}.recruit-pool-tabs button small{font-size:8px}#game[data-route=recruit] .recruit-pool-tabs button{gap:6px;border-radius:15px}.summon-preview-label{left:39px;right:39px;top:10px;font-size:8px;padding:4px 5px}.summon-theater:before,.summon-theater:after{height:60px;width:60px}#game[data-route=recruit] .summon-caption{bottom:8px;left:9px;right:9px;padding:6px 5px;border-radius:12px}#game[data-route=recruit] .summon-caption strong{font-size:19px}.summon-caption span{font-size:9px!important}.summon-odds-band{padding:6px 8px;gap:6px;border-radius:14px}.summon-odds-icon{font-size:23px;flex-basis:20px}.summon-odds-band b{font-size:13px}.summon-odds-band small{font-size:8px}.summon-odds-band>button{font-size:9px;padding:5px 6px}#game[data-route=recruit] .invite-cta{grid-template-rows:minmax(0,1fr) 38px 17px;gap:5px}.summon-button b{font-size:21px}.summon-button small{font-size:9px}.summon-button em{width:30px;height:30px;font-size:22px}#game[data-route=recruit] .recruit-quick-row .secondary{height:38px;min-height:38px;font-size:13px;padding:4px 6px}.recruit-status-note{font-size:8px}#game[data-route=recruit] #navigation{flex-basis:65px;min-height:65px;padding:4px 6px max(4px,env(safe-area-inset-bottom))}#game[data-route=recruit] #navigation .icon{height:33px;width:34px}#game[data-route=recruit] #navigation button{font-size:10px}}
@container game (max-width:650px) and (max-height:760px){
 #game #topbar.wallet-header{grid-template-rows:37px 33px;flex-basis:85px;min-height:85px;height:85px;padding-top:4px;padding-bottom:5px;gap:4px 8px}
 #game #topbar.wallet-header>.player-badge{height:37px}.wallet-header .avatar-frame{height:36px!important;width:36px!important;flex-basis:36px!important}.wallet-header .avatar-frame img{height:35px!important;width:35px!important}
 #game #topbar.wallet-header>.hud-corner{height:36px;width:36px;min-height:36px;min-width:36px;max-width:36px;padding:3px}
 #game #topbar.wallet-header .wallet-resource{height:33px;min-height:33px;padding:1px 7px 2px}
 #game #topbar.wallet-header .wallet-amount{height:19px}#game #topbar.wallet-header .wallet-amount b{font-size:13px}#game #topbar.wallet-header .wallet-amount .icon{width:19px;height:19px;flex-basis:19px}
 #game[data-route=recruit] #screen,#game[data-route=recruit][data-recruit-pool=premium] #screen{grid-template-rows:39px 48px minmax(95px,1fr) 46px 121px;gap:5px;padding:5px 9px}
 .summon-title>img{height:29px;width:29px}.summon-title h1{font-size:21px}.summon-title small{display:none}.summon-title>span{font-size:8px}.recruit-pool-tabs button>img{height:26px;width:26px}.recruit-pool-tabs button b{font-size:18px}.recruit-pool-tabs button small{font-size:7px}
 .summon-preview-label{top:8px;font-size:8px;padding:3px 5px}.summon-odds-band b{font-size:12px}.summon-odds-band small{font-size:8px}.summon-odds-band>button{font-size:8px}
 #game[data-route=recruit] .invite-cta{grid-template-rows:minmax(0,1fr) 33px 15px;gap:4px}#game[data-route=recruit] .recruit-quick-row .secondary{min-height:33px;height:33px;font-size:12px}
 .summon-button b{font-size:19px}.summon-button small{font-size:8px}.summon-button em{width:26px;height:26px;font-size:19px}.recruit-status-note{font-size:8px}
}
@media(prefers-reduced-motion:reduce){.summon-theater .pod-art.closed{animation:none}}
@media(max-width:599px) and (max-height:700px){
 .gold-charge-heading{gap:7px;padding:8px;margin:3px 0 8px}.gold-charge-heading>img{height:35px;width:35px}.gold-charge-heading b{font-size:14px;word-break:keep-all}.gold-charge-heading span{font-size:10px;margin-top:3px}
 .gold-charge-products{gap:6px}.gold-charge-products button{min-height:57px;padding:7px 9px;gap:8px}.gold-charge-products img{height:33px;width:33px}.gold-charge-products b{font-size:20px}.gold-charge-products small{font-size:9px;margin-top:2px}.gold-charge-products button>strong{font-size:16px}
 .gold-charge-odds{font-size:9px;line-height:1.45;margin:8px 0}.gold-charge-modal .purchase-notice{font-size:9px;line-height:1.4;margin:7px 0}.gold-charge-modal>.secondary{min-height:34px;font-size:13px;margin-top:4px}
}
