:root{
  --bg:#24101b; --bg2:#3a1828; --panel:#fff1cf; --panel2:#f3d99b; --ink:#271308;
  --brown:#7b4625; --brown2:#512d1e; --gold:#f0b32e; --gold2:#ffdf7b; --red:#b22234;
  --blue:#2d6eb8; --green:#66ad48; --muted:#7d6446; --shadow:0 8px 0 rgba(0,0,0,.28);
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--ink);background:linear-gradient(180deg,var(--bg),#12080f)}
a{text-decoration:none;color:inherit} button,input,select{font:inherit}
.app-main{padding:12px 10px 104px;max-width:1180px;margin:0 auto}.top-shell{position:sticky;top:0;z-index:50;background:linear-gradient(180deg,#351627,#160912);border-bottom:2px solid #553041;color:#fff;padding:10px 10px 12px}.brand-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;align-items:center;gap:10px;color:#fff}.brand-icon{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(#ffe386,#dc9824);border:3px solid #7c4822;box-shadow:var(--shadow);font-size:28px}.brand strong{font-size:26px;line-height:1}.brand small{display:block;color:#f4d99d;font-weight:700}.top-pills{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.top-action,.era-pill,.crown-pill{background:#673d2d;color:#fff4d4;border:1px solid #976a48;border-radius:999px;padding:10px 14px;font-weight:900;box-shadow:0 4px 0 rgba(0,0,0,.18)}.top-action{background:linear-gradient(#fff1c5,#d99a29);color:#2d160a;border-color:#8b541e}.resource-rail{display:flex;gap:8px;overflow-x:auto;padding-top:10px;scrollbar-width:none}.res-chip{position:relative;min-width:118px;display:flex;align-items:center;gap:10px;background:linear-gradient(#fff7d7,#e7bd6a);border:3px solid #845022;border-radius:20px;padding:10px 14px;box-shadow:0 5px 0 rgba(0,0,0,.25);font-size:22px;font-weight:1000}.res-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.3);font-size:24px}.res-rubies{background:linear-gradient(#ffd2e2,#c85176);color:#21020d}.res-tip{display:none;position:absolute;z-index:80;top:58px;left:0;width:210px;background:#1b0d15;color:#fff6d7;border:2px solid #f2c25b;border-radius:14px;padding:10px;font-size:13px;font-weight:700;line-height:1.45;box-shadow:var(--shadow)}.res-chip:hover .res-tip,.res-chip:focus .res-tip{display:block}.secure-account{position:fixed;z-index:90;right:10px;bottom:104px;background:#2e88d9;color:white;font-weight:900;border-radius:999px;padding:10px 14px;box-shadow:var(--shadow)}
.bottom-nav{position:fixed;z-index:60;left:0;right:0;bottom:0;display:flex;gap:8px;overflow-x:auto;background:linear-gradient(180deg,#211820,#161016);border-top:2px solid #5b4c42;border-radius:24px 24px 0 0;padding:10px 8px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 25px rgba(0,0,0,.35)}.nav-item{min-width:86px;display:grid;place-items:center;color:#fff1cc;font-weight:900;border-radius:20px;padding:8px 10px}.nav-item span{font-size:30px;line-height:1}.nav-item b{font-size:13px}.nav-item.active{background:linear-gradient(#ffe887,#d99318);color:#261205;box-shadow:0 6px 0 #8a551f}.toast-stack{position:fixed;z-index:200;left:12px;right:12px;top:132px;display:grid;gap:8px}.toast{background:#fff3cc;border:2px solid #a7652c;border-radius:14px;padding:10px 12px;font-weight:800;box-shadow:var(--shadow)}.toast.error{background:#ffd5d5;color:#5b0000}.toast.success{background:#dff7d1;color:#173c0d}
.panel{background:linear-gradient(180deg,#fff8df,#f1d492);border:4px solid #845026;border-radius:24px;padding:16px;box-shadow:var(--shadow);margin-bottom:14px}.panel.dark{background:linear-gradient(180deg,#342030,#20111b);color:#fff2c8}.hero{min-height:120px;display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{letter-spacing:.18em;text-transform:uppercase;color:#9f2636;font-weight:1000;font-size:13px}.hero h1{margin:4px 0 8px;font-size:clamp(32px,8vw,64px);line-height:.92}.hero p{margin:0;color:#806044;font-size:18px}.btn,.btn-small{border:3px solid #8b541d;background:linear-gradient(#ffe891,#d89419);border-radius:18px;padding:12px 18px;font-weight:1000;color:#2b1306;box-shadow:0 5px 0 #7b4c20;cursor:pointer}.btn-small{padding:8px 12px;border-radius:14px;font-size:14px}.btn.red{background:linear-gradient(#ff8d72,#b51f2e);color:white}.btn.blue{background:linear-gradient(#9bc5ff,#2f6ec6);color:white}.btn.ghost{background:linear-gradient(#fff,#e4d0a0)}.btn:disabled{filter:grayscale(1);opacity:.6}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.card{background:rgba(255,255,255,.42);border:2px solid rgba(111,73,34,.25);border-radius:18px;padding:12px}.muted{color:#7e674c}.stat-line{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid rgba(0,0,0,.08)}
.event-ribbons{position:fixed;z-index:45;right:8px;top:225px;display:grid;gap:8px}.event-ribbon{writing-mode:vertical-rl;transform:rotate(180deg);background:linear-gradient(#7f55d4,#315b9d);color:#fff;border:2px solid #8cb2ff;border-radius:16px;padding:12px 8px;font-weight:1000;box-shadow:var(--shadow);cursor:pointer}.event-modal{display:none;position:fixed;z-index:220;inset:0;background:rgba(0,0,0,.65);place-items:center;padding:20px}.event-modal.active{display:grid}.event-modal .panel{max-width:420px;width:100%}.kingdom-map{position:relative;height:min(66vh,760px);min-height:520px;overflow:hidden;border-radius:24px;background:radial-gradient(circle at 20% 18%,rgba(255,255,255,.18),transparent 6%),radial-gradient(circle at 78% 21%,rgba(255,255,255,.16),transparent 8%),linear-gradient(135deg,#74bd53,#2d7a37);border:4px solid #6c3d22;box-shadow:var(--shadow)}.kingdom-path{position:absolute;inset:12% 8%;border:20px dashed rgba(232,208,120,.5);border-color:transparent transparent rgba(232,208,120,.5) rgba(232,208,120,.5);border-radius:45%}.building-node{position:absolute;text-align:center;transform:translate(-50%,-50%);filter:drop-shadow(0 6px 3px rgba(0,0,0,.3))}.building-node img{image-rendering:pixelated;max-width:130px;max-height:130px}.building-node .label{display:inline-block;margin-top:-10px;background:rgba(24,55,20,.88);color:white;font-weight:1000;border-radius:999px;padding:4px 10px;text-shadow:0 2px 0 #000}.node-keep{left:54%;top:36%}.node-barracks{left:21%;top:49%}.node-farmstead{left:66%;top:70%}.node-lumberyard{left:31%;top:25%}.node-mine{left:82%;top:35%}.node-storehouse{left:25%;top:74%}.node-walls{left:50%;top:86%}.map-cta{position:absolute;left:16px;right:16px;bottom:16px;background:#b60013;color:#ffe840;border:4px solid #680010;border-radius:22px;padding:18px;text-align:center;font-size:clamp(26px,6vw,52px);font-weight:1000;text-shadow:0 4px 0 rgba(0,0,0,.25)}
.list{display:grid;gap:10px}.list-row{display:flex;align-items:center;gap:12px;justify-content:space-between;background:rgba(255,255,255,.45);border:2px solid rgba(111,73,34,.22);border-radius:18px;padding:12px}.list-row img{width:58px;height:58px;object-fit:contain;image-rendering:pixelated}.list-main{flex:1}.list-title{font-size:20px;font-weight:1000}.form-grid{display:grid;gap:10px}.field{display:grid;gap:5px}.field input,.field select,.field textarea{width:100%;border:2px solid #aa7b43;border-radius:14px;background:#fff8e8;padding:12px;font-weight:800}.tabs{display:flex;gap:8px;overflow-x:auto;margin-bottom:10px}.tab-btn{border:0;background:#5b3628;color:#fff0c9;border-radius:999px;padding:10px 14px;font-weight:1000;cursor:pointer}.tab-btn.active{background:#e6a11e;color:#1e0c04}.tab-panel{display:none}.tab-panel.active{display:block}.chat-box{height:48vh;overflow:auto;background:rgba(0,0,0,.08);border-radius:18px;padding:10px}.chat-msg{background:#fff6dd;border-radius:14px;padding:8px 10px;margin:6px 0}.chat-msg b{color:#8d2132}.chat-form{display:flex;gap:8px;margin-top:10px}.chat-form input{flex:1}
.world-wrap{height:calc(100vh - 230px);min-height:520px;position:relative;margin:-12px -10px 0;background:#1d522f}.world-hud{position:absolute;z-index:5;left:10px;top:10px;right:80px}.world-card{display:inline-block;background:rgba(255,242,207,.94);border:3px solid #805026;border-radius:18px;padding:10px;box-shadow:var(--shadow)}#world-game{position:absolute;inset:0}.map-controls{position:absolute;right:10px;top:16px;z-index:6;display:grid;gap:10px}.map-controls button{width:58px;height:58px;border-radius:18px;border:3px solid #8b541d;background:linear-gradient(#ffe891,#d89419);font-size:24px;font-weight:1000;box-shadow:0 5px 0 #7b4c20}.tile-modal{display:none;position:absolute;left:10px;right:10px;bottom:12px;z-index:10;background:#fff2cf;border:4px solid #7d4a24;border-radius:22px;padding:12px;box-shadow:var(--shadow)}.tile-modal.active{display:block}.slider-row{display:grid;grid-template-columns:90px 1fr 48px;gap:8px;align-items:center;margin:8px 0}.slider-row input{width:100%}.modal-actions{display:flex;gap:8px;overflow-x:auto}.battle-canvas-wrap{height:62vh;min-height:420px;background:#4e8b3a;border-radius:22px;overflow:hidden;border:4px solid #6c3d22}.battle-result{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pass-track{display:flex;gap:10px;overflow-x:auto;padding:10px 0}.pass-tier{min-width:150px;text-align:center;background:#fff7dd;border:3px solid #a36d2b;border-radius:20px;padding:12px;position:relative}.pass-tier.locked{filter:grayscale(.8);opacity:.55}.pass-tier.claimed{background:#dff6d5}.reward-anim{position:fixed;z-index:300;pointer-events:none;font-size:28px;animation:flyReward .8s ease-out forwards}@keyframes flyReward{to{transform:translateY(-90px) scale(.6);opacity:0}}
.auth-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(rgba(20,10,15,.15),rgba(20,10,15,.65)),linear-gradient(#5aa44e,#2f733c);overflow:hidden}.auth-march{position:absolute;inset:0;background-image:url('/static/game/img/tiny_swords/warrior_blue_unit.png'),url('/static/game/img/tiny_swords/warrior_red_unit.png');background-size:74px auto,74px auto;background-repeat:repeat;opacity:.28;animation:marchBg 18s linear infinite;image-rendering:pixelated}@keyframes marchBg{from{background-position:0 0,40px -80px}to{background-position:0 520px,40px 440px}}.auth-card{position:relative;z-index:2;width:min(420px,92vw);background:rgba(255,241,207,.96);border:4px solid #835126;border-radius:26px;padding:24px;box-shadow:var(--shadow)}.auth-card h1{font-size:42px;margin:0 0 12px}.auth-card form{display:grid;gap:10px}.auth-card input{width:100%;padding:13px;border:2px solid #9e6f38;border-radius:14px;background:white}.auth-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
@media (max-width:760px){.app-main{padding:10px 8px 104px}.brand-icon{width:48px;height:48px}.brand strong{font-size:22px}.top-pills{gap:6px}.era-pill,.crown-pill,.top-action{padding:8px 10px}.grid-2,.grid-3{grid-template-columns:1fr}.hero{display:block}.world-wrap{height:calc(100vh - 236px);min-height:470px}.kingdom-map{min-height:540px}.building-node img{max-width:92px;max-height:92px}.node-keep{left:54%;top:38%}.node-mine{left:80%;top:37%}.node-farmstead{left:66%;top:66%}.event-ribbons{top:270px}.resource-rail{margin-left:-2px}.res-chip{min-width:104px;font-size:20px;padding:9px 12px}.bottom-nav{border-radius:22px 22px 0 0}.nav-item{min-width:78px}.chat-box{height:40vh}}

/* --- July overhaul: modern fantasy UI pass --- */
:root{
  --bg-plum:#120912;
  --bg-berry:#2a1123;
  --ink-gold:#f7e2a2;
  --edge-gold:#a86c2a;
  --glow-gold:rgba(255,210,104,.28);
  --rose:#ad2246;
  --panel-cream:#fff8e8;
}
body{background:
  radial-gradient(circle at top right, rgba(145,32,67,.22), transparent 28%),
  radial-gradient(circle at top left, rgba(129,81,214,.14), transparent 22%),
  linear-gradient(180deg,#180912 0%, #2a1024 42%, #140810 100%);
}
.top-shell{background:linear-gradient(180deg, rgba(32,10,23,.98), rgba(18,7,13,.94)); border-bottom-color:rgba(255,220,164,.14); box-shadow:0 18px 40px rgba(0,0,0,.35)}
.brand-icon{box-shadow:0 10px 24px rgba(0,0,0,.25), 0 0 0 3px rgba(255,220,140,.18) inset}
.top-action,.era-pill,.crown-pill{box-shadow:0 8px 18px rgba(0,0,0,.22)}
.resource-rail{padding-bottom:2px}
.res-chip{background:linear-gradient(180deg, rgba(255,244,212,.96), rgba(228,190,108,.94)); box-shadow:0 10px 22px rgba(0,0,0,.22)}
.res-rubies{background:linear-gradient(180deg,#ffd8e4,#d86b83); color:#2a0913}
.bottom-nav{background:linear-gradient(180deg, rgba(27,18,28,.98), rgba(15,12,16,.98)); backdrop-filter:blur(10px)}
.nav-item{transition:transform .15s ease, background .15s ease}.nav-item:hover{transform:translateY(-2px)}
.panel{background:linear-gradient(180deg, rgba(255,251,235,.96), rgba(241,214,150,.96)); box-shadow:0 16px 36px rgba(0,0,0,.22)}
.glass-panel{position:relative; overflow:hidden}
.glass-panel::after{content:""; position:absolute; inset:0; background:linear-gradient(120deg, rgba(255,255,255,.2), transparent 20%, transparent 80%, rgba(255,255,255,.14)); pointer-events:none}
.hero-compact{min-height:unset}
.section-head{display:flex; gap:10px; justify-content:space-between; align-items:center; margin-bottom:12px; flex-wrap:wrap}
.pill-soft,.hero-pill-row .pill-soft{display:inline-flex; align-items:center; gap:6px; padding:8px 12px; background:rgba(84,37,34,.08); color:#583824; border:1px solid rgba(133,82,38,.22); border-radius:999px; font-size:13px; font-weight:900}
.hero-pill-row{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.hero-actions-vertical{display:grid; gap:10px; align-items:start}
.modern-home-hero,.modern-pass-hero{background:linear-gradient(135deg, rgba(255,247,224,.96), rgba(244,219,159,.96)); position:relative}
.modern-home-hero::before,.modern-pass-hero::before{content:""; position:absolute; right:-40px; top:-40px; width:180px; height:180px; background:radial-gradient(circle, rgba(255,225,143,.34), transparent 65%)}
.pulse-btn,.pulse-chip{animation:softPulse 1.9s ease-in-out infinite}
@keyframes softPulse{0%,100%{transform:scale(1); box-shadow:0 0 0 0 rgba(255,211,106,.2)}50%{transform:scale(1.02); box-shadow:0 0 0 12px rgba(255,211,106,0)}}
.modern-kingdom-map{background:
  radial-gradient(circle at 16% 16%, rgba(255,255,255,.18), transparent 6%),
  radial-gradient(circle at 80% 22%, rgba(255,255,255,.12), transparent 7%),
  linear-gradient(135deg,#7fcd5d,#4f9a3a 60%, #3f7c30);}
.emoji-node{font-size:74px; line-height:1; display:block}
.building-node{transition:transform .16s ease}.building-node:hover{transform:translate(-50%,-53%)}
.building-node img{max-width:110px; max-height:110px}
.modern-world-wrap{border-radius:28px; overflow:hidden; border:4px solid rgba(255,223,165,.15); box-shadow:0 18px 40px rgba(0,0,0,.3)}
.modern-world-card{background:rgba(255,247,222,.96); backdrop-filter:blur(8px)}
.modern-modal{background:linear-gradient(180deg, rgba(255,245,220,.98), rgba(245,219,161,.98)); max-width:720px; left:14px; right:14px; margin:0 auto}
.slider-help{margin:8px 0 12px; padding:10px 12px; background:rgba(91,54,40,.08); border-radius:14px; font-weight:700; color:#6b553d}
.tile-output{white-space:pre-wrap; font-weight:800; background:rgba(255,255,255,.4); padding:10px; border-radius:14px; min-height:44px}
.upgrade-hero-card{display:flex; gap:12px; align-items:center; background:rgba(255,255,255,.42); padding:14px; border-radius:18px; margin-bottom:12px}
.upgrade-hero-card p{margin:4px 0 0; color:#6d543c}
.upgrade-icon{width:48px; height:48px; border-radius:16px; display:grid; place-items:center; background:linear-gradient(180deg,#ffefb4,#e2a726); font-size:24px; box-shadow:0 6px 14px rgba(0,0,0,.16)}
.resource-cost-row{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px}.resource-cost-row span{padding:7px 10px; border-radius:999px; background:rgba(255,255,255,.45); font-weight:900; border:1px solid rgba(122,76,30,.18)}
.queue-card{background:rgba(255,255,255,.5); border:2px solid rgba(117,71,31,.14); border-radius:20px; padding:14px; margin-bottom:12px}
.queue-topline{display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap}
.queue-state{display:block; color:#825e3f; font-size:13px; font-weight:800; margin-top:4px}.queue-small-meta{font-size:13px; font-weight:900; color:#6d4a32}
.queue-progress{margin:10px 0; height:12px; border-radius:999px; background:rgba(64,28,15,.12); overflow:hidden}.queue-progress span{display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#6e63ff,#42b0ff)}
.queue-meta-grid{display:flex; gap:10px; flex-wrap:wrap; color:#72583f; font-size:13px; font-weight:800}
.empty-state{display:grid; place-items:center; text-align:center; gap:6px; padding:20px; border-radius:22px; background:rgba(255,255,255,.34); border:2px dashed rgba(127,85,51,.22)}
.empty-icon{font-size:28px}.compact-empty p{margin:0; max-width:440px; color:#74573a}
.recruit-list{display:grid; gap:12px}
.recruit-card{display:grid; grid-template-columns:74px 1fr; gap:14px; align-items:start; padding:14px; border-radius:20px; background:rgba(255,255,255,.52); border:2px solid rgba(118,73,32,.14)}
.recruit-icon{width:68px; height:68px; object-fit:contain; image-rendering:pixelated; align-self:center}
.recruit-row-head{display:flex; gap:10px; justify-content:space-between; flex-wrap:wrap; align-items:start}
.castle-count-pill{white-space:nowrap; background:linear-gradient(180deg,#fff3c4,#f0cc7a); color:#5f381d; padding:8px 12px; border-radius:999px; font-size:13px; font-weight:1000; border:1px solid rgba(129,76,26,.24)}
.small-copy{font-size:13px; margin-top:3px}
.recruit-actions{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:10px}
.stepper-label{font-weight:900; color:#684629}.stepper-wrap{display:flex; gap:12px; align-items:center; flex-wrap:wrap}.qty-input{max-width:100px; background:#fffef6; border:2px solid rgba(141,93,49,.3); border-radius:14px; padding:10px 12px; font-weight:900}
.helper-copy{font-size:13px; font-weight:800; color:#6a5137}
.battle-pass-progress-bar{height:18px; border-radius:999px; overflow:hidden; background:rgba(49,22,18,.12); margin-bottom:12px}.battle-pass-progress-bar span{display:block; height:100%; background:linear-gradient(90deg,#ffcc3c,#ff7c32,#ff4c7b)}
.pass-tier{box-shadow:0 10px 18px rgba(0,0,0,.1); transition:transform .15s ease}.pass-tier:hover{transform:translateY(-2px)}
.pass-tier-head{display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:10px}.pass-reward-block{background:rgba(255,255,255,.6); border-radius:14px; padding:10px; min-height:68px; margin-bottom:10px; font-weight:800}
.premium-tier{background:linear-gradient(180deg,#fce8ff,#ecd0ff)}
.shop-card{text-align:left}.shop-ruby{width:54px; height:54px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(180deg,#ffd0da,#d14769); color:#480014; font-size:28px; font-weight:1000; margin-bottom:10px}.shop-amount{font-size:32px; font-weight:1000; line-height:1; margin:10px 0 8px}.shop-footer{display:flex; justify-content:space-between; gap:12px; align-items:center; margin-top:12px}
.auth-body{position:relative; background:linear-gradient(180deg, rgba(11,5,10,.18), rgba(11,5,10,.72)), linear-gradient(180deg,#5ba04a,#2f7136 55%, #15341f)}
.auth-battlefield{position:absolute; inset:0; background:radial-gradient(circle at center, rgba(255,216,136,.18), transparent 18%), linear-gradient(180deg, transparent 0 52%, rgba(71,29,34,.18) 52% 100%)}
.auth-card-large{max-width:460px; background:linear-gradient(180deg, rgba(255,247,225,.98), rgba(243,220,164,.96)); backdrop-filter:blur(8px)}
.auth-card-large::after{content:""; position:absolute; right:-34px; top:-34px; width:120px; height:120px; background:radial-gradient(circle, rgba(255,220,145,.4), transparent 65%)}
.auth-form p{display:grid; gap:6px; margin:0}.auth-form label{font-weight:900; color:#553018}.auth-form ul.errorlist{margin:0; padding-left:18px; color:#8e102f; font-weight:700}.styled-form p{display:grid; gap:6px}.styled-form label{font-weight:900; color:#553018}
@media (max-width:760px){
  .recruit-card{grid-template-columns:1fr}
  .recruit-icon{width:56px; height:56px}
  .hero-actions-vertical{width:100%}
  .shop-footer,.queue-topline,.recruit-row-head{align-items:flex-start}
  .modern-modal{left:8px; right:8px}
}

.top-shell{position:sticky; top:0; z-index:50; background:linear-gradient(180deg,rgba(33,5,18,.97),rgba(36,7,24,.92)); backdrop-filter:blur(10px); border-bottom:1px solid rgba(255,255,255,.08)}
.brand-row{display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 20px 12px; flex-wrap:wrap}
.brand{display:flex; align-items:center; gap:14px; color:#fff4e1; text-decoration:none}.brand strong{display:block; font-size:18px}.brand small{display:block; opacity:.85; font-weight:800}.brand-icon{width:48px; height:48px; border-radius:16px; display:grid; place-items:center; background:linear-gradient(180deg,#fceaa4,#e5a92f); color:#5b270f; font-size:25px; box-shadow:0 8px 18px rgba(0,0,0,.22)}
.top-pills{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.top-action,.era-pill,.crown-pill{display:inline-flex; align-items:center; gap:8px; padding:12px 16px; border-radius:20px; text-decoration:none; font-weight:1000; color:#fff2d3; background:linear-gradient(180deg,#f5d675,#c88723); box-shadow:inset 0 -4px 0 rgba(112,58,16,.35)}
.top-action.top-store{background:linear-gradient(180deg,#ffd770,#f39d2f); color:#53250d}
.era-pill,.crown-pill{background:rgba(255,255,255,.12); color:#fff}
.resource-rail{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; padding:0 20px 18px}
.res-chip{position:relative; display:flex; align-items:center; gap:12px; padding:16px 18px; background:linear-gradient(180deg,#f5e6bd,#ddbf7b); border-radius:22px; font-weight:1000; color:#fffdf9; border:2px solid rgba(138,78,26,.2); box-shadow:0 12px 18px rgba(0,0,0,.12), inset 0 -5px 0 rgba(136,76,28,.24)}
.res-value{font-size:20px; color:#fff}.res-icon{font-size:28px}
.res-rubies{background:linear-gradient(180deg,#ffd7ea,#f195b3); color:#4b1120}
.res-tip{display:none; position:absolute; top:calc(100% + 10px); left:0; width:240px; padding:12px 14px; border-radius:16px; background:rgba(35,16,12,.95); color:#fff; font-size:12px; line-height:1.45; box-shadow:0 12px 24px rgba(0,0,0,.35)}
.res-chip:hover .res-tip,.res-chip:focus .res-tip{display:block}
.secure-account{position:fixed; right:20px; bottom:104px; z-index:40; padding:16px 26px; border-radius:999px; background:linear-gradient(180deg,#55b4ff,#2d7ddd); color:#fff; text-decoration:none; font-weight:1000; box-shadow:0 12px 20px rgba(0,0,0,.2)}
.app-main{padding:18px 18px 110px}
.toast-stack{display:grid; gap:10px; margin-bottom:14px}.toast{padding:12px 16px; border-radius:16px; background:rgba(255,247,229,.94); border:1px solid rgba(126,73,31,.16); transform:translateY(-4px); opacity:0; transition:.2s ease}.toast.show{transform:none; opacity:1}
.hero.compact-hero{display:flex; justify-content:space-between; gap:18px; align-items:center; flex-wrap:wrap}
.bottom-nav{position:fixed; left:0; right:0; bottom:0; z-index:60; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; padding:10px 10px calc(10px + env(safe-area-inset-bottom)); background:linear-gradient(180deg,rgba(23,6,16,.95),rgba(17,5,16,.98)); border-top:1px solid rgba(255,255,255,.08)}
.nav-item{display:grid; place-items:center; gap:4px; padding:12px 4px; border-radius:22px; text-decoration:none; color:#fff6dd; font-weight:1000; transition:transform .15s ease, background .15s ease}.nav-item span{font-size:24px}.nav-item.active{background:linear-gradient(180deg,#f3d36e,#ddad31); color:#381707; box-shadow:inset 0 -4px 0 rgba(120,72,22,.3)}
.pressing{transform:scale(.96)!important; filter:brightness(1.06)}
.grid-2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px}
.w-full{width:100%}.between{display:flex; justify-content:space-between; gap:12px; align-items:center}.wrap{flex-wrap:wrap}.subpanel{margin-top:16px; padding-top:16px; border-top:1px solid rgba(98,60,32,.12)}
.inline-form{display:flex; gap:10px; flex-wrap:wrap}.inline-form select,.stack-form select,.stack-form input,.stack-form textarea,.auth-form input,.auth-form select,.styled-form input,.styled-form select,.styled-form textarea{padding:12px 14px; border-radius:14px; border:2px solid rgba(131,82,40,.18); background:#fffdf8; font-weight:700}
.alliance-card-big{display:flex; gap:14px; align-items:flex-start; margin-bottom:12px}.alliance-badge{min-width:62px; height:62px; border-radius:18px; display:grid; place-items:center; color:#fff; font-weight:1000; font-size:22px; box-shadow:0 10px 18px rgba(0,0,0,.18)}
.action-row{display:flex; gap:8px; align-items:center}.badge{display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(76,48,24,.1); color:#6b4428; font-size:12px; font-weight:1000}.badge.ok{background:#d4f7db; color:#1d6d34}.badge.premium{background:linear-gradient(180deg,#ecd8ff,#cda2ff); color:#4e2375}
.cardy{background:rgba(255,255,255,.52); border:1px solid rgba(124,76,28,.14); border-radius:18px}
.progress{height:12px; border-radius:999px; background:rgba(49,22,18,.12); overflow:hidden; margin-top:10px}.progress span{display:block; height:100%; background:linear-gradient(90deg,#ffd34a,#ff8f34)}
.pass-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px}.pass-card{padding:16px; border-radius:22px; background:rgba(255,255,255,.5); border:2px solid rgba(124,76,28,.12)}.pass-card.unlocked{box-shadow:0 10px 18px rgba(0,0,0,.08)}.pass-card.locked{opacity:.8}
.pass-tier-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-weight:1000}.pass-track-columns{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px}.pass-track-columns ul{margin:0 0 10px; padding-left:18px}.premium-side{background:linear-gradient(180deg,rgba(244,231,255,.85),rgba(223,207,255,.72)); padding:12px; border-radius:18px}
.offer-grid,.bundle-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px}.offer-card,.bundle-card{padding:16px; border-radius:20px; background:rgba(255,255,255,.54); border:2px solid rgba(124,76,28,.12)}.offer-top{display:flex; justify-content:space-between; gap:10px; margin-bottom:8px; align-items:center}.bundle-rubies{font-size:24px; font-weight:1000}.bundle-price{font-size:30px; font-weight:1000; color:#6a2b11}
.world-mini{position:absolute; right:18px; bottom:18px; width:220px; z-index:20}.world-mini canvas{width:100%; height:auto; border-radius:14px; background:#123}
.map-controls button,.btn,.btn-small{transition:transform .12s ease, filter .12s ease}
.btn.gold,.btn-small.gold{background:linear-gradient(180deg,#ffe991,#e0a62f); color:#53270b}
@media (max-width:980px){.resource-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2,.pass-grid,.offer-grid,.bundle-grid{grid-template-columns:1fr}.world-mini{width:180px}}
@media (max-width:720px){.brand-row{padding:14px 14px 10px}.resource-rail{padding:0 14px 14px; grid-template-columns:repeat(2,minmax(0,1fr))}.top-pills{width:100%}.top-action,.era-pill,.crown-pill{padding:10px 14px}.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))}.nav-item b{font-size:12px}.world-mini{display:none}.secure-account{bottom:92px; right:12px; padding:14px 20px}}


/* v5 polish: cleaner 2026 mobile strategy direction */
body{
  background:
    radial-gradient(circle at 20% 0%, rgba(95,42,191,.26), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(221,54,95,.16), transparent 28%),
    linear-gradient(180deg,#130311 0%,#2b0823 44%,#12030f 100%) !important;
}
.top-shell{background:linear-gradient(180deg,rgba(24,3,20,.98),rgba(45,9,35,.94))!important}
.top-action.top-store{background:linear-gradient(180deg,#ffe57f,#f1a400)!important;color:#341602!important}
.res-chip{border-radius:18px!important;background:linear-gradient(180deg,#fff0bd,#d9aa53)!important;box-shadow:0 10px 22px rgba(0,0,0,.22), inset 0 -5px rgba(126,73,18,.28)!important}
.res-rubies{background:linear-gradient(180deg,#ffb6c7,#df4d68)!important;color:#260009!important}
.bottom-nav{background:linear-gradient(180deg,rgba(23,9,23,.88),rgba(9,5,12,.98))!important;backdrop-filter:blur(14px)}
.nav-item.active{background:linear-gradient(180deg,#ffe681,#e5a20b)!important;box-shadow:0 8px 18px rgba(235,164,17,.24), inset 0 -5px rgba(110,58,0,.25)!important}
.home-stage{position:relative; max-width:1100px; margin:0 auto;}
.home-hud-card{position:absolute; top:18px; left:18px; z-index:10; padding:18px 22px; border-radius:24px; background:linear-gradient(180deg,rgba(255,248,228,.95),rgba(234,199,120,.92)); border:3px solid rgba(116,66,26,.35); box-shadow:0 14px 28px rgba(0,0,0,.22)}
.home-hud-card h1{margin:2px 0 4px; font-size:clamp(28px,4vw,58px)}
.home-overlay-actions{position:absolute; z-index:12; left:20px; bottom:22px; display:grid; gap:12px}
.round-action{width:92px; min-height:92px; border-radius:28px; display:grid; place-items:center; gap:2px; text-decoration:none; border:4px solid rgba(85,45,14,.35); background:linear-gradient(180deg,#fff2a8,#eba726); box-shadow:0 12px 22px rgba(0,0,0,.25), inset 0 -6px rgba(126,68,8,.24); font-size:34px; font-weight:1000; color:#3b1704}
.round-action span{font-size:12px; display:block}.round-action.disabled{filter:saturate(.6);opacity:.85}
.home-full-town{min-height:680px; width:100%; max-width:none; margin:0; border-radius:30px; overflow:hidden}
.home-full-town .map-cta{display:none!important}
.home-full-town .building-node img{max-width:145px; max-height:145px}.home-full-town .emoji-node{font-size:96px}
.home-full-town .node-keep{left:50%; top:32%}.home-full-town .node-barracks{left:22%; top:48%}.home-full-town .node-lumberyard{left:31%; top:22%}.home-full-town .node-mine{left:78%; top:34%}.home-full-town .node-farmstead{left:64%; top:66%}.home-full-town .node-storehouse{left:33%; top:72%}.home-full-town .node-walls{left:52%; top:90%}
.inbox-item{display:block; border-radius:20px; margin-bottom:12px; background:rgba(255,255,255,.50); border:2px solid rgba(124,76,28,.13); overflow:hidden}
.inbox-item summary{cursor:pointer; display:grid; grid-template-columns:auto 1fr auto auto; gap:12px; align-items:center; padding:16px 18px}
.inbox-item.unread summary{font-weight:1000; background:linear-gradient(90deg,rgba(255,214,84,.24),transparent)}
.inbox-item.read{opacity:.76}.inbox-body{padding:0 18px 16px}.inbox-title{font-size:18px}.inbox-date{color:#735841;font-size:13px}
.garrison-popup{max-width:560px;margin:10vh auto}.garrison-list img{width:42px;height:42px;image-rendering:pixelated}
.world-wrap{height:calc(100vh - 245px)!important; min-height:560px}
.slider-row{display:grid; grid-template-columns:110px 1fr 72px; gap:10px; align-items:center; margin:10px 0}.slider-row input{accent-color:#f0a800}
.store-stage{max-width:1180px;margin:0 auto}.store-hero-card{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:18px;padding:28px;border-radius:32px;background:linear-gradient(135deg,#5924d1,#ba2a5e 62%,#f0ae29);color:#fff;box-shadow:0 22px 42px rgba(0,0,0,.28);border:3px solid rgba(255,255,255,.18)}
.store-hero-card h1{font-size:clamp(32px,5vw,64px);margin:0 0 8px}.store-hero-card p{font-weight:800;opacity:.92}.pass-buy{background:linear-gradient(180deg,#fff487,#f4a700)!important;color:#451a00!important}
.shop-section{margin-bottom:22px}.deluxe-card,.ruby-card{position:relative;overflow:hidden;min-height:245px;background:linear-gradient(180deg,#fff7db,#e9c264)!important;border-radius:28px!important;border:4px solid rgba(125,69,12,.22)!important;box-shadow:0 18px 32px rgba(0,0,0,.22)!important}
.deluxe-card:before,.ruby-card:before{content:"";position:absolute;inset:-40% -20% auto auto;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.24)}
.offer-art{height:92px;display:grid;place-items:center}.offer-art img{height:92px;image-rendering:pixelated;filter:drop-shadow(0 8px 0 rgba(0,0,0,.18))}
.buy-button{width:100%;justify-content:center}
.ruby-pile{width:88px;height:88px;border-radius:28px;background:linear-gradient(180deg,#ffb6ca,#dc2850);display:grid;place-items:center;font-size:48px;font-weight:1000;color:#5b0012;box-shadow:0 10px 0 rgba(93,0,25,.22)}
.ruby-card .bundle-price{font-size:38px;color:#fff;text-shadow:0 3px 0 #000;background:#111827;border-radius:18px;padding:8px 14px;display:inline-block}
.alliance-stage{max-width:1180px;margin:0 auto}.alliance-hero{background:linear-gradient(135deg,#f8e9bf,#e0bb6b)!important}
.alliance-dashboard{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.alliance-command-card{min-height:245px}.alliance-header-card{display:flex;gap:16px;align-items:center}.stat-grid.small{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.stat-grid.small div{padding:12px;border-radius:18px;background:rgba(255,255,255,.5);text-align:center}.stat-grid.small b{display:block;font-size:20px}.stat-grid.small span{font-size:12px;color:#75563b;font-weight:800}
.roster-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.member-card{display:grid;grid-template-columns:54px 1fr;gap:12px;align-items:center;padding:14px;border-radius:20px;background:rgba(255,255,255,.55);border:2px solid rgba(124,76,28,.12)}.member-card.leader{background:linear-gradient(180deg,#fff3bf,#e7bd54)}.member-avatar{width:54px;height:54px;border-radius:18px;background:#281428;color:#fff;display:grid;place-items:center;font-size:28px}.member-main h3{margin:0}.member-main p{margin:2px 0 0;color:#76533b}.member-actions{grid-column:1 / -1;display:flex;gap:8px;flex-wrap:wrap}
.auth-body.cinematic-auth{overflow:hidden;background:#101827!important}.auth-battle-loop{position:absolute;inset:0;overflow:hidden;background:linear-gradient(180deg,rgba(20,31,33,.2),rgba(8,13,18,.65)),radial-gradient(circle at 50% 30%,rgba(255,221,107,.18),transparent 24%),linear-gradient(180deg,#5aa449,#2c6c36 62%,#162a28)}
.battle-row{position:absolute;display:flex;gap:8px;left:-10%;right:-10%;justify-content:center}.battle-row img{width:42px;height:42px;image-rendering:pixelated;filter:drop-shadow(0 5px 0 rgba(0,0,0,.2))}.blue-row{bottom:38%;animation:blueAdvance 5.5s linear infinite}.red-row{top:38%;animation:redAdvance 5.5s linear infinite}.red-row img{transform:rotate(180deg)}
.spark-field{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:44px;color:#fff4a8;text-shadow:0 3px #000;animation:sparkPulse 1.4s ease-in-out infinite}
@keyframes blueAdvance{0%{transform:translateY(70px)}50%{transform:translateY(0)}100%{transform:translateY(70px)}}@keyframes redAdvance{0%{transform:translateY(-70px)}50%{transform:translateY(0)}100%{transform:translateY(-70px)}}@keyframes sparkPulse{0%,100%{opacity:.3;transform:translate(-50%,-50%) scale(.8)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}}
.auth-card-large{position:relative;z-index:3;box-shadow:0 28px 70px rgba(0,0,0,.48)!important}
@media (max-width:760px){.home-hud-card{position:relative;left:auto;top:auto;margin-bottom:12px}.home-overlay-actions{left:12px;bottom:18px}.home-full-town{min-height:560px}.round-action{width:76px;min-height:76px}.world-wrap{height:calc(100vh - 310px)!important}.inbox-item summary{grid-template-columns:auto 1fr}.inbox-date{display:none}.alliance-dashboard{grid-template-columns:1fr}.store-hero-card{border-radius:24px;padding:20px}.offer-grid,.bundle-grid{grid-template-columns:1fr!important}}


/* v6: compact top HUD, full home map, working resource details, queue progress */
.top-shell{
  position:sticky!important;
  top:0!important;
  padding:10px 14px!important;
}
.brand-row{
  align-items:center!important;
}
.brand-icon{
  width:42px!important;
  height:42px!important;
  border-radius:14px!important;
  font-size:22px!important;
}
.brand strong{font-size:20px!important}
.brand small{font-size:13px!important}
.top-pills{
  gap:8px!important;
}
.top-action,.era-pill,.crown-pill{
  min-height:44px!important;
  padding:9px 14px!important;
  border-radius:19px!important;
  font-size:14px!important;
}
.profile-action{
  max-width:150px;
}
.resource-rail{
  display:flex!important;
  grid-template-columns:none!important;
  gap:8px!important;
  overflow-x:auto!important;
  padding:8px 0 0!important;
  scrollbar-width:none!important;
}
.resource-rail::-webkit-scrollbar{display:none}
.res-chip{
  min-width:104px!important;
  width:auto!important;
  height:44px!important;
  flex:0 0 auto!important;
  padding:7px 11px!important;
  border-radius:16px!important;
  font-size:15px!important;
  box-shadow:0 6px 12px rgba(0,0,0,.20), inset 0 -4px rgba(126,73,18,.22)!important;
}
.res-value{
  font-size:16px!important;
  color:#fff!important;
}
.res-icon{
  width:29px!important;
  height:29px!important;
  font-size:18px!important;
}
.res-tip{
  display:none!important;
  position:fixed!important;
  top:112px!important;
  left:12px!important;
  right:12px!important;
  width:auto!important;
  max-width:420px!important;
  z-index:250!important;
  padding:14px 16px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#251019,#12070d)!important;
  color:#fff6d7!important;
  border:2px solid #f2c25b!important;
  box-shadow:0 18px 38px rgba(0,0,0,.42)!important;
  font-size:13px!important;
  line-height:1.35!important;
}
.res-chip:hover .res-tip,.res-chip:focus .res-tip{display:none!important}
.res-chip.active .res-tip{display:block!important}
.res-breakdown{
  display:grid;
  gap:4px;
  margin-top:10px;
}
.res-breakdown strong{
  color:#ffd866;
  margin-top:5px;
}
.res-breakdown span{
  display:block;
  color:#fffbe9;
  opacity:.94;
}
.res-netline{
  font-size:16px;
  font-weight:1000;
  color:#fff;
}

body[data-page="home"] .app-main{
  max-width:none!important;
  width:100%!important;
  padding:0 0 calc(96px + env(safe-area-inset-bottom))!important;
  margin:0!important;
}
.home-stage{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
.home-hud-card{display:none!important}
.home-overlay-actions{
  left:16px!important;
  top:18px!important;
  bottom:auto!important;
  z-index:15!important;
  grid-template-columns:1fr!important;
}
.round-action{
  width:82px!important;
  min-height:82px!important;
  border-radius:22px!important;
  font-size:28px!important;
  background:linear-gradient(180deg,#fff29b,#efa51e)!important;
}
.round-action span{
  font-size:11px!important;
  line-height:1.1!important;
  padding:0 4px;
}
.round-action.event{
  background:linear-gradient(180deg,#d7c7ff,#7753d8)!important;
  color:#fff!important;
}
.round-action.pass{
  background:linear-gradient(180deg,#b3ecff,#2e87d7)!important;
  color:#061d34!important;
}
.home-full-town{
  width:100vw!important;
  max-width:none!important;
  height:calc(100vh - 174px - 92px)!important;
  min-height:540px!important;
  margin:0!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
}
.home-full-town .building-node img{max-width:120px!important;max-height:120px!important}
.home-full-town .emoji-node{font-size:78px!important}
.home-full-town .node-keep{left:52%!important;top:29%!important}
.home-full-town .node-lumberyard{left:32%!important;top:17%!important}
.home-full-town .node-mine{left:74%!important;top:31%!important}
.home-full-town .node-barracks{left:24%!important;top:45%!important}
.home-full-town .node-storehouse{left:36%!important;top:66%!important}
.home-full-town .node-farmstead{left:63%!important;top:61%!important}
.home-full-town .node-walls{left:54%!important;top:82%!important}
.event-modal .glass-panel{
  max-width:520px!important;
}
.queue-progress-block{
  display:grid;
  gap:5px;
  margin-top:10px;
}
.queue-progress-block label{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
  font-weight:1000;
  color:#6c4b33;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.queue-progress,.progress.queue-progress{
  height:14px!important;
  background:rgba(45,20,10,.16)!important;
  border-radius:999px!important;
  overflow:hidden!important;
  box-shadow:inset 0 2px 3px rgba(0,0,0,.16);
}
.queue-progress span,.progress.queue-progress span{
  height:100%!important;
  display:block!important;
  background:linear-gradient(90deg,#ffdb5c,#ff9a32)!important;
  transition:width .25s linear!important;
}
.queue-progress.current span,.progress.queue-progress.current span{
  background:linear-gradient(90deg,#85e7ff,#2e90e8)!important;
}
.pass-track-shell{
  max-width:980px;
  margin:0 auto 110px;
  display:grid;
  grid-template-columns:120px 1fr 1fr;
  gap:12px;
}
.pass-track-label{
  position:sticky;
  top:148px;
  z-index:2;
  padding:12px;
  border-radius:18px;
  font-weight:1000;
  text-align:center;
  box-shadow:0 8px 16px rgba(0,0,0,.18);
}
.pass-track-label.free{grid-column:2;background:linear-gradient(180deg,#fff6ce,#e7bf5d)}
.pass-track-label.premium{grid-column:3;background:linear-gradient(180deg,#ebd5ff,#a86cff);color:#fff}
.pass-tier-row{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:120px 1fr 1fr;
  gap:12px;
  align-items:stretch;
}
.tier-number{
  border-radius:20px;
  display:grid;
  place-items:center;
  text-align:center;
  font-weight:1000;
  background:linear-gradient(180deg,#2c182b,#160a18);
  color:#fff1c8;
  border:2px solid rgba(255,255,255,.12);
}
.tier-number small{display:block;color:#ffd874;font-size:11px;margin-top:3px}
.pass-reward-card{
  border-radius:22px;
  padding:16px;
  border:3px solid rgba(112,66,24,.16);
  box-shadow:0 12px 20px rgba(0,0,0,.15);
  min-height:150px;
}
.pass-reward-card.free{background:linear-gradient(180deg,#fff8dd,#efd28b)}
.pass-reward-card.premium{background:linear-gradient(180deg,#eee0ff,#b783ff);color:#210c36}
.pass-reward-card h4{margin:0 0 8px;font-size:18px}
.pass-reward-card ul{margin:0 0 12px;padding-left:18px}
.pass-tier-row.locked{opacity:.74}

@media (max-width:760px){
  .top-shell{padding:10px 10px!important}
  .brand-row{gap:8px!important}
  .brand{min-width:155px}
  .top-pills{justify-content:flex-start!important;width:100%!important}
  .top-action,.era-pill,.crown-pill{min-height:38px!important;padding:8px 12px!important;font-size:13px!important}
  .resource-rail{padding-top:8px!important}
  .res-chip{min-width:96px!important;height:42px!important}
  .home-full-town{height:calc(100vh - 255px - 138px)!important;min-height:560px!important}
  .home-overlay-actions{left:10px!important;top:12px!important;gap:8px!important}
  .round-action{width:70px!important;min-height:70px!important;font-size:24px!important;border-radius:18px!important}
  .home-full-town .building-node img{max-width:112px!important;max-height:112px!important}
  .home-full-town .emoji-node{font-size:72px!important}
  .pass-track-shell{grid-template-columns:1fr;gap:10px;margin:0 10px 120px}
  .pass-track-label{position:relative;top:auto;grid-column:1!important}
  .pass-tier-row{grid-column:1;grid-template-columns:1fr}
  .tier-number{padding:10px;display:block}
  .res-tip{top:150px!important}
}

/* v6 final: resource details work on hover and tap */
.res-chip:hover .res-tip,.res-chip:focus .res-tip,.res-chip.active .res-tip{display:block!important}


/* v7 profile/logout screen */
.profile-hero{max-width:960px;margin:0 auto 18px;align-items:center}
.profile-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.logout-form{margin:0}.profile-grid{max-width:960px;margin:0 auto 18px}.profile-list{display:grid;gap:10px}.profile-list div{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.48);border:1px solid rgba(124,76,28,.12)}.profile-list span{font-weight:900;color:#6f5138}.profile-list b{text-align:right}.profile-action.active{filter:brightness(1.08);box-shadow:0 0 0 3px rgba(255,224,128,.22), inset 0 -4px 0 rgba(112,58,16,.28)}
@media(max-width:760px){.profile-list div{display:grid}.profile-list b{text-align:left}}

/* v7: centralized 64x64 artwork icons + compact HUD fixes */
.brand-icon img,.top-icon,.nav-item span img,.res-icon img,.round-action img,.inline-icon,.btn-inline-icon{image-rendering:pixelated;display:inline-block;vertical-align:middle;object-fit:contain}
.brand-icon img{width:42px;height:42px}.top-icon{width:28px;height:28px}.nav-item span img{width:34px;height:34px}.inline-icon{width:28px;height:28px}.inline-icon.large{width:42px;height:42px}.btn-inline-icon{width:22px;height:22px}.res-icon img{width:34px;height:34px}.round-action img{width:46px;height:46px}
.top-pills .top-action,.era-pill,.crown-pill{gap:8px}.profile-action{max-width:190px}
.resource-rail{grid-template-columns:repeat(5,minmax(98px,1fr))!important;gap:8px!important;padding:0 14px 12px!important}.res-chip{min-height:54px!important;padding:10px 12px!important;border-radius:16px!important;gap:8px!important}.res-value{font-size:18px!important}.res-icon{font-size:0!important;line-height:0!important;display:inline-flex}.res-tip{z-index:400!important;pointer-events:auto}.res-chip.active .res-tip{display:block!important}
.cost-icons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.cost-icons span{display:inline-flex;align-items:center;gap:6px}.cost-icons img{width:24px;height:24px;image-rendering:pixelated}.resource-cost-row.cost-icons span{padding:7px 10px}
.recruit-icon,.garrison-list img,.offer-art img,.ruby-pile img{image-rendering:pixelated}.ruby-pile img{width:62px;height:62px}.offer-art img{width:92px;height:92px}.building-node img{image-rendering:pixelated}
.round-action{font-size:16px!important}.round-action span{font-size:11px!important}.home-overlay-actions{z-index:25!important}
@media (max-width:760px){.resource-rail{grid-template-columns:repeat(5,minmax(58px,1fr))!important;gap:5px!important;padding:0 8px 10px!important}.res-chip{padding:7px!important;justify-content:center}.res-icon img{width:28px;height:28px}.res-value{font-size:15px!important}.res-tip{position:fixed!important;left:10px!important;right:10px!important;top:135px!important;width:auto!important}.top-icon{width:24px;height:24px}.top-pills{gap:6px}.top-action,.era-pill,.crown-pill{padding:8px 10px!important}.profile-action b{display:none}.nav-item span img{width:30px;height:30px}}

/* v9 gameplay polish */
.daily-chest-modal .chest-panel{max-width:560px;margin:8vh auto;text-align:center;overflow:visible}.big-chest-button{border:0;background:linear-gradient(180deg,#ffe98a,#e6a21b);border-radius:34px;padding:26px 38px;display:grid;place-items:center;gap:8px;margin:18px auto;box-shadow:0 18px 0 rgba(111,61,7,.28),0 28px 46px rgba(0,0,0,.3);font-weight:1000;cursor:pointer}.big-chest-button img{width:96px;height:96px;image-rendering:pixelated}.big-chest-button.opening{animation:chestShake .65s ease-in-out infinite;filter:brightness(1.2)}@keyframes chestShake{0%,100%{transform:translateX(0) rotate(0)}20%{transform:translateX(-7px) rotate(-4deg)}40%{transform:translateX(7px) rotate(4deg)}60%{transform:translateX(-5px) rotate(-3deg)}80%{transform:translateX(5px) rotate(3deg)}}.reward-particle{position:fixed;width:28px;height:28px;z-index:9999;pointer-events:none;image-rendering:pixelated;animation:rewardBurst 1.1s ease-out forwards}@keyframes rewardBurst{0%{transform:translate(0,0) scale(.8);opacity:1}55%{transform:translate(var(--dx),var(--dy)) scale(1.25);opacity:1}100%{transform:translate(calc(var(--dx) * .45),-120vh) scale(.6);opacity:0}}.daily-reward-text{min-height:32px;font-size:20px;font-weight:1000;color:#41200c}.pass-claim-toast{position:fixed;left:50%;bottom:110px;transform:translate(-50%,20px);opacity:0;z-index:10000;background:#dff8d5;color:#173910;border:3px solid #6dae55;border-radius:18px;padding:14px 22px;font-weight:1000;box-shadow:0 14px 30px rgba(0,0,0,.25);transition:.18s ease}.pass-claim-toast.show{opacity:1;transform:translate(-50%,0)}.battle-log-item{display:block!important}.battle-log-item summary{cursor:pointer;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;width:100%}.battle-log-detail{padding:12px 0 0}.battle-log-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.battle-log-grid>div{background:rgba(255,255,255,.45);border-radius:16px;padding:12px}.battle-log-grid ul,.battle-result ul{margin:6px 0 0;padding-left:18px}.battle-summary-card{margin-top:16px}.garrison-list img{width:44px;height:44px;image-rendering:pixelated}.round-action img{image-rendering:pixelated}@media(max-width:760px){.battle-log-item summary{grid-template-columns:auto 1fr}.battle-log-grid{grid-template-columns:1fr}.big-chest-button img{width:78px;height:78px}}

/* v10: rotating shop, compact battle screen, juicier chest */
.shop-countdown-wrap{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:10px 14px;border-radius:999px;background:rgba(13,8,22,.42);color:#fff;font-weight:1000;border:2px solid rgba(255,226,126,.25)}
.shop-countdown{font-variant-numeric:tabular-nums;color:#ffe66d;text-shadow:0 2px 0 #000}.offer-badges{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin:8px 0}.offer-card.redeemed{filter:saturate(.72);opacity:.82}.offer-card.redeemed .offer-art,.offer-card.redeemed h3,.offer-card.redeemed p{opacity:.58}.redeemed-overlay{position:absolute;inset:0;z-index:8;display:grid;place-items:center;gap:6px;background:rgba(16,34,20,.34);backdrop-filter:blur(1px);pointer-events:none}.redeemed-check{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#b9ff82,#1ea84d);border:5px solid #ffffff;color:#0d3d18;font-size:56px;font-weight:1000;box-shadow:0 10px 0 rgba(0,0,0,.18),0 18px 36px rgba(0,0,0,.28);text-shadow:0 2px 0 rgba(255,255,255,.4)}.redeemed-overlay b{padding:8px 14px;border-radius:999px;background:#102412;color:#dfffd6;border:2px solid #6fee7e;text-transform:uppercase;letter-spacing:.08em}.buy-button:disabled{filter:none!important;opacity:1!important;background:linear-gradient(180deg,#d9f8c7,#74c45e)!important;color:#113813!important;border-color:#2c7d32!important}.deluxe-card{isolation:isolate}
.battle-main{max-width:none!important;padding-left:10px!important;padding-right:10px!important}.battle-stage{position:relative;height:calc(100vh - 170px);min-height:640px;border-radius:28px;overflow:hidden;border:4px solid #6c3d22;background:#276a36;box-shadow:0 18px 40px rgba(0,0,0,.35)}.battle-canvas{position:absolute;inset:0;height:100%;width:100%;background:#4e8b3a}.battle-summary-overlay{position:absolute;z-index:20;left:18px;right:18px;bottom:18px;padding:14px 18px;border-radius:22px;background:linear-gradient(180deg,rgba(255,248,223,.93),rgba(236,202,122,.9));border:3px solid rgba(107,59,19,.55);box-shadow:0 18px 40px rgba(0,0,0,.28);backdrop-filter:blur(5px)}.battle-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.battle-summary-head h2{margin:0;font-size:28px}.battle-summary-compact{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:10px}.battle-summary-compact>div{padding:10px 12px;border-radius:16px;background:rgba(255,255,255,.43);font-weight:800}.battle-summary-compact b{display:block;color:#3f1c0b;margin-bottom:4px}.battle-summary-compact span{font-size:14px;color:#261207}.battle-summary-compact .inline-icon{width:22px;height:22px;vertical-align:middle}
.chest-panel{position:relative}.chest-panel .chest-flash{position:absolute;inset:-40px;border-radius:34px;background:radial-gradient(circle,rgba(255,255,255,.9),rgba(255,238,108,.34) 28%,transparent 60%);opacity:0;pointer-events:none}.chest-panel.bursting .chest-flash{animation:chestFlash .55s ease-out}.big-chest-button.charging{animation:chestCharge .72s ease-in-out infinite!important}.big-chest-button.opening{animation:chestPop .55s cubic-bezier(.16,1.4,.4,1) forwards!important}.reward-particle.explosive{width:34px;height:34px;animation:rewardExplosion 1.65s cubic-bezier(.12,.78,.19,1) forwards!important;filter:drop-shadow(0 5px 0 rgba(0,0,0,.22))}.reward-shockwave{position:fixed;z-index:9998;width:24px;height:24px;border-radius:50%;border:6px solid rgba(255,244,145,.95);transform:translate(-50%,-50%);pointer-events:none;animation:rewardShock .75s ease-out forwards}.daily-reward-text{transition:transform .18s ease}.chest-panel.bursting .daily-reward-text{transform:scale(1.05)}@keyframes chestCharge{0%,100%{transform:translateX(0) rotate(0) scale(1)}15%{transform:translateX(-7px) rotate(-5deg) scale(1.02)}30%{transform:translateX(7px) rotate(5deg) scale(1.04)}45%{transform:translateX(-6px) rotate(-4deg) scale(1.05)}60%{transform:translateX(6px) rotate(4deg) scale(1.07)}75%{transform:translateX(-3px) rotate(-2deg) scale(1.08)}}@keyframes chestPop{0%{transform:scale(1.08)}45%{transform:scale(1.28) rotate(-4deg);filter:brightness(1.9)}100%{transform:scale(1.04);filter:brightness(1.1)}}@keyframes chestFlash{0%{opacity:0;transform:scale(.6)}25%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.7)}}@keyframes rewardExplosion{0%{transform:translate(-50%,-50%) scale(.2) rotate(0);opacity:0}10%{opacity:1}48%{transform:translate(calc(var(--dx) * .78),calc(var(--dy) * .78)) scale(1.35) rotate(var(--spin));opacity:1}100%{transform:translate(var(--dx),calc(var(--dy) + 260px)) scale(.62) rotate(var(--spin));opacity:0}}@keyframes rewardShock{0%{opacity:1;transform:translate(-50%,-50%) scale(.2)}100%{opacity:0;transform:translate(-50%,-50%) scale(12)}}
@media(max-width:900px){.battle-stage{height:calc(100vh - 230px);min-height:560px}.battle-summary-compact{grid-template-columns:1fr 1fr}.battle-summary-overlay{left:10px;right:10px;bottom:10px}.battle-summary-head h2{font-size:22px}}
@media(max-width:560px){.battle-summary-compact{grid-template-columns:1fr}.battle-summary-compact>div{padding:8px 10px}.battle-stage{min-height:620px}.redeemed-check{width:68px;height:68px;font-size:46px}}

/* v11 process colors, upgrade stat cards, era banners, auth battle canvas */
.process-list{display:grid;gap:10px}.process-row{border-radius:18px;border:2px solid rgba(255,255,255,.12);background:rgba(255,255,255,.45);overflow:hidden}.process-row summary{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:14px;cursor:pointer}.process-dot{width:14px;height:14px;border-radius:999px;box-shadow:0 0 0 4px rgba(255,255,255,.25)}.process-incoming-attack{border-color:#c92d2d;background:linear-gradient(90deg,rgba(210,34,34,.26),rgba(255,255,255,.45))}.process-incoming-attack .process-dot{background:#d52424}.process-world-action{border-color:#d6a11e;background:linear-gradient(90deg,rgba(235,179,40,.24),rgba(255,255,255,.45))}.process-world-action .process-dot{background:#e3a814}.process-own-action,.process-ally-action{border-color:#2f79d6;background:linear-gradient(90deg,rgba(47,121,214,.24),rgba(255,255,255,.45))}.process-own-action .process-dot,.process-ally-action .process-dot{background:#2f79d6}.process-incoming-reinforce{border-color:#2b9e45;background:linear-gradient(90deg,rgba(48,184,83,.26),rgba(255,255,255,.45))}.process-incoming-reinforce .process-dot{background:#22a642}.process-detail{padding:0 14px 14px}.mini-unit-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}.mini-unit-list div{padding:10px;border-radius:12px;background:rgba(255,255,255,.48)}.mini-unit-list b{display:block}.mini-unit-list span{font-size:13px;color:#5f4730}
.upgrade-stat-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.upgrade-stat-compare>div{display:grid;gap:6px;padding:12px;border-radius:16px;background:rgba(255,255,255,.45);border:1px solid rgba(111,70,28,.14)}.upgrade-stat-compare b{color:#44200e}.upgrade-stat-compare span{font-size:13px;color:#5e422b}.upgrade-stat-compare.compact{grid-template-columns:1fr;margin:10px 0}.upgrade-card{display:flex;flex-direction:column;gap:8px}
.keep-era-node{position:absolute!important}.era-banner{position:absolute;width:22px;height:30px;background:linear-gradient(180deg,#f8d04e,#c2263c);border:2px solid #fff3be;border-radius:4px 4px 8px 8px;box-shadow:0 4px 0 rgba(0,0,0,.25);z-index:6}.era-banner:after{content:"";position:absolute;left:5px;right:5px;bottom:-2px;height:9px;background:#7d1426;clip-path:polygon(0 0,50% 100%,100% 0)}.era-banner-1{left:20%;top:4%}.era-banner-2{right:20%;top:4%;background:linear-gradient(180deg,#7fd7ff,#2762c6)}.era-banner-3{left:18%;bottom:20%;background:linear-gradient(180deg,#baff77,#2c9d34)}.era-banner-4{right:18%;bottom:20%;background:linear-gradient(180deg,#e2b0ff,#7d35c8)}
.auth-battle-game{position:fixed;inset:0;z-index:0}.cinematic-auth .auth-card{position:relative;z-index:3}.cinematic-auth:before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,rgba(8,6,12,.2),rgba(8,3,10,.74));z-index:1;pointer-events:none}
@media(max-width:760px){.process-row summary{grid-template-columns:auto 1fr}.process-row .action-row{grid-column:2}.upgrade-stat-compare{grid-template-columns:1fr}.era-banner{width:16px;height:22px}}

/* v12: clearer upgrade/log readability */
.upgrade-explainer{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.42);border:1px solid rgba(117,71,31,.15);margin-bottom:12px}
.upgrade-stat-compare div span{display:block;margin:4px 0;line-height:1.35}
.battle-log-grid-wide{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.battle-log-grid-wide ul{margin:8px 0 0;padding-left:18px}
.countdown-done{opacity:.7;font-style:italic}
.upgrade-card .upgrade-stat-compare.compact{font-size:13px}.upgrade-card .upgrade-stat-compare.compact span{display:block;margin:3px 0}

/* v13 clarity + missions */
.clean-hero h1,.mission-hero h1{font-size:clamp(34px,5vw,72px);line-height:1.02;margin:.1em 0}.compact-panel{padding:18px}.compact-grid{gap:14px}.small-upgrade-card{margin-bottom:14px}.compact-compare{gap:10px}.compact-compare>div{padding:12px;border-radius:14px;background:rgba(255,255,255,.55)}
.compact-cost-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0}.compact-cost-row b{display:inline-flex;gap:5px;align-items:center;background:rgba(255,255,255,.58);border-radius:999px;padding:7px 10px}.compact-cost-row img,.btn-inline-icon,.quick-result-row img{width:22px;height:22px;image-rendering:pixelated}.not-enough{color:#b30028!important;outline:2px solid #e75b70}.form-warning{color:#b30028;font-weight:900;min-height:1.2em}.tiny-btn{font-size:12px;padding:6px 9px}
.recruit-config-grid{display:grid;grid-template-columns:2fr 1fr auto;gap:12px;align-items:end}.recruit-config-grid label{display:grid;gap:6px;font-weight:900}.recruit-config-grid select,.recruit-config-grid input,.mission-answer,.chat-search{padding:12px 14px;border-radius:16px;border:2px solid rgba(100,56,20,.18);background:#fffdf7;font-weight:900}.recruit-preview-card{margin-top:14px;display:grid;grid-template-columns:76px 1fr;gap:14px;align-items:start;background:rgba(255,255,255,.52);border-radius:20px;padding:14px}.recruit-preview-card img{width:72px;height:72px;image-rendering:pixelated}.mini-stat-list{display:flex;flex-wrap:wrap;gap:7px}.mini-stat-list span{font-size:12px;background:rgba(62,34,19,.08);border-radius:999px;padding:5px 8px}.locked-list{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.mission-stage{max-width:1180px;margin:0 auto}.mission-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(135deg,#4421b8,#bc2c6e 60%,#f0a82d);color:#fff;border-radius:30px}.mission-progress-big{display:grid;place-items:center;width:140px;height:140px;border-radius:36px;background:rgba(0,0,0,.25);box-shadow:inset 0 0 0 3px rgba(255,255,255,.12)}.mission-progress-big b{font-size:34px}.mission-progress-big span{font-weight:900}.mission-track{display:grid;gap:12px;margin-top:16px}.mission-card{border-radius:22px;background:rgba(255,255,255,.54);border:2px solid rgba(124,76,28,.12);overflow:hidden}.mission-card.ready{box-shadow:0 0 0 3px rgba(255,209,64,.55)}.mission-card.claimed{opacity:.72}.mission-card summary{display:grid;grid-template-columns:40px 54px 1fr auto;gap:12px;align-items:center;cursor:pointer;padding:14px 16px}.mission-number{width:36px;height:36px;border-radius:14px;display:grid;place-items:center;background:#2b1231;color:#fff;font-weight:1000}.mission-icon{width:48px;height:48px;image-rendering:pixelated}.mission-card small{display:block;color:#7b5d42;font-weight:800}.mission-body{padding:0 16px 16px 122px}.mission-claim-form{display:flex;gap:10px;flex-wrap:wrap}.mission-answer{width:160px}.round-action.mission{background:linear-gradient(180deg,#d7f2ff,#55aeea)}.round-action small{font-size:11px;font-weight:1000;color:#fff;background:rgba(0,0,0,.25);border-radius:999px;padding:1px 6px}.temporary-guard-banner{position:absolute;right:18px;top:14px;z-index:15;display:grid;gap:8px}.temporary-guard-banner div{display:flex;align-items:center;gap:8px;background:rgba(24,8,22,.86);color:#fff;border-radius:18px;padding:10px 12px;font-weight:900;box-shadow:0 10px 22px rgba(0,0,0,.2)}.temporary-guard-banner img{width:44px;height:44px;image-rendering:pixelated}
.compact-battle-log{padding:0;margin-bottom:10px;border-radius:18px;background:rgba(255,255,255,.48);border:1px solid rgba(107,62,27,.14)}.compact-battle-log summary{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:12px 14px;cursor:pointer}.compact-detail{padding:0 14px 14px}.quick-result-row{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 12px}.quick-result-row span{display:inline-flex;gap:5px;align-items:center;border-radius:999px;padding:6px 9px;background:rgba(255,255,255,.6);font-weight:900}.warning-pill{background:#ffe5a8!important;color:#653400}.compact-battle-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.compact-battle-grid>div{background:rgba(255,255,255,.52);border-radius:14px;padding:10px}.compact-battle-grid ul{margin:6px 0 0;padding-left:18px}.compact-row{padding:12px 14px}.battle-summary-overlay{max-height:34vh;overflow:auto}.battle-summary-compact{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}.store-hero-card p{color:#fff!important;text-shadow:0 2px 0 rgba(0,0,0,.18)}.shop-countdown-wrap{color:#fff}.shop-section h2{color:#fff;text-shadow:0 2px #000}.offer-card p,.bundle-card p{color:#3a2114!important}.chat-search{width:100%;margin-bottom:8px}#direct-recipient{width:100%;min-height:160px;border-radius:16px;padding:8px;background:#fffdf7}.upgrade-card-head{display:flex;align-items:center;gap:12px}.upgrade-card-head img{width:58px;height:58px;image-rendering:pixelated}.compact-upgrade-card{min-height:auto}.upgrade-inline-status{font-weight:900}.res-tip{z-index:1000}.bottom-nav{grid-template-columns:repeat(9,minmax(0,1fr))}
@media(max-width:800px){.recruit-config-grid{grid-template-columns:1fr}.mission-card summary{grid-template-columns:34px 44px 1fr}.mission-body{padding-left:16px}.temporary-guard-banner{left:10px;right:10px;top:8px}.compact-battle-log summary{grid-template-columns:auto 1fr}.compact-battle-log summary .muted{grid-column:2}.bottom-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
.store-hero-card{padding:20px 24px!important;min-height:0!important}.store-hero-card h1{font-size:clamp(30px,4vw,54px)!important;line-height:1.05}.store-hero-card .eyebrow{color:#ffe8a0}.shop-countdown-wrap{display:inline-flex;margin-top:10px;padding:8px 12px;border-radius:999px;background:rgba(0,0,0,.28)}


/* v14 visual identity pass: playful pixel-war, cleaner panels, consistent icons */
:root{
  --rr-purple:#220018;
  --rr-purple-2:#3c082d;
  --rr-panel:#fff5d6;
  --rr-panel-soft:#f7e4ae;
  --rr-gold:#ffbf25;
  --rr-gold-dark:#9a5f12;
  --rr-ink:#241003;
  --rr-red:#cf3e4f;
  --rr-blue:#2b7de1;
  --rr-green:#2fba5c;
  --rr-shadow:0 6px 0 rgba(45,18,6,.35);
  --font-game:"Pixelify Sans","Press Start 2P","Trebuchet MS",system-ui,sans-serif;
}
html,body{font-family:var(--font-game); background:radial-gradient(circle at 50% -20%,#5b113f 0,#220018 48%,#10000c 100%)!important;}
img{image-rendering:pixelated;}
.panel,.log-page,.glass-panel{
  background:linear-gradient(180deg,var(--rr-panel),var(--rr-panel-soft))!important;
  border:4px solid #7d461f!important;
  border-radius:22px!important;
  box-shadow:var(--rr-shadow)!important;
}
.panel h1,.panel h2,.panel h3,.store-hero-card h1,.mission-hero h1{letter-spacing:.01em;}
.eyebrow{color:#a4123a!important; letter-spacing:.22em; font-size:12px; text-transform:uppercase;}
.top-shell{background:linear-gradient(180deg,#30001f,#1a0012)!important; border-bottom:3px solid #5e183e!important;}
.top-action,.era-pill,.crown-pill,.res-chip,.btn,.btn-small,.tab-btn,.badge{
  border-radius:12px!important;
  border:3px solid #7d461f!important;
  box-shadow:0 5px 0 rgba(48,22,8,.35)!important;
  font-weight:900;
}
.top-action,.btn,.btn-small,.tab-btn.active{
  background:linear-gradient(180deg,#ffe36d,#e99b16)!important;
  color:#291102!important;
}
.era-pill,.crown-pill{background:linear-gradient(180deg,#553247,#311827)!important;color:#fff0c7!important;}
.res-chip{min-width:102px!important;padding:8px 12px!important;font-size:18px!important;background:linear-gradient(180deg,#ffe7a2,#d69b39)!important;}
.res-icon{width:28px!important;height:28px!important}.res-icon img,.top-icon{image-rendering:pixelated;}
.brand strong{font-size:22px!important}.brand small{font-size:12px!important;}
.bottom-nav{background:linear-gradient(180deg,rgba(25,10,23,.94),rgba(8,4,10,.98))!important;border-radius:18px 18px 0 0!important;}
.nav-item{min-width:92px!important;border:2px solid transparent;}
.nav-item.active{background:linear-gradient(180deg,#ffe16b,#eaa017)!important;color:#1c0b02!important;border-color:#7d461f!important;box-shadow:0 5px 0 rgba(48,22,8,.45)!important;}
.nav-item span img{width:30px!important;height:30px!important;image-rendering:pixelated;}
.section-title-icon,.pixel-icon-wrap img,.log-icon img{width:28px;height:28px;image-rendering:pixelated;vertical-align:middle;}
.inline-icon,.btn-inline-icon{image-rendering:pixelated;}
.compact-log-page{max-width:980px!important;}
.compact-log-list .compact-battle-log{
  border:3px solid #e0c787!important;
  border-radius:14px!important;
  overflow:hidden;
  background:rgba(255,255,255,.34);
  margin-bottom:10px;
}
.compact-battle-log[open]{border-color:#6a411f!important;background:linear-gradient(180deg,#fff2ce,#f3dda1);}
.compact-battle-log summary{
  padding:10px 14px!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  min-height:46px;
}
.compact-detail{padding:12px 14px!important;}
.quick-result-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.quick-result-row span{background:#fff7df;border:2px solid #e3c56d;border-radius:999px;padding:6px 10px;font-weight:900;}
.compact-battle-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:10px!important;}
.compact-battle-grid>div{
  padding:10px 12px!important;border:2px solid #efd79a!important;border-radius:12px!important;background:#fffaf0!important;
}
.compact-battle-grid b{display:block;margin-bottom:6px;}
.compact-battle-grid ul{margin:0;padding-left:18px;}
.store-stage,.mission-stage{max-width:1040px!important;}
.store-hero-card,.mission-hero{
  border:4px solid #a86820!important;
  border-radius:22px!important;
  box-shadow:var(--rr-shadow)!important;
  background:linear-gradient(135deg,#5426c6 0%,#c42f75 54%,#f0a225 100%)!important;
}
.store-hero-card h1,.mission-hero h1{font-size:clamp(32px,5vw,54px)!important;line-height:1.06!important;text-shadow:0 4px 0 rgba(0,0,0,.18);}
.shop-countdown-wrap,.pill-soft{background:rgba(28,0,35,.42)!important;border:2px solid rgba(255,226,114,.45)!important;color:#fff9d3!important;}
.deluxe-card,.ruby-card{
  opacity:1!important;
  filter:none!important;
  color:#251103!important;
  background:linear-gradient(180deg,#fff3c9,#ecc86f)!important;
  border:4px solid #8b5a24!important;
  border-radius:18px!important;
}
.deluxe-card.redeemed{filter:saturate(.65) brightness(.88)!important;}
.redeemed-overlay{
  background:rgba(18,12,6,.42)!important;
  backdrop-filter:blur(1px);
}
.redeemed-check{
  display:grid!important;place-items:center!important;
  width:64px!important;height:64px!important;
  border-radius:50%;background:linear-gradient(#dcffd4,#60bf63)!important;
  border:4px solid #eaffea!important;
  box-shadow:0 5px 0 rgba(0,0,0,.25)!important;
}
.redeemed-check img{width:42px;height:42px;image-rendering:pixelated;}
.offer-card h3,.offer-card p{color:#251103!important;text-shadow:none!important;}
.process-row{border-radius:14px!important;border:3px solid #e2c178!important;margin-bottom:8px;background:#fff5d8;}
.process-row summary{padding:10px 12px!important;}
.process-incoming-attack{border-color:#dd4257!important;background:#ffe6e9!important;}
.process-incoming-reinforce{border-color:#2fba5c!important;background:#e8ffef!important;}
.process-own,.process-ally{border-color:#2b7de1!important;background:#e7f0ff!important;}
.process-world{border-color:#e8b326!important;background:#fff8dc!important;}
.battle-summary-overlay{
  border:4px solid #7d461f!important;
  background:linear-gradient(180deg,rgba(255,245,214,.96),rgba(242,211,137,.96))!important;
  border-radius:18px 18px 0 0!important;
}
.temporary-guard-banner b::first-letter{text-transform:uppercase;}
@media (max-width:760px){
  .top-pills{gap:6px}.top-action,.era-pill,.crown-pill{padding:8px 10px!important}
  .res-chip{min-width:86px!important;font-size:15px!important}
  .bottom-nav{gap:4px}.nav-item{min-width:76px!important}
  .compact-battle-log summary{grid-template-columns:auto 1fr!important}.compact-battle-log summary .muted{grid-column:2}
}

/* v15 alliance/profile/badge/march-cost polish */
.badge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.badge-card{display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:18px;background:rgba(255,255,255,.56);border:1px solid rgba(104,59,21,.16)}.badge-card p{margin:4px 0 6px;color:#6d5139}.badge-medal{width:44px;height:44px;min-width:44px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(180deg,#fff1a8,#e2a822);box-shadow:inset 0 -3px rgba(93,51,9,.24);font-size:24px}.badge-medal img,.badge-mini-icon{image-rendering:pixelated;width:26px;height:26px}.leader-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.leader-badges span{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.16);color:#fff0c9;font-size:12px;font-weight:900}.leaderboard-panel .list-row{align-items:flex-start}.leader-name{color:#2d1205;text-decoration:none;font-weight:1000}.alliance-invite-form input{min-width:220px}.small-note{font-size:13px;margin-top:8px}.recruit-preview-card .compact-cost-row img,.compact-cost-row img{width:18px!important;height:18px!important;image-rendering:pixelated}.recruit-preview-card #preview-icon{width:62px!important;height:62px!important;image-rendering:pixelated}.top-shell,.bottom-nav,.panel,.glass-panel{font-family:inherit}.process-row .muted{line-height:1.35}

/* v16 fixes */
.bottom-nav{grid-template-columns:repeat(8,minmax(0,1fr))!important;overflow:visible!important;}
.inbox-icon img.pixel-icon{width:28px;height:28px;image-rendering:pixelated;}
@media(max-width:800px){.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important;}.nav-item{min-width:0!important;padding:8px 2px!important}.nav-item span img{width:28px!important;height:28px!important}.nav-item b{font-size:12px!important}}
@media(min-width:801px){.bottom-nav{grid-template-columns:repeat(8,minmax(0,1fr))!important}.nav-item{min-width:0!important}}


/* v17 barracks shortcut */
.barracks-hero-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.barracks-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px;padding:12px!important}
.barracks-tab{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;text-decoration:none;color:var(--ink,#271206);padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.45);border:2px solid rgba(122,70,21,.14);box-shadow:inset 0 -3px rgba(83,42,8,.08);transition:transform .12s ease,filter .12s ease}
.barracks-tab span{grid-row:1/3;font-size:28px;line-height:1}.barracks-tab-icon{grid-row:1/3;width:34px;height:34px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 0 rgba(0,0,0,.18))}.barracks-tab b{font-size:16px}.barracks-tab small{color:#7a5a39;font-weight:800}.barracks-tab.active{background:linear-gradient(180deg,#fff0a9,#e9b43b);border-color:#8a5317}.barracks-tab:hover{transform:translateY(-1px);filter:brightness(1.04)}
@media(max-width:720px){.barracks-tabs{grid-template-columns:1fr}.barracks-hero-actions{width:100%;justify-content:flex-start}}

/* v19: cleaner dismissable notices, world select, no-colony language polish */
.toast-stack{position:fixed!important;z-index:10000;right:18px;left:auto;top:118px;max-width:min(520px,calc(100vw - 28px));display:grid;gap:10px;margin:0!important;pointer-events:none}.toast{display:flex!important;align-items:center;gap:12px;justify-content:space-between;pointer-events:auto;background:linear-gradient(180deg,#fff8de,#e9cf82)!important;border:2px solid #8a4f21!important;border-radius:18px!important;padding:12px 14px!important;box-shadow:0 14px 30px rgba(0,0,0,.28)!important;transform:translateY(-8px) scale(.98);opacity:0}.toast.show{transform:translateY(0) scale(1);opacity:1}.toast-close{border:0;background:rgba(41,14,9,.12);border-radius:999px;width:28px;height:28px;font-weight:1000;cursor:pointer;color:#2b1108}.code-inline{font-weight:900;margin-left:8px;padding:2px 0!important;border:0!important;background:transparent!important}.world-select-shell{max-width:1040px;margin:0 auto}.world-row-card{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;padding:18px;border-radius:22px;background:rgba(255,255,255,.55);border:2px solid rgba(126,73,31,.16);margin-bottom:12px}.world-row-card.current{background:linear-gradient(180deg,#fff6cb,#eac469)}.world-code{font-weight:1000;color:#96203d;letter-spacing:.08em;text-transform:uppercase}.road-status{margin-top:6px;color:#5c2e61;font-weight:900}.barracks-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.barracks-tab{display:flex;align-items:center;gap:12px;text-decoration:none;border-radius:18px;padding:12px 14px;background:rgba(255,255,255,.48);border:2px solid rgba(126,73,31,.16);color:#30140c}.barracks-tab.active{background:linear-gradient(180deg,#ffe887,#e2a118);box-shadow:inset 0 -4px rgba(119,67,6,.22)}.barracks-tab span{font-size:22px}.barracks-tab b{display:block}.barracks-tab small{display:block;color:#6f5139}.held-road-card{margin:10px 0;padding:12px 14px;border-radius:18px;background:rgba(255,235,151,.58);border:2px solid rgba(177,108,19,.25);font-weight:900}.outpost-income{font-weight:900;color:#6a3d0f}@media(max-width:760px){.toast-stack{top:88px;right:10px;left:10px;max-width:none}.world-row-card{grid-template-columns:1fr}.barracks-tabs{grid-template-columns:1fr}}

/* v20: roads, leaderboard badges, supplied building sprites */
.leaderboard-v20{max-width:1180px;margin:0 auto 120px!important}
.leaderboard-v20 .leaderboard-list{display:grid;gap:12px;margin-top:14px}
.leaderboard-entry{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-radius:22px;background:linear-gradient(180deg,#fff8dc,#edd58f);border:3px solid rgba(93,51,9,.18);box-shadow:0 8px 0 rgba(64,27,7,.10);color:#2b1204;text-decoration:none}
.leaderboard-entry:hover{transform:translateY(-1px);filter:brightness(1.03)}
.leader-main{min-width:0}.leader-rank{font-size:22px;font-weight:1000;margin-right:8px;color:#7c4311}.leader-player-name{font-size:24px;font-weight:1000;color:#210b02}
.leader-badges-v20{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.badge-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:14px;background:linear-gradient(180deg,#fff3b3,#d8ad4b);border:2px solid rgba(112,62,14,.25);color:#2b1204!important;font-size:14px;font-weight:1000;box-shadow:inset 0 -3px rgba(98,50,9,.16)}.badge-chip img{width:34px;height:34px;image-rendering:pixelated;filter:drop-shadow(0 2px 0 rgba(0,0,0,.24))}.badge-chip b{color:#2b1204!important;white-space:nowrap}.leader-score-block{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.score-pill{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;background:#fff7d5;border:2px solid rgba(112,62,14,.18);font-weight:900;color:#2b1204}.score-pill img{width:30px;height:30px;image-rendering:pixelated}.score-pill b{font-size:22px}.muted-pill{background:rgba(255,255,255,.52);color:#604323}
.road-legend{display:inline-block;padding:2px 8px;border-radius:999px;margin:4px 4px 0 0;color:#190805;font-weight:900}.road-legend.rose-road{background:#d9bd73}.road-legend.kings-cross{background:#a45de6;color:#fff}.cities-control{font-size:14px!important;writing-mode:vertical-rl;padding:8px 5px!important}.cities-panel{max-width:920px;margin:8vh auto}.road-city-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.road-city-card{border-radius:22px;padding:16px;background:rgba(255,255,255,.54);border:2px solid rgba(91,52,17,.16)}.road-city-card h3{margin:0 0 12px;display:flex;align-items:center;gap:8px}.road-color-dot{width:18px;height:18px;border-radius:50%;display:inline-block;box-shadow:0 0 0 3px rgba(0,0,0,.08)}.road-city-list{display:grid;gap:8px}.road-city-row{display:flex;align-items:center;justify-content:space-between;gap:12px;text-decoration:none;color:#2b1204;padding:10px;border-radius:14px;background:rgba(255,255,255,.58);border:1px solid rgba(91,52,17,.12)}.road-city-row:hover{background:#fff5c8}.road-city-row small{display:block;color:#72533b;font-weight:700}.road-city-row em{font-style:normal;font-weight:900;color:#8a1e38;margin-left:4px}.road-city-row.special{background:linear-gradient(180deg,#ffe7a8,#f4c25d);border-color:#a76b22}.owner-pill{padding:5px 9px;border-radius:999px;background:#2a1024;color:#fff;font-weight:900;white-space:nowrap}.home-full-town .building-node img[src*="buildings/"]{max-width:176px;max-height:176px;object-fit:contain;image-rendering:pixelated}.home-full-town .node-walls img{max-width:210px;max-height:170px}.home-full-town .node-keep img{max-width:210px;max-height:170px}
@media (max-width:760px){.leaderboard-entry{align-items:flex-start;flex-direction:column}.leader-score-block{justify-content:flex-start}.leader-player-name{font-size:20px}.badge-chip{font-size:12px}.badge-chip img{width:28px;height:28px}.road-city-grid{grid-template-columns:1fr}.cities-panel{margin:4vh 12px}.cities-control{writing-mode:horizontal-tb!important}}


/* v21: map/road/asset polish */
.road-legend.kings-cross{background:#a45de6!important;color:#fff!important;}
.home-full-town .node-lumberyard img{max-width:150px!important;max-height:200px!important;}
.home-full-town .node-keep .label{display:inline-block!important;}
.alliance-map-badge{font-family:Arial,sans-serif;}

/* v22 worker dismissal + balance polish */
.worker-dismiss-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.worker-dismiss-card{display:grid;grid-template-columns:52px 1fr auto auto;gap:12px;align-items:center;padding:14px;border-radius:18px;background:rgba(255,255,255,.58);border:2px solid rgba(124,76,28,.12)}.worker-dismiss-card img{width:46px;height:46px;image-rendering:pixelated}.worker-dismiss-card input{width:86px;padding:10px;border-radius:12px;border:2px solid rgba(80,50,20,.18)}.worker-dismiss-card label{font-weight:800}.btn-small.premium{background:linear-gradient(180deg,#ffdf73,#c93ef2);color:#240022;border-color:rgba(255,255,255,.32)}


/* v23: leaderboard tab isolation fix */
.leaderboard-v20 .tab-panel{display:none!important;}
.leaderboard-v20 .tab-panel.active{display:grid!important;}
/* v24 origin/source picker */
.source-picker-label{display:block;margin:10px 0 6px;font-weight:900;color:#4d2f18}
.source-select{width:100%;padding:12px 14px;border-radius:16px;border:2px solid rgba(110,64,25,.28);background:rgba(255,255,255,.72);font-weight:900;margin-bottom:10px;color:#2c1208}

/* v29: unread badges, AI houses modal, relevant activity polish */
.nav-icon-wrap{position:relative;display:inline-grid;place-items:center}
.nav-badge{position:absolute;right:-8px;top:-8px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ff2d25;color:#fff;font-size:11px;font-style:normal;font-weight:1000;line-height:20px;text-align:center;box-shadow:0 2px 0 rgba(70,12,0,.55),0 0 0 2px rgba(255,239,202,.95)}
.nav-badge[hidden]{display:none!important}
.top-action-badged .nav-badge{right:-10px;top:-9px}
.battle-log-item.unread summary{font-weight:1000;background:linear-gradient(90deg,rgba(255,214,84,.26),transparent)}
.battle-log-item.read{opacity:.88}
.house-list{display:grid;gap:12px;margin-top:14px}.house-row{display:grid;grid-template-columns:auto 1fr auto auto;gap:12px;align-items:center;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.58);border:2px solid rgba(124,76,28,.13)}.house-row.main-house{background:linear-gradient(180deg,#fff4bf,#eec666);border-color:rgba(117,65,18,.32)}.house-color{width:28px;height:28px;border-radius:9px;box-shadow:inset 0 -4px rgba(0,0,0,.16),0 3px 0 rgba(0,0,0,.12)}.house-row b{font-size:18px}.house-row small{display:block;color:#75563b;font-weight:800}.houses-panel{max-width:760px;margin:7vh auto}.houses-control{background:linear-gradient(180deg,#eacfff,#a45de6)!important;color:#2b0e3d!important}

/* v30: Lords side button parity + keep era markers */
.map-controls .map-side-control,
.map-controls .cities-control,
.map-controls .houses-control{
  width:58px!important;
  height:72px!important;
  padding:8px 5px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  writing-mode:vertical-rl!important;
  text-orientation:mixed!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  font-size:14px!important;
  line-height:1!important;
}
.map-controls .houses-control{background:linear-gradient(180deg,#eacfff,#a45de6)!important;color:#2b0e3d!important;}
@media (max-width:760px){
  .map-controls .map-side-control,
  .map-controls .cities-control,
  .map-controls .houses-control{writing-mode:vertical-rl!important;height:70px!important;width:56px!important;font-size:13px!important;}
}

/* v31: incoming attack indicators + clearer loot chips */
.top-action.incoming-alert{background:linear-gradient(180deg,#ffd3d3,#f05656)!important;border-color:#8c261c!important;color:#2b0705!important;box-shadow:0 0 0 3px rgba(206,36,36,.18),inset 0 -3px rgba(100,12,8,.22)}
.incoming-sword-chip{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:3px 8px;border-radius:999px;background:#e73f4f;color:#fff;font-size:12px;font-weight:1000;vertical-align:middle;box-shadow:0 2px 0 rgba(93,19,16,.36)}
.incoming-sword-chip img{width:18px;height:18px;image-rendering:pixelated;filter:drop-shadow(0 1px 0 rgba(0,0,0,.28))}
.resource-loot-chip{display:inline-flex;align-items:center;gap:5px}
.resource-loot-chip img{width:20px;height:20px;image-rendering:pixelated}
.carry-warning-pill{background:#ffe3a0!important;border-color:#b97819!important;color:#4b2508!important}

/* v32: Crownlands seasonal/events/reinforcement/map clarity polish */
.badge.mythic,.badge.event-badge{background:linear-gradient(135deg,#ffe38a,#b86cff);color:#24122a;border-color:#7d2db1;font-weight:900}
.badge.small{font-size:.68rem;padding:2px 6px;border-radius:999px;background:#ead8b6;color:#4b2c15;text-transform:uppercase}
.event-chest-grid,.seasonal-calendar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0}
.event-chest-card,.seasonal-event-card{border:1px solid rgba(76,39,16,.18);border-radius:16px;padding:14px;background:rgba(255,249,235,.78);box-shadow:0 8px 18px rgba(68,35,12,.08)}
.event-chest-card.claimed{opacity:.72;filter:saturate(.7)}
.seasonal-event-card.active{border-color:#b32626;box-shadow:0 0 0 2px rgba(179,38,38,.12),0 10px 24px rgba(179,38,38,.12)}
.world-state-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:3px 9px;background:#eadfca;color:#4b3218;font-weight:800;font-size:.78rem}
.world-state-pill.challenged,.road-status.challenged{color:#b32626;font-weight:900}
.world-state-pill.challenged{background:#ffe0dc;border:1px solid #e58b7e}.world-state-pill.war{background:#fff0c8;color:#8a5100}
.tile-alliance-badge{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;font-weight:800;border-radius:999px;padding:3px 8px;background:rgba(255,255,255,.68);border:1px solid rgba(0,0,0,.15);vertical-align:middle}.tile-alliance-badge i{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--ally,#3b1b36);box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.incoming-sword-chip{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:3px 7px;border-radius:999px;background:#ffe0dc;color:#b32626;font-size:.72rem;font-weight:900;text-transform:uppercase}.incoming-sword-chip img{width:14px;height:14px}.incoming-alert{background:#ffe0dc!important;color:#9d1111!important;border-color:#d93b2f!important;box-shadow:0 0 0 3px rgba(217,59,47,.14)}
.garrison-group{padding:10px;border-radius:14px;background:rgba(255,255,255,.52);border:1px solid rgba(75,43,19,.12);margin-bottom:10px}.garrison-group h3{margin:0 0 6px;font-size:.95rem}.list-row.compact{padding:7px 0}.list-row.compact img{width:28px;height:28px;image-rendering:pixelated}
.battle-side-strip{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:12;width:min(720px,calc(100% - 24px));display:flex;justify-content:space-between;pointer-events:none}.battle-side-pill{display:flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.28);background:rgba(23,14,12,.66);backdrop-filter:blur(4px);color:#fff;border-radius:999px;padding:6px 11px;box-shadow:0 8px 20px rgba(0,0,0,.18)}.battle-side-pill b{display:block;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}.battle-side-pill small{display:block;font-size:.78rem;opacity:.86}.battle-side-pill.attacker .side-icon{color:#ffdf68}.battle-side-pill.defender .side-icon{color:#86c6ff}.battle-side-pill.defender{text-align:right}.side-icon{font-size:1.1rem}

@media(max-width:760px){
  .home-full-town .node-lumberyard{left:20%!important;top:12%!important;z-index:6}
  .home-full-town .node-keep{left:60%!important;top:38%!important;z-index:5}
  .home-full-town .node-lumberyard .node-label,.home-full-town .node-lumberyard .label{transform:translateY(-12px)}
  .battle-side-strip{top:8px}.battle-side-pill{padding:5px 8px}.battle-side-pill small{max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* v33: action slots, era popup, map readability, and log clarity */
.era-trigger{border:1px solid #976a48;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:8px}
.era-panel{max-width:780px;margin:7vh auto;max-height:84vh;overflow:auto}.era-unlock-list{display:grid;gap:10px}.era-unlock-row{display:grid;grid-template-columns:120px minmax(180px,1fr) 1.4fr;gap:12px;align-items:start;padding:12px;border-radius:16px;background:rgba(255,255,255,.58);border:2px solid rgba(112,68,32,.18)}.era-unlock-row.current{border-color:#d99a29;background:linear-gradient(180deg,#fff6d5,#f2d48d)}.era-unlock-row.locked{opacity:.62}.era-unlock-row small{display:block;color:#6c523a;font-weight:800}.era-unlock-row ul{margin:0;padding-left:18px}.action-slot-meter{height:12px;border-radius:999px;background:rgba(0,0,0,.14);overflow:hidden;margin:0 0 10px}.action-slot-meter span{display:block;height:100%;background:linear-gradient(90deg,#2f79d6,#5bb4ff);border-radius:999px}.world-mini{left:18px!important;right:auto!important;bottom:18px!important}.army-meta-list{display:grid;gap:8px}.army-meta-list div{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.55)}.army-meta-list b{color:#4a2717}.log-outcome-victory{border-color:#4f9e3d!important}.log-outcome-victory summary{background:linear-gradient(90deg,rgba(69,170,68,.20),rgba(255,255,255,.35))}.log-outcome-defeat{border-color:#bd3f36!important}.log-outcome-defeat summary{background:linear-gradient(90deg,rgba(200,42,42,.20),rgba(255,255,255,.35))}.log-role-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:1000}.log-role-chip.attack{background:#ffe4dc;color:#7d201a}.log-role-chip.defense{background:#dfeeff;color:#194e8c}.process-row.process-incoming-attack{border-color:#c92d2d!important;background:linear-gradient(90deg,rgba(210,34,34,.22),#fff5d8)!important}.process-row.process-own-action{border-color:#2f79d6!important;background:linear-gradient(90deg,rgba(47,121,214,.18),#fff5d8)!important}
@media(max-width:760px){.era-unlock-row{grid-template-columns:1fr}.world-mini{display:block!important;width:140px!important;bottom:82px!important;left:10px!important}.world-mini .section-head h2,.world-mini .muted{display:none}.world-mini .section-head{margin:0}.world-mini canvas{width:120px;height:120px}.army-meta-list div{display:block}.army-meta-list span{display:block;margin-top:3px}.era-panel{margin:5vh 10px}}

/* v34: mobile polish, live resource trends, notifications and player search */
.res-chip{gap:6px}.res-trend{margin-left:3px;font-size:11px;font-weight:1000;border-radius:999px;padding:2px 6px;white-space:nowrap}.res-trend.positive{background:#dff4cf;color:#1d6f22}.res-trend.negative{background:#ffe0dc;color:#b32626}.player-search-panel{max-width:460px}.player-search-panel .chat-search,.player-search-panel .source-select{width:100%;margin:8px 0}.player-search-panel .source-select{min-height:148px}.notification-settings-box summary{display:flex;justify-content:space-between;gap:12px;align-items:center;cursor:pointer}.notification-settings-box summary small{color:#6f553e;font-weight:800}.notification-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:14px 0}.notification-toggle{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.55);border:1px solid rgba(80,48,23,.14);border-radius:14px;padding:10px}.notification-toggle input{width:20px;height:20px;accent-color:#8d2f3f}.notification-toggle span{display:grid}.notification-toggle small{color:#7a6149;font-weight:800}.notification-actions{display:flex;gap:8px;flex-wrap:wrap}.inbox-title{display:grid;gap:2px}.inbox-category{text-transform:uppercase;color:#80634a;font-size:10px;letter-spacing:.06em;font-weight:1000}
@media(max-width:800px){.mission-card summary{grid-template-columns:32px 42px minmax(0,1fr) auto!important;gap:8px!important;padding:12px!important}.mission-card summary .badge{font-size:12px!important;line-height:1!important;padding:7px 9px!important;min-width:64px;text-align:center}.mission-card small{font-size:12px}.mission-progress-big{width:112px;height:112px}.mission-progress-big b{font-size:28px}}
@media(max-width:760px){.home-full-town .node-lumberyard{left:28%!important;top:12%!important}.home-full-town .node-keep{left:60%!important;top:38%!important}.map-controls{gap:8px}.map-controls button{width:54px;height:54px}.res-trend{font-size:10px;padding:1px 5px}}


/* v35 map, mobile, and home visual polish */
.home-full-town .node-walls{top:79%!important;}
@media(max-width:760px){
  .home-full-town .node-lumberyard{left:35%!important;top:13%!important;}
  .world-mini{display:block!important;width:132px!important;left:8px!important;bottom:88px!important;padding:7px!important;border-radius:16px!important;z-index:8!important;box-shadow:0 8px 20px rgba(0,0,0,.22)!important;}
  .world-mini canvas{width:112px!important;height:112px!important;border:2px solid rgba(255,255,255,.45)!important;border-radius:12px!important;display:block;margin:0 auto;}
  .world-mini .section-head h2,.world-mini .muted,.world-mini #mini-home{display:none!important;}
  .world-mini .section-head{display:none!important;}
  .army-modal{left:auto!important;right:8px!important;bottom:88px!important;width:min(260px,calc(100vw - 156px))!important;max-height:38vh!important;overflow:auto!important;z-index:24!important;padding:10px!important;}
  .army-modal .section-head h2{font-size:16px!important;}
  .army-meta-list div{padding:7px 8px!important;font-size:12px!important;}
}
.army-bloodied-row{background:linear-gradient(90deg,rgba(158,18,18,.18),rgba(255,255,255,.58))!important;border:1px solid rgba(128,0,0,.18);}

/* v36 alliance descriptions and invites */
.alliance-short-desc,.alliance-list-desc,.leader-alliance-desc{display:block;margin-top:4px;color:#e8d8aa;font-size:.88rem;line-height:1.3}.alliance-rules-box{margin:12px 0;padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(0,0,0,.18)}.alliance-rules-box p{margin:.35rem 0 0;color:#e8dfc7}.alliance-invites-panel{margin-bottom:16px}.leader-alliance-desc{color:#bda96f;max-width:560px}
.alliance-settings-box{margin:12px 0;padding:10px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(0,0,0,.12)}.alliance-settings-box summary{cursor:pointer;font-weight:800;color:#f5d48a}.compact-form textarea{min-height:100px}.compact-form input,.compact-form textarea,.compact-form select{max-width:100%}

/* v37: mobile polish, minimap, alliance tier/shop */
@media (min-width: 761px){
  .world-mini{width:260px!important;left:18px!important;bottom:18px!important;padding:12px!important;}
  .world-mini canvas{width:220px!important;height:220px!important;display:block;margin:0 auto;border:2px solid rgba(255,255,255,.35);border-radius:14px;}
}
.world-mini.minimized{width:54px!important;height:54px!important;padding:6px!important;overflow:hidden;opacity:.72;pointer-events:none;}
.world-mini.minimized canvas{display:none!important}.world-mini.minimized:after{content:'Map';display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:rgba(26,48,31,.86);color:#fff;font-weight:1000;font-size:11px}.world-mini.minimized .section-head,.world-mini.minimized .muted{display:none!important}
@media(max-width:760px){.world-mini.minimized{left:8px!important;bottom:88px!important;width:46px!important;height:46px!important}}
@media(max-width:760px){
  .home-full-town .node-storehouse{top:58%!important;left:76%!important;}
  .home-full-town .node-storehouse .label{transform:translateY(-2px);font-size:11px;white-space:nowrap;}
  .home-full-town .node-lumberyard{left:39%!important;}
}
.guard-grant-modal .glass-panel{max-width:420px}.guard-grant-detail{display:flex;gap:12px;align-items:center}.guard-grant-detail img{width:48px;height:48px;image-rendering:pixelated}.round-action.guard{background:linear-gradient(180deg,#fff0cf,#e5b25d)}
.tier-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.tier-meter{height:12px;border-radius:999px;background:rgba(0,0,0,.14);overflow:hidden}.tier-meter span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#9a632d,#f3bd58)}.tier-meter.ruby span{background:linear-gradient(90deg,#7b3bc8,#d087ff)}.next-tier-box{border:2px solid rgba(112,68,32,.18);border-radius:16px;padding:12px;background:rgba(255,255,255,.55);margin:10px 0}.crown-divide-warning{border-color:#b32626;background:linear-gradient(180deg,#ffe1d6,#fff5df)}.warning-text{font-weight:1000;color:#982121}.alliance-contrib-card canvas{width:100%;height:auto;border-radius:16px;border:2px solid rgba(112,68,32,.18)}.member-stat-trigger{width:100%;text-align:left;cursor:pointer}.member-stat-popover{display:none;position:fixed;inset:15vh auto auto 50%;transform:translateX(-50%);z-index:90;max-width:620px;width:calc(100vw - 28px);padding:16px;border-radius:22px;background:#fff7df;border:3px solid rgba(112,68,32,.32);box-shadow:0 18px 50px rgba(0,0,0,.32)}.member-stat-popover.active{display:block}.alliance-offer-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.alliance-offer{position:relative}.alliance-offer .offer-icon{font-size:34px}.alliance-offer.mythic{border-color:#8b45d1;background:linear-gradient(180deg,#f5e5ff,#fff7dc)}.alliance-offer.rare{border-color:#407bd6;background:linear-gradient(180deg,#eaf2ff,#fff7dc)}@media(max-width:900px){.alliance-offer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tier-progress-grid{grid-template-columns:1fr}}

/* V38 account / validation / notification channels */
.form-error-summary{border:1px solid rgba(195,52,52,.45);background:rgba(90,10,20,.14);color:#ffd6d6;border-radius:14px;padding:10px 12px;margin:8px 0 12px;font-weight:800;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.field-block{display:flex;flex-direction:column;gap:5px;margin:8px 0;text-align:left}
.field-block span{font-weight:800;color:#f3e2c4}
.field-block input,.field-block select,.field-block textarea{width:100%;box-sizing:border-box;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(20,12,20,.62);color:#fff;padding:10px 12px;outline:none}
.field-block input:focus,.field-block textarea:focus,.field-block select:focus{border-color:rgba(109,168,255,.75);box-shadow:0 0 0 3px rgba(72,139,235,.18)}
.field-help{color:#c7b9a1;font-size:.82rem}.field-error{color:#ff9f9f;font-weight:800;font-size:.82rem}.account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}.account-card{min-height:160px}.account-form .errorlist{color:#ff9f9f;margin:4px 0 0;padding-left:18px}.account-panel{max-width:460px}.action-row.wrap{flex-wrap:wrap}.notification-channel-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;margin-bottom:12px}.notification-toggle.compact{min-height:auto}.notification-table{display:flex;flex-direction:column;gap:6px;margin:12px 0}.notification-row{display:grid;grid-template-columns:minmax(160px,1fr) 70px 70px 70px;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035);border-radius:12px;padding:8px 10px}.notification-row-head{background:rgba(255,255,255,.08);color:#f4dfb5}.notification-row small{display:block;color:#bfae96;font-size:.75rem}.notification-row label{text-align:center}.notification-row input[type="checkbox"],.notification-toggle input[type="checkbox"]{width:18px;height:18px;accent-color:#6aa6ff}.push-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 12px}.account-trigger{border:1px solid rgba(255,255,255,.13);background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.05));border-radius:999px;color:#f7e6c6;padding:7px 10px;display:inline-flex;gap:6px;align-items:center;cursor:pointer}.account-trigger:hover{filter:brightness(1.1)}
@media (max-width:640px){.notification-row{grid-template-columns:minmax(120px,1fr) 50px 50px 50px;font-size:.88rem}.notification-row-head{font-size:.78rem}.account-trigger b{display:none}.account-grid{grid-template-columns:1fr}.field-block input,.field-block select,.field-block textarea{font-size:16px}}


.inline-pixel{width:22px;height:22px;image-rendering:pixelated;vertical-align:-5px;margin-right:6px}
.crown-divide-loyalty{margin:0 0 14px;border-color:rgba(212,169,74,.45);background:linear-gradient(135deg,rgba(255,244,207,.14),rgba(63,125,50,.12))}
.crown-divide-loyalty .pill.warn{background:#7a341b;color:#ffe7b0;border-color:#d7a94a}
.crown-divide-loyalty .pill.green{background:#224d2d;color:#d8ffd9;border-color:#63c36b}
.alliance-shop-offer{display:grid;grid-template-columns:74px 1fr auto;gap:12px;align-items:center;min-height:136px}
.alliance-shop-offer .offer-art{width:70px;height:70px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(180deg,#fff2bd,#b98535);box-shadow:inset 0 0 0 2px #5b3519}
.alliance-shop-offer .offer-art img{max-width:58px;max-height:58px;image-rendering:pixelated}
.alliance-shop-offer .offer-price{display:flex;gap:6px;align-items:center;font-weight:900;background:#2d1a12;color:#ffe9a6;border:2px solid #8b5a2b;border-radius:10px;padding:7px 9px;white-space:nowrap}
.alliance-shop-offer .offer-price img{width:20px;height:20px;image-rendering:pixelated}
.alliance-shop-offer.rarity-mythic{box-shadow:0 0 0 2px rgba(142,91,255,.45),0 10px 28px rgba(53,22,97,.28)}
.alliance-shop-offer.rarity-rare{box-shadow:0 0 0 2px rgba(78,130,255,.35),0 10px 22px rgba(31,62,118,.20)}
.alliance-form-panel,.alliance-settings-panel{color:#ffe9b0}
.alliance-form-panel input,.alliance-form-panel textarea,.alliance-form-panel select{background:#2b1b12;color:#ffe9b0;border:2px solid #8b5a2b;border-radius:10px}
.alliance-form-panel .btn-small,.alliance-settings-panel .btn-small{background:#6e3b1e;color:#fff4cf;border-color:#d7a94a}
@media(max-width:720px){.alliance-shop-offer{grid-template-columns:58px 1fr;}.alliance-shop-offer .offer-price{grid-column:1/3;justify-content:center}.alliance-shop-offer button{grid-column:1/3}.alliance-shop-offer .offer-art{width:56px;height:56px}.alliance-shop-offer .offer-art img{max-width:46px;max-height:46px}}

/* v40: admin messaging, readable forms, map controls */
.field-block span,.field-block label,.account-card label,.account-card h2,.account-card h3,.notification-settings-form,.notification-settings-form label,.notification-settings-form b,.notification-settings-form small{color:#3b2517!important;text-shadow:none!important;}
.field-block input,.field-block select,.field-block textarea,.account-form input,.account-form select,.account-form textarea,.auth-card input,.auth-form input,.auth-card select,.auth-card textarea,.styled-form input,.styled-form textarea,.styled-form select{background:#fff8e7!important;color:#2b1307!important;border:2px solid #8b5a2b!important;border-radius:12px!important;box-shadow:inset 0 2px 0 rgba(255,255,255,.55)!important;}
.field-block input::placeholder,.auth-card input::placeholder,.styled-form textarea::placeholder,.styled-form input::placeholder{color:#7a6046!important;opacity:1!important;}
.field-block input:focus,.field-block textarea:focus,.field-block select:focus,.auth-card input:focus,.styled-form input:focus,.styled-form textarea:focus{border-color:#c98a2e!important;box-shadow:0 0 0 3px rgba(201,138,46,.22),inset 0 2px 0 rgba(255,255,255,.55)!important;}
.field-help,.notification-row small{color:#765739!important}.field-error,.account-form .errorlist{color:#a91227!important;font-weight:1000!important}.form-error-summary{background:#ffe5df!important;color:#8a1720!important;border:2px solid #d54d46!important}.notification-row{background:#fff5d8!important;border:2px solid rgba(126,73,31,.18)!important;color:#321708!important}.notification-row-head{background:#ead092!important;color:#321708!important}.notification-row input[type="checkbox"],.notification-toggle input[type="checkbox"]{accent-color:#7d4be0}.push-actions{display:none!important}.admin-message,.inbox-row.admin-message{background:linear-gradient(135deg,#4b1b66,#2b0d43)!important;color:#fff3cf!important;border-color:#d7a94a!important;box-shadow:0 0 0 2px rgba(215,169,74,.22),0 12px 30px rgba(41,13,67,.22)!important}.admin-message h3,.admin-message b,.admin-message p,.admin-message small{color:#fff3cf!important}.inbox-row.pinned{position:relative}.inbox-row.pinned:before{content:'Pinned';position:absolute;top:8px;right:10px;padding:3px 7px;border-radius:999px;background:#d7a94a;color:#3b1207;font-weight:1000;font-size:11px}.direct-chat-panel .list-row{background:#fff5d8;color:#301507}.admin-contact-card{padding:14px;border-radius:18px;background:rgba(255,245,216,.72);border:2px solid rgba(126,73,31,.18);color:#2b1307}.admin-contact-card p{color:#5f4228}.mini-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.world-mini{resize:both;overflow:auto;min-width:190px;min-height:210px;max-width:420px;max-height:520px}.world-mini canvas{width:100%!important;height:auto!important;max-width:none!important;image-rendering:pixelated}.world-mini .section-head{align-items:center}.world-mini.minimized{resize:none!important}.log-role-chip.battle{background:#ffe2ba;color:#7a2a07}.log-role-chip.defense{background:#e3edff;color:#173d7a}@media (min-width:761px){.world-mini{width:300px!important;left:18px!important;bottom:18px!important}.world-mini canvas{min-width:220px}}
@media(max-width:760px){.world-mini{resize:none!important}.world-mini canvas{width:112px!important;height:112px!important}.mini-actions #mini-zoom-in,.mini-actions #mini-zoom-out{display:none!important}}

/* v40.2: shop/chat/account hotfixes */
.badge.warning{background:#ffe0cf;color:#8a2618;border:1px solid #d56b4d}
.alliance-shop-card{grid-column:1 / -1;}
.alliance-shop-card .section-head{align-items:flex-start;gap:12px;}
.alliance-offer-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;
  gap:14px!important;
}
.alliance-shop-offer{
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:16px!important;
  overflow:hidden!important;
}
.alliance-shop-offer .offer-art{
  width:86px!important;height:86px!important;margin:0 auto 2px!important;flex:0 0 auto!important;
}
.alliance-shop-offer .offer-art img{max-width:72px!important;max-height:72px!important;}
.alliance-shop-offer .offer-copy{min-width:0;text-align:center;display:grid;gap:6px;}
.alliance-shop-offer .offer-badge{justify-self:center;display:inline-flex;border-radius:999px;background:rgba(69,34,11,.12);border:1px solid rgba(92,53,18,.18);padding:4px 8px;font-size:11px;font-weight:1000;text-transform:uppercase;letter-spacing:.04em;color:#5b3519;}
.alliance-shop-offer .offer-copy h3{font-size:20px!important;line-height:1.05!important;margin:0!important;overflow-wrap:anywhere;}
.alliance-shop-offer .offer-copy p{font-size:14px!important;line-height:1.25!important;margin:0!important;overflow-wrap:anywhere;}
.alliance-shop-offer .offer-price{align-self:center;justify-content:center;max-width:100%;white-space:normal!important;}
.alliance-shop-offer button{align-self:center;width:min(100%,170px);}
.admin-contact-card .support-form{display:grid;gap:12px;margin-top:12px;}
.admin-contact-card .support-form label{display:grid;gap:6px;font-weight:1000;color:#321708;}
.admin-contact-card .support-form input,.admin-contact-card .support-form textarea{width:100%;border:2px solid #aa7b43;border-radius:14px;background:#fffdf8;color:#301507;padding:12px 14px;font-weight:800;}
.inbox-settings-panel .notification-toggle small{color:#5f4228!important;}
.danger-account-card{border-color:#b43a28!important;background:linear-gradient(180deg,#fff0d9,#f2d59f)!important;}
@media(max-width:720px){
  .alliance-offer-grid{grid-template-columns:1fr!important;}
  .alliance-shop-offer{display:flex!important;}
}

/* v40.4: reliable minimap edge/corner resizing */
.world-mini{
  resize:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  min-width:150px!important;
  min-height:150px!important;
  max-width:min(620px,calc(100vw - 28px))!important;
  max-height:min(620px,calc(100vh - 110px))!important;
  touch-action:none;
}
.world-mini canvas{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  display:block!important;
  image-rendering:pixelated;
  user-select:none;
}
.world-mini .mini-actions{position:relative;z-index:7;}
.world-mini .mini-actions #mini-zoom-in,.world-mini .mini-actions #mini-zoom-out{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0!important;
  line-height:1!important;
}
.mini-resize-handle{position:absolute;z-index:8;background:transparent;touch-action:none;}
.mini-resize-n{left:18px;right:18px;top:-7px;height:14px;cursor:ns-resize;}
.mini-resize-s{left:18px;right:18px;bottom:-7px;height:14px;cursor:ns-resize;}
.mini-resize-e{top:18px;bottom:18px;right:-7px;width:14px;cursor:ew-resize;}
.mini-resize-w{top:18px;bottom:18px;left:-7px;width:14px;cursor:ew-resize;}
.mini-resize-ne,.mini-resize-nw,.mini-resize-se,.mini-resize-sw{width:22px;height:22px;}
.mini-resize-ne{right:-8px;top:-8px;cursor:nesw-resize;}
.mini-resize-nw{left:-8px;top:-8px;cursor:nwse-resize;}
.mini-resize-se{right:-8px;bottom:-8px;cursor:nwse-resize;}
.mini-resize-sw{left:-8px;bottom:-8px;cursor:nesw-resize;}
.world-mini:hover .mini-resize-se,.world-mini:hover .mini-resize-ne,.world-mini:hover .mini-resize-nw,.world-mini:hover .mini-resize-sw{background:rgba(255,229,151,.28);border-radius:8px;box-shadow:inset 0 0 0 1px rgba(104,62,24,.35);}
.world-mini.resizing{user-select:none;box-shadow:0 0 0 3px rgba(255,215,104,.32),0 12px 30px rgba(0,0,0,.25)!important;}
.world-mini.minimized .mini-resize-handle{display:none!important;}
@media(max-width:760px){
  .world-mini{min-width:118px!important;min-height:118px!important;max-width:calc(100vw - 18px)!important;max-height:55vh!important;}
  .world-mini .section-head{display:flex!important;justify-content:center!important;margin-bottom:4px!important;}
  .world-mini .section-head h2,.world-mini .muted,.world-mini #mini-home{display:none!important;}
  .world-mini .mini-actions{display:flex!important;justify-content:center!important;width:100%;gap:4px!important;}
  .world-mini .mini-actions #mini-zoom-in,.world-mini .mini-actions #mini-zoom-out{display:inline-flex!important;min-width:28px!important;height:28px!important;font-size:16px!important;}
}

/* v40.5: alliance shop rotation economics */
.alliance-shop-note{margin-top:-4px;margin-bottom:12px;color:#6b4b2d!important;}
.alliance-shop-offer .offer-limit{align-self:center;text-align:center;font-size:12px;font-weight:900;color:#6b4b2d;background:rgba(255,255,255,.42);border:1px solid rgba(112,68,32,.16);border-radius:999px;padding:5px 9px;max-width:100%;}
.alliance-shop-offer.claimed{filter:saturate(.72);opacity:.82;position:relative;}
.alliance-shop-offer.claimed:after{content:'Redeemed';position:absolute;top:10px;right:10px;background:#52311d;color:#ffe7a8;border:2px solid #8b5a2b;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:1000;text-transform:uppercase;letter-spacing:.04em;}
.alliance-shop-offer.claimed button{background:#7d6a51!important;color:#fff2cf!important;box-shadow:none!important;cursor:not-allowed;}

/* v40.6: alliance shop matches the normal store redeemed state */
.alliance-offer-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.alliance-shop-offer{
  display:block!important;
  min-height:245px!important;
  padding:16px!important;
  text-align:center;
  overflow:hidden!important;
}
.alliance-shop-offer .offer-art{
  height:92px!important;
  width:auto!important;
  margin:0!important;
}
.alliance-shop-offer .offer-art img{
  width:92px!important;
  height:92px!important;
  max-width:92px!important;
  max-height:92px!important;
}
.alliance-shop-offer h3{
  margin:6px 0 6px!important;
  font-size:20px!important;
  line-height:1.12!important;
}
.alliance-shop-offer p{
  margin:0 0 10px!important;
  font-size:14px!important;
  line-height:1.3!important;
}
.alliance-shop-offer .offer-price{
  display:inline-flex!important;
  margin:2px auto 8px!important;
  width:auto!important;
  white-space:nowrap!important;
}
.alliance-shop-offer .offer-limit{
  margin:0 auto 10px!important;
  max-width:calc(100% - 10px)!important;
}
.alliance-shop-offer .alliance-offer-buy-form{margin:0;}
.alliance-shop-offer .buy-button{width:100%!important;}
.alliance-shop-offer.redeemed{filter:saturate(.65) brightness(.88)!important;opacity:1!important;}
.alliance-shop-offer.redeemed:after{content:none!important;}
.alliance-shop-offer.redeemed .offer-art,.alliance-shop-offer.redeemed h3,.alliance-shop-offer.redeemed p{opacity:.58;}
.alliance-shop-offer.redeemed button{cursor:not-allowed;}
@media(max-width:980px){.alliance-offer-grid{grid-template-columns:1fr!important;}}

/* v41: alliance page/tab polish and store consistency */
.alliance-tabs-panel{padding:18px;}
.alliance-tabs{margin-bottom:16px;gap:10px;}
.alliance-tabs .tab-btn{border:3px solid #8b541d;border-radius:16px;background:#673d2d;color:#fff4d4;box-shadow:0 4px 0 rgba(0,0,0,.22);}
.alliance-tabs .tab-btn.active{background:linear-gradient(#ffe891,#d89419);color:#2b1306;}
.alliance-tab-content{display:none;}
.alliance-tab-content.active{display:block;}
.alliance-dashboard.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;}
.alliance-command-card.clean-card{background:rgba(255,255,255,.28);border:2px solid rgba(126,79,35,.25);border-radius:20px;padding:14px;box-shadow:none;}
.embedded-store{padding:0;margin:0;}
.embedded-store .offer-grid.premium-offers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.embedded-store .offer-card.deluxe-card{display:flex;flex-direction:column;min-height:300px;text-align:left;}
.embedded-store .offer-card .offer-art{text-align:center;}
.embedded-store .offer-card .offer-limit{font-size:13px;font-weight:900;color:#6b4b2d;background:rgba(255,255,255,.42);border:1px solid rgba(112,68,32,.16);border-radius:999px;padding:5px 9px;text-align:center;margin:4px 0 10px;}
.embedded-store .offer-card .offer-buy-form{margin-top:auto;}
.contribution-card canvas{width:100%;height:auto;border:2px solid rgba(126,79,35,.24);border-radius:14px;display:block;}
.member-avatar{font-size:22px;}
@media(max-width:900px){.alliance-dashboard.two-col,.embedded-store .offer-grid.premium-offers{grid-template-columns:1fr;}.alliance-tabs{flex-wrap:nowrap;overflow-x:auto;}.alliance-tabs .tab-btn{white-space:nowrap;}}

/* v42: refining, market and resource expansion */
.refining-grid,.market-listing-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.refining-card.locked{opacity:.68;filter:saturate(.7);}
.refining-card .compact-cost-row,.towers-panel .compact-cost-row{margin:10px 0;}
.not-enough{color:#9c1b1b!important;filter:saturate(1.2);}
.market-grid{align-items:start;}
.market-listing-grid .store-card{min-height:280px;}
.process-card{display:flex;align-items:center;justify-content:space-between;gap:12px;border:2px solid rgba(126,79,35,.24);border-radius:16px;padding:12px;background:rgba(255,255,255,.28);margin:8px 0;}
.compact-form{display:grid;gap:10px;}
.compact-form label{font-weight:900;display:grid;gap:4px;}
.compact-form input,.compact-form select{border:2px solid #8b5a2b;border-radius:10px;padding:9px;background:#fff8df;color:#241004;font-weight:800;}
@media(max-width:900px){.refining-grid,.market-listing-grid{grid-template-columns:1fr;}}

/* v42.1: clearer daily reward reveal and alliance settings readability */
.daily-reward-list{display:grid;gap:8px;margin:14px auto;max-width:420px;text-align:left;}
.daily-reward-row{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;background:rgba(255,255,255,.58);border:2px solid rgba(126,79,35,.22);border-radius:14px;padding:8px 10px;font-weight:900;color:#321708;}
.daily-reward-row img{width:30px;height:30px;object-fit:contain;image-rendering:pixelated;}
.daily-reward-row b{color:#6c2d10;}
.big-chest-button.claimed{filter:saturate(.8);cursor:not-allowed;}
.alliance-settings-box{background:rgba(255,248,223,.78)!important;border:2px solid rgba(126,79,35,.28)!important;border-radius:16px!important;padding:10px!important;color:#321708!important;}
.alliance-settings-box summary{color:#321708!important;font-weight:1000!important;cursor:pointer;}
.alliance-settings-box input,.alliance-settings-box textarea,.alliance-settings-box select{background:#fff8df!important;color:#301507!important;border:2px solid #8b5a2b!important;border-radius:12px!important;padding:10px!important;}
.alliance-settings-box label{color:#321708!important;font-weight:900!important;}

/* v42.1: minimap stays bottom-left; popups hide it completely */
.world-mini{left:18px!important;right:auto!important;bottom:18px!important;top:auto!important;}
.world-mini.minimized{display:none!important;}
@media(max-width:760px){.world-mini{left:8px!important;right:auto!important;bottom:88px!important;top:auto!important;}}

/* v42.2: minimap critical behavior reset
   - fixed bottom-left anchor
   - resize only from the top-right corner
   - + / - zoom minimap contents, not panel size
   - fully hidden while map detail/event panels are open */
.world-mini{
  left:18px!important;
  right:auto!important;
  bottom:18px!important;
  top:auto!important;
  resize:none!important;
  overflow:visible!important;
  touch-action:none!important;
}
.world-mini.minimized{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.world-mini canvas{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  display:block!important;
  image-rendering:pixelated!important;
  cursor:crosshair;
}
.mini-resize-handle{display:none!important;}
.mini-resize-ne{
  display:block!important;
  position:absolute!important;
  z-index:9!important;
  right:-10px!important;
  top:-10px!important;
  width:28px!important;
  height:28px!important;
  cursor:nesw-resize!important;
  background:rgba(255,229,151,.24)!important;
  border-radius:9px!important;
  box-shadow:inset 0 0 0 1px rgba(104,62,24,.35)!important;
}
.world-mini:hover .mini-resize-ne,
.world-mini.resizing .mini-resize-ne{
  background:rgba(255,215,104,.44)!important;
  box-shadow:inset 0 0 0 2px rgba(104,62,24,.48),0 3px 10px rgba(0,0,0,.18)!important;
}
@media(max-width:760px){
  .world-mini{left:8px!important;right:auto!important;bottom:88px!important;top:auto!important;}
  .mini-resize-ne{display:none!important;}
}
/* v42.3 affordability feedback */
.btn:disabled,.btn-small:disabled,button:disabled{cursor:not-allowed;filter:grayscale(1);opacity:.62;box-shadow:none;}
.buy-button.insufficient:disabled{background:linear-gradient(180deg,#ece7dc,#bdb5a6)!important;color:#6b211b!important;border-color:#806c5a!important;filter:grayscale(1)!important;opacity:.76!important;}
.action-btn.insufficient:disabled,.tile-action-btn.insufficient:disabled{background:linear-gradient(180deg,#ece7dc,#bdb5a6)!important;color:#6b211b!important;border-color:#806c5a!important;filter:grayscale(1)!important;opacity:.76!important;}
.form-warning{margin:6px 0;color:#a01624;font-weight:900;}

/* v42.4: era-tier resource colors for faster visual scanning. */
.res-coal,.res-steel{background:linear-gradient(180deg,#d6d1c6,#77736d)!important;color:#201812!important;border-color:#4c4640!important;}
.res-stone,.res-pitch{background:linear-gradient(180deg,#e4ddd0,#9f8f75)!important;color:#23190d!important;border-color:#695438!important;}
.res-silk,.res-furs{background:linear-gradient(180deg,#f1d7ff,#7b3c93)!important;color:#fff7ff!important;border-color:#572060!important;}
.era-ready-action{animation:eraPulse 1.8s ease-in-out infinite;}
@keyframes eraPulse{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.04)}}
.era-advance-panel{max-width:620px;text-align:center;overflow:hidden;position:relative}.era-reward-list{display:grid;gap:8px;margin:18px 0}.era-claim-button{font-size:20px;box-shadow:0 8px 0 #7c481c!important}.upgrade-section-title{margin:18px 0 10px;font-size:22px;color:#4a2c16}.upgrade-section-title small{display:block;color:#876b50;font-size:13px}.category-upgrade-grid{margin-bottom:18px}

/* v42.5: world status, pinned crown alerts, mobile minimap and compact garrison rows. */
.inbox-item.category-alliance.pinned{
  background:linear-gradient(135deg,#fff3b8,#efc34a 58%,#b87817)!important;
  border-color:#8b5616!important;
  color:#341706!important;
  box-shadow:0 12px 30px rgba(139,86,22,.28), inset 0 0 0 2px rgba(255,255,255,.28)!important;
}
.inbox-item.category-alliance.pinned summary{background:linear-gradient(90deg,rgba(255,255,255,.28),rgba(255,212,88,.18))!important;}
.inbox-item.category-alliance.pinned .inbox-title:before{content:'👑 ';}
.world-state-pill.open{background:#e8f3d9;color:#355815;border:1px solid #9bb86f;}
.world-state-pill.challenged,.road-status.challenged{color:#9a221f;font-weight:1000;}
.world-state-pill.crown-divide,.road-status.crown-divide{background:#fff1b8;color:#86500c;border:1px solid #c48b1e;border-radius:999px;padding:3px 9px;font-weight:1000;display:inline-flex;margin-top:6px;}
.road-status.new-world{color:#236a8b;font-weight:1000;}
.ai-lord-chip{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;background:#efe2c8;color:#6f5335;font-size:11px;font-weight:1000;text-transform:uppercase;letter-spacing:.04em;vertical-align:middle;}
.process-timer-card .queue-progress{margin-top:8px;background:rgba(63,38,18,.13);border-radius:999px;height:10px;overflow:hidden;}
.process-timer-card .queue-progress span{display:block;height:100%;background:linear-gradient(90deg,#c99132,#ffd56b);border-radius:999px;}
.garrison-unit-row{display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;padding:8px 10px!important;}
.garrison-unit-row img{width:30px!important;height:30px!important;object-fit:contain!important;image-rendering:pixelated!important;}
.garrison-unit-copy{min-width:0!important;line-height:1.15!important;}
.garrison-unit-copy b{display:block;white-space:normal;overflow-wrap:anywhere;}
.garrison-unit-copy .muted{white-space:normal;overflow-wrap:anywhere;}
@media(max-width:760px){
  .world-mini{left:8px!important;right:auto!important;bottom:78px!important;top:auto!important;width:132px!important;max-width:42vw!important;min-width:112px!important;}
  .mini-resize-ne{display:block!important;right:-8px!important;top:-8px!important;width:32px!important;height:32px!important;}
  .world-mini .mini-controls{transform:scale(.82);transform-origin:bottom left;}
}

/* v42.6: follow-up logic polish, stronger crown alert, market nav and mobile HUD. */
.inbox-item.crown-divide-alert,
.inbox-item.crown-divide-alert.pinned,
.inbox-item.category-alliance.crown-divide-alert.pinned{
  background:linear-gradient(135deg,#fff8c9 0%,#ffd765 48%,#c58118 100%)!important;
  border:4px solid #9b5b0e!important;
  color:#2b1303!important;
  box-shadow:0 16px 38px rgba(140,82,12,.36), inset 0 0 0 2px rgba(255,255,255,.42)!important;
}
.inbox-item.crown-divide-alert summary{
  background:linear-gradient(90deg,rgba(255,255,255,.36),rgba(255,199,58,.22))!important;
  border-radius:16px;
}
.inbox-item.crown-divide-alert .inbox-title:before{content:'👑 ';}
.inbox-item.crown-divide-alert .pinned-label{background:#3b1b05!important;color:#ffe9a0!important;border-radius:999px;padding:2px 8px;margin-left:6px;}
.market-hero{position:relative;align-items:flex-start!important;}
.market-hero .hero-actions,.market-hero-actions{position:relative;z-index:2;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;min-width:max-content;}
.market-hero .hero-actions .btn-small{white-space:nowrap;}
@media(max-width:760px){
  .market-hero{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;}
  .market-hero .hero-actions,.market-hero-actions{justify-content:flex-start!important;min-width:0!important;margin-top:0!important;}
  .top-shell{padding:8px 8px 9px!important;}
  .brand-row{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;align-items:start!important;}
  .brand{min-width:0!important;}
  .brand-icon{width:38px!important;height:38px!important;min-width:38px!important;}
  .brand strong{font-size:18px!important;}
  .brand small{font-size:11px!important;}
  .top-pills{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:5px!important;width:100%!important;justify-content:flex-start!important;padding:0 0 4px!important;}
  .top-pills::-webkit-scrollbar{display:none;}
  .top-pills .top-action,.top-pills .era-pill,.top-pills .crown-pill,.account-trigger{flex:0 0 auto!important;min-height:34px!important;padding:6px 8px!important;border-radius:14px!important;font-size:12px!important;white-space:nowrap!important;}
  .top-pills .top-icon{width:21px!important;height:21px!important;}
  .top-pills .profile-action b{display:none!important;}
  .crown-pill{display:inline-flex!important;align-items:center!important;gap:4px!important;}
  .resource-rail{display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:5px!important;padding:3px 0 4px!important;margin:0!important;}
  .resource-rail::-webkit-scrollbar{display:none;}
  .res-chip{flex:0 0 auto!important;min-width:72px!important;height:36px!important;min-height:36px!important;padding:5px 7px!important;border-radius:13px!important;border-width:2px!important;gap:4px!important;justify-content:center!important;font-size:12px!important;}
  .res-icon img{width:22px!important;height:22px!important;}
  .res-value{font-size:12px!important;line-height:1!important;}
  .res-trend{display:none!important;}
  .res-tip{position:fixed!important;left:8px!important;right:8px!important;top:124px!important;width:auto!important;max-height:55vh!important;overflow:auto!important;z-index:999!important;}
}
/* v42.9 spy report log cards */
.spy-report-item summary{grid-template-columns:auto minmax(0,1fr) auto auto!important}
.spy-report-detail .quick-result-row span{display:inline-flex;align-items:center;gap:6px}
.spy-log-grid{grid-template-columns:minmax(220px,1fr) minmax(260px,2fr)!important}
.spy-composition-card{min-width:0}
.log-unit-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(142px,1fr));gap:8px;margin-top:10px}
.log-unit-card{display:flex;align-items:center;gap:7px;padding:6px 8px;border-radius:13px;background:rgba(255,255,255,.58);border:1px solid rgba(107,59,19,.18);min-width:0}
.log-unit-card img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated;flex:0 0 auto}
.log-unit-card span{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.08}
.log-unit-card strong{font-size:13px;color:#2c1709;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.log-unit-card small{font-size:12px;color:#654024;white-space:nowrap}
@media(max-width:760px){.spy-report-item summary{grid-template-columns:auto minmax(0,1fr)!important}.spy-log-grid{grid-template-columns:1fr!important}.log-unit-card-grid{grid-template-columns:repeat(auto-fill,minmax(124px,1fr))}.log-unit-card img{width:22px;height:22px}}

/* v42.10: compact resource income popovers directly under the hovered/tapped chip. */
.res-tip{max-width:320px!important;text-align:left!important;}
.res-breakdown{display:grid!important;gap:3px!important;margin-top:7px!important;}
.res-breakdown strong{margin-top:4px;color:#ffd978!important;}
.res-breakdown span{display:block;white-space:normal;line-height:1.25;}
@media(max-width:760px){
  .res-tip{position:fixed!important;right:auto!important;bottom:auto!important;width:min(320px,calc(100vw - 16px))!important;max-height:45vh!important;}
}

/* v42.13: resource storage bars and compact resource hover placement */
.res-chip{position:relative!important;overflow:visible!important;padding-bottom:12px!important;}
.res-cap-meter{position:absolute;left:10px;right:10px;bottom:4px;height:4px;border-radius:999px;background:rgba(32,18,10,.24);overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.25)}
.res-cap-meter i{display:block;height:100%;border-radius:999px;background:#30b45a;transition:width .2s ease}
.res-cap-meter.mid i{background:#e2a72e}.res-cap-meter.high i{background:#d44232}
.res-tip{position:absolute!important;top:calc(100% + 9px)!important;left:0!important;right:auto!important;width:280px!important;max-width:min(340px,calc(100vw - 28px))!important;max-height:50vh!important;overflow:auto!important;}
.res-breakdown{margin-top:8px;display:grid;gap:2px}.res-breakdown strong{margin-top:4px;color:#f2c25b}.res-storage-line,.res-full-line{color:#ffeab0;font-weight:900}
.court-option-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:12px}.court-option-card{border:2px solid rgba(123,75,28,.22);border-radius:18px;padding:14px;background:rgba(255,255,255,.56)}.court-option-card h3{margin:0 0 3px}.court-option-card .subtitle{text-transform:uppercase;letter-spacing:.05em;font-size:11px;font-weight:1000;color:#86603c}.court-option-card p{margin:8px 0}.court-option-card .compact-cost-row{margin:8px 0;justify-content:flex-start}.court-reward{font-weight:1000;color:#44220a}
@media(max-width:760px){.res-tip{position:fixed!important;left:8px!important;right:8px!important;top:126px!important;width:auto!important}.res-cap-meter{left:7px;right:7px;bottom:3px}}

/* v42.14: resource popovers and mobile top HUD visibility polish */
.top-shell{z-index:1200!important;overflow:visible!important;}
.resource-rail{overflow-x:auto!important;overflow-y:visible!important;}
.res-chip{overflow:visible!important;}
.res-chip:hover .res-tip,
.res-chip:focus .res-tip,
.res-chip:focus-within .res-tip,
.res-chip.active .res-tip{display:block!important;}
.res-tip{z-index:1400!important;pointer-events:auto!important;}
.app-main{position:relative;z-index:1;}
@media(max-width:760px){
  .top-shell{position:sticky!important;top:0!important;padding:7px 7px 8px!important;}
  .brand-row{display:grid!important;grid-template-columns:minmax(118px,auto) 1fr!important;gap:6px!important;align-items:center!important;}
  .brand{gap:6px!important;min-width:0!important;}
  .brand-icon{width:32px!important;height:32px!important;min-width:32px!important;border-radius:10px!important;}
  .brand-icon img{width:26px!important;height:26px!important;}
  .brand strong{font-size:15px!important;line-height:1!important;}
  .brand small{font-size:10px!important;line-height:1!important;}
  .top-pills{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:4px!important;width:100%!important;overflow:visible!important;padding:0!important;align-items:stretch!important;}
  .top-pills .top-action,.top-pills .era-pill,.top-pills .crown-pill,.account-trigger{min-width:0!important;width:100%!important;min-height:31px!important;height:31px!important;padding:3px 2px!important;border-radius:10px!important;font-size:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;box-shadow:0 3px 0 rgba(0,0,0,.22)!important;}
  .top-pills .top-icon{width:17px!important;height:17px!important;}
  .top-pills .profile-action b,.top-pills .account-trigger b{display:none!important;}
  .top-pills .top-store b,.top-pills .top-market b,.top-pills .top-action-badged b{display:inline!important;font-size:10px!important;}
  .top-pills .era-pill{font-size:9px!important;}
  .crown-pill b{font-size:10px!important;}
  .nav-badge{min-width:16px!important;height:16px!important;font-size:10px!important;top:-8px!important;right:-8px!important;}
  .resource-rail{display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:visible!important;gap:4px!important;padding:5px 0 4px!important;margin:0!important;scrollbar-width:thin!important;}
  .resource-rail::-webkit-scrollbar{height:4px;display:block!important;}
  .resource-rail::-webkit-scrollbar-thumb{background:rgba(255,220,150,.55);border-radius:999px;}
  .res-chip{flex:0 0 auto!important;min-width:58px!important;height:34px!important;min-height:34px!important;padding:4px 5px 9px!important;border-radius:11px!important;gap:2px!important;}
  .res-icon{width:21px!important;height:21px!important;min-width:21px!important;}
  .res-icon img{width:20px!important;height:20px!important;}
  .res-value{font-size:11px!important;line-height:1!important;}
  .res-tip{position:fixed!important;left:8px!important;right:8px!important;top:86px!important;width:auto!important;max-width:none!important;max-height:48vh!important;overflow:auto!important;}
}
@media(max-width:430px){
  .brand-row{grid-template-columns:104px 1fr!important;}
  .brand strong{font-size:14px!important;}
  .top-pills .top-action,.top-pills .era-pill,.top-pills .crown-pill,.account-trigger{font-size:9px!important;padding-left:1px!important;padding-right:1px!important;}
  .top-pills .top-icon{width:16px!important;height:16px!important;}
  .top-pills .top-store b,.top-pills .top-market b{font-size:9px!important;}
}

/* v42.15: resource hover portal prevents the income popup from being clipped by the HUD/resource rail. */
.resource-popover-portal{position:fixed;z-index:5000;width:min(340px,calc(100vw - 16px));max-height:min(58vh,440px);overflow:auto;text-align:left;background:linear-gradient(180deg,#3a1a14,#16090a);color:#fff1ca;border:3px solid #a86b27;border-radius:16px;padding:12px 14px;box-shadow:0 18px 38px rgba(0,0,0,.45);font-weight:800;line-height:1.25;pointer-events:auto}.resource-popover-portal b{color:#ffd96a}.resource-popover-portal .res-breakdown{display:grid;gap:3px;margin-top:7px}.resource-popover-portal .res-breakdown strong{margin-top:5px;color:#ffd978}.resource-popover-portal .res-breakdown span{white-space:normal}.res-chip .res-tip.portal-active{visibility:hidden!important;opacity:0!important;pointer-events:none!important}
@media(max-width:900px){
  .top-shell{position:sticky!important;top:0!important;z-index:2200!important;overflow:visible!important;padding:8px!important}.brand-row{display:block!important}.brand{margin-bottom:7px!important}.top-pills{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:thin;padding:0 2px 6px!important;-webkit-overflow-scrolling:touch}.top-pills .top-action,.top-pills .era-pill,.top-pills .crown-pill,.account-trigger{flex:0 0 auto!important;min-width:54px!important;max-width:none!important;height:36px!important;min-height:36px!important;padding:4px 8px!important;border-radius:13px!important;font-size:11px!important;white-space:nowrap!important}.top-pills .profile-action b,.top-pills .account-trigger b{display:none!important}.top-pills .top-icon{width:21px!important;height:21px!important}.crown-pill{min-width:78px!important}.resource-rail{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:visible!important;gap:5px!important;padding:0 2px 8px!important;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.res-chip{flex:0 0 auto!important;min-width:82px!important;height:38px!important;padding:5px 8px 11px!important}.res-icon{width:25px!important;height:25px!important}.res-value{font-size:13px!important}.res-trend{display:none!important}.resource-popover-portal{left:8px!important;right:8px!important;top:auto!important;width:auto!important;max-height:45vh!important}
}

.auth-overline{letter-spacing:.28em;color:#9b2236;font-weight:900}.auth-hero-line{font-size:18px;color:#5d4a34;line-height:1.35}.auth-hero-copy{margin:0 0 14px;color:#6a563f;line-height:1.45;font-size:14px}.auth-moodbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.auth-moodbar span{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(83,24,45,.08);border:1px solid rgba(131,81,38,.25);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b2040}.cinematic-auth .auth-card{border-color:#8c5a27}.cinematic-auth .auth-card::before{content:"";position:absolute;inset:0;border-radius:22px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);pointer-events:none}.cinematic-auth:after{content:"";position:fixed;inset:0;background:radial-gradient(circle at 50% 30%, rgba(255,236,170,.18), transparent 28%),radial-gradient(circle at 50% 60%, rgba(40,125,60,.18), transparent 36%);pointer-events:none;z-index:1}.marriage-panel{position:relative;overflow:hidden}.marriage-panel:before,.mythic-marriage-hero:before{content:"";position:absolute;inset:auto -10% -40% -10%;height:160px;background:radial-gradient(circle,rgba(199,113,255,.22),transparent 65%);pointer-events:none}.marriage-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:16px 0}.marriage-summary-grid>div{background:rgba(255,255,255,.44);border:1px solid rgba(131,81,38,.22);border-radius:16px;padding:12px}.marriage-summary-grid b{display:block;color:#3b2418}.marriage-summary-grid span{display:block;color:#7d6245;margin-top:4px}.mini-list{display:grid;gap:8px;margin-top:14px}.mini-list a,.mini-list>div{display:block;background:rgba(255,255,255,.45);border:1px solid rgba(131,81,38,.22);border-radius:14px;padding:10px 12px;text-decoration:none;color:#2b170e}.marriage-hero{overflow:hidden}.marriage-form-panel{max-width:1280px;margin-left:auto;margin-right:auto}.marriage-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:22px}.resource-input-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0}.resource-input-grid label{display:grid;gap:6px;background:rgba(255,255,255,.38);border:1px solid rgba(131,81,38,.22);border-radius:14px;padding:10px}.resource-input-grid span{display:flex;align-items:center;gap:7px;font-weight:800}.resource-input-grid small{font-weight:600;opacity:.7;margin-left:auto}.resource-input-grid img{width:24px;height:24px;image-rendering:pixelated}.resource-input-grid input,.marriage-form select,.marriage-form textarea,.marriage-form-panel textarea{width:100%;padding:10px;border-radius:12px;border:2px solid rgba(131,81,38,.45);background:#fff7e7}.marriage-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:16px}.mythic-chest-button{background:linear-gradient(135deg,#ffd35c,#a65bff 45%,#ff5376)!important;border-color:#7b2bd6!important;box-shadow:0 0 28px rgba(166,91,255,.38),var(--shadow)!important}.marriage-chest{background:linear-gradient(180deg,#ffe78a,#b36dff)!important}.form-warning.success{color:#186c2d;background:rgba(103,210,126,.15);border-color:rgba(103,210,126,.35)}

/* v42.18: final mobile HUD, auth scene and toast visibility pass */
.toast-stack{position:fixed!important;z-index:20000!important;top:12px!important;right:12px!important;left:auto!important;max-width:min(520px,calc(100vw - 24px))!important;margin:0!important;pointer-events:none}.toast{pointer-events:auto!important}
.pass-claim-toast{z-index:21000!important;top:14px!important;bottom:auto!important;transform:translate(-50%,-12px)!important}.pass-claim-toast.show{transform:translate(-50%,0)!important}

.auth-body.cinematic-auth{background:#07080d!important;overflow:hidden!important}.auth-battle-game{filter:saturate(.88) contrast(1.04) brightness(.82)}.cinematic-auth:before{background:radial-gradient(circle at 50% 46%,rgba(255,221,130,.18),transparent 18%),linear-gradient(90deg,rgba(8,13,20,.42),rgba(8,3,10,.72) 45%,rgba(8,13,20,.42)),linear-gradient(180deg,rgba(14,8,18,.2),rgba(3,2,8,.82))!important;z-index:1!important}.cinematic-auth:after{content:""!important;position:fixed!important;inset:0!important;background:linear-gradient(90deg,rgba(66,128,173,.22),transparent 28%,transparent 72%,rgba(164,42,43,.24)),radial-gradient(circle at 50% 30%,rgba(255,235,160,.2),transparent 25%)!important;z-index:1!important;pointer-events:none!important}.epic-auth-card{width:min(500px,92vw)!important;padding:30px 30px 26px!important;background:linear-gradient(180deg,rgba(255,248,222,.98),rgba(232,199,126,.94))!important;border:4px solid #9a642d!important;border-radius:28px!important;box-shadow:0 0 0 1px rgba(255,238,178,.6) inset,0 0 44px rgba(255,211,102,.22),0 28px 80px rgba(0,0,0,.62)!important;text-align:left!important}.epic-auth-card:before{content:""!important;position:absolute!important;inset:-14px!important;border-radius:36px!important;border:1px solid rgba(255,218,124,.26)!important;box-shadow:0 0 70px rgba(255,216,116,.16)!important;pointer-events:none!important}.auth-crown-halo{width:76px;height:76px;margin:-66px auto 10px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,#ffeaa3,#d5941d 65%,#7d481f);border:4px solid #7b431c;box-shadow:0 12px 0 rgba(0,0,0,.24),0 0 34px rgba(255,216,100,.55);font-size:38px}.auth-overline{letter-spacing:.28em!important;text-align:center!important;color:#9e1837!important;font-size:12px!important;margin-bottom:6px}.epic-auth-card h1{font-size:44px!important;line-height:.96!important;text-align:center!important;margin:0 0 10px!important;color:#2b1209!important;text-shadow:0 2px 0 rgba(255,255,255,.45)}.auth-hero-line{text-align:center!important;font-size:16px!important;color:#694b32!important;line-height:1.38!important;max-width:390px;margin:0 auto 14px!important}.auth-hero-copy,.auth-moodbar{display:none!important}.auth-divider{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin:14px 0 18px}.auth-divider span{height:2px;background:linear-gradient(90deg,transparent,#9d632e,transparent)}.auth-divider i{width:9px;height:9px;display:block;border-radius:50%;background:#af1e3d;box-shadow:0 0 0 4px rgba(175,30,61,.12)}.epic-auth-form label{font-weight:900;color:#3a2011}.epic-auth-form input{background:rgba(255,251,238,.96)!important;border:2px solid #8e5b2c!important;box-shadow:inset 0 2px 8px rgba(79,39,14,.08)!important}.epic-auth-form .btn,.epic-auth-card .btn{min-height:46px;background:linear-gradient(180deg,#ffe16a,#e99d17)!important;border-color:#7b421a!important;box-shadow:0 6px 0 #8a551f,0 14px 22px rgba(0,0,0,.24)!important}.epic-auth-card .auth-links{justify-content:center;margin-top:14px}

@media(max-width:760px){
  .top-shell{position:sticky!important;top:0!important;z-index:9000!important;padding:6px 6px 7px!important;overflow:visible!important;border-bottom-width:1px!important}.brand-row{display:grid!important;grid-template-columns:auto 1fr!important;gap:7px!important;align-items:center!important;padding:0!important}.brand{margin:0!important;gap:6px!important;min-width:0!important}.brand-icon{width:34px!important;height:34px!important;border-radius:11px!important;border-width:2px!important}.brand-icon img{width:27px!important;height:27px!important}.brand strong{font-size:16px!important;line-height:1!important}.brand small{font-size:10px!important;line-height:1!important}.top-pills{grid-column:1/3!important;display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:4px!important;overflow:visible!important;padding:4px 0!important;width:100%!important}.top-pills .top-action,.top-pills .era-pill,.top-pills .crown-pill,.top-pills .account-trigger{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:100%!important;height:31px!important;min-height:31px!important;max-width:none!important;padding:2px 3px!important;border-radius:10px!important;font-size:0!important;white-space:nowrap!important}.top-pills .top-action b,.top-pills .account-trigger b{display:none!important}.top-pills .top-icon{width:21px!important;height:21px!important;margin:0!important}.era-pill{gap:2px!important}.era-pill:after{content:attr(data-era-label);font-size:0}.era-pill b{display:inline!important;font-size:11px!important;margin-left:1px!important}.crown-pill b{display:inline!important;font-size:11px!important;max-width:32px;overflow:hidden;text-overflow:ellipsis}.top-action-badged .nav-badge{top:-8px!important;right:-8px!important}.resource-rail{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;overflow:visible!important;padding:3px 0 0!important;margin:0!important;scrollbar-width:none!important}.resource-rail::-webkit-scrollbar,.top-pills::-webkit-scrollbar{display:none!important}.res-chip{min-width:0!important;width:auto!important;height:34px!important;min-height:34px!important;padding:4px 4px 8px!important;border-width:2px!important;border-radius:11px!important;gap:3px!important;justify-content:center!important;overflow:visible!important}.res-icon{width:21px!important;height:21px!important;flex:0 0 21px!important}.res-icon img{width:20px!important;height:20px!important}.res-value{font-size:11px!important;line-height:1!important;min-width:0!important;max-width:42px!important;overflow:hidden!important;text-overflow:ellipsis!important}.res-cap-meter{left:8px!important;right:8px!important;bottom:3px!important;height:3px!important}.resource-popover-portal{position:fixed!important;z-index:25000!important;width:auto!important;left:8px!important;right:8px!important;max-height:46vh!important;font-size:13px!important}.app-main{padding-top:8px!important;padding-bottom:92px!important}.bottom-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important;border-radius:16px 16px 0 0!important;overflow:visible!important}.nav-item{min-width:0!important;padding:5px 3px!important;border-radius:12px!important}.nav-item.active{box-shadow:0 3px 0 #8a551f!important}.nav-item span img{width:24px!important;height:24px!important}.nav-item b{font-size:10px!important}.toast-stack{top:8px!important;left:8px!important;right:8px!important;max-width:none!important}.pass-claim-toast{top:8px!important;width:calc(100vw - 18px)!important;max-width:none!important;text-align:center}.epic-auth-card{padding:26px 20px 22px!important}.auth-crown-halo{width:62px;height:62px;margin-top:-54px;font-size:31px}.epic-auth-card h1{font-size:34px!important}.auth-hero-line{font-size:14px!important}}
@media(max-width:760px){.top-pills a[data-process-link] b{display:inline!important;font-size:11px!important}.top-pills a[data-process-link]{gap:2px!important}.top-pills .top-action.incoming-alert{box-shadow:0 0 0 2px rgba(255,80,80,.45),0 3px 0 rgba(0,0,0,.18)!important}}

.btn.disabled,.btn[aria-disabled="true"]{cursor:not-allowed;filter:grayscale(1);opacity:.62;box-shadow:none;pointer-events:none}.marriage-panel .marriage-warning,.marriage-hero .marriage-warning{display:inline-flex;max-width:100%;margin:8px 0 12px;padding:8px 12px;border-radius:14px;background:rgba(255,255,255,.58);border:2px solid rgba(176,22,48,.25);color:#a8112b;font-weight:900;line-height:1.2}.marriage-panel .btn:disabled{display:inline-flex;align-items:center;justify-content:center}

/* v42.22: proposal picker, daily chest overflow, and juicier era claim polish */
.suitor-picker{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,.9fr);gap:10px;align-items:center;margin:6px 0 8px;}
.suitor-picker input,.suitor-picker select{width:100%;min-height:44px;border:2px solid rgba(120,74,35,.45);border-radius:14px;background:rgba(255,250,235,.92);padding:9px 12px;font-weight:800;color:#2d1609;}
.suitor-picker select{cursor:pointer;}
.daily-chest-modal{padding:14px;align-items:center;}
.daily-chest-modal .chest-panel{max-height:calc(100vh - 34px);overflow-y:auto;margin:0 auto!important;overscroll-behavior:contain;padding-bottom:18px;}
.daily-chest-modal .daily-reward-list{max-height:min(48vh,420px);overflow-y:auto;padding-right:4px;}
.daily-chest-modal .daily-close{position:sticky;bottom:0;margin-top:12px;z-index:5;}
.era-modal-title{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:8px;}
.era-modal-title img{width:48px;height:48px;image-rendering:pixelated;filter:drop-shadow(0 5px 0 rgba(0,0,0,.18));}
.era-advance-panel{isolation:isolate;}
.era-claim-button{position:relative;overflow:hidden;min-width:230px;transition:transform .12s ease, filter .12s ease;}
.era-claim-button:hover{transform:translateY(-2px) scale(1.03);filter:brightness(1.07);}
.era-claim-button.claiming{animation:eraButtonThump .68s cubic-bezier(.15,1.35,.25,1) both!important;filter:brightness(1.25);}
.era-claim-button.claiming::after{content:"";position:absolute;inset:-60%;background:radial-gradient(circle,rgba(255,255,255,.95),rgba(255,225,97,.45) 22%,transparent 48%);animation:eraButtonFlash .68s ease-out both;}
.era-advance-panel.claiming{animation:eraPanelPulse .68s ease-out both;}
.era-advance-panel.claiming .chest-flash{animation:chestFlash .7s ease-out both;opacity:1;}
@keyframes eraButtonThump{0%{transform:scale(1)}35%{transform:scale(1.16) rotate(-1deg)}70%{transform:scale(.98) rotate(1deg)}100%{transform:scale(1.04)}}
@keyframes eraButtonFlash{0%{transform:scale(.2);opacity:0}24%{opacity:1}100%{transform:scale(1.35);opacity:0}}
@keyframes eraPanelPulse{0%{transform:scale(1)}40%{transform:scale(1.025)}100%{transform:scale(1)}}
@media(max-width:760px){.suitor-picker{grid-template-columns:1fr}.daily-chest-modal .chest-panel{max-height:calc(100vh - 18px);width:min(96vw,560px);}.daily-chest-modal .daily-reward-list{max-height:42vh}.era-modal-title img{width:40px;height:40px}.era-claim-button{width:100%;}}

/* v42.23 Marriage UI pass */
.mythic-pill{display:inline-flex;align-items:center;gap:7px;background:linear-gradient(135deg,#fff1bd,#bb71ff 55%,#ff5f9f)!important;color:#351342!important;border-color:#8a4ad9!important;box-shadow:0 0 22px rgba(191,95,255,.25)}
.mythic-pill img,.mythic-union-btn img,.union-mini-list img{width:22px;height:22px;image-rendering:pixelated;filter:drop-shadow(0 2px 0 rgba(0,0,0,.18))}
.mythic-union-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,#ffd45e,#c46bff 48%,#ff5f9f)!important;border-color:#7131b5!important;color:#261025!important;box-shadow:0 0 24px rgba(190,84,255,.32),0 7px 0 rgba(77,37,11,.38)!important}.mythic-union-btn:disabled{filter:grayscale(1);opacity:.6;box-shadow:none!important}.union-panel-polished{background:linear-gradient(135deg,rgba(255,245,208,.96),rgba(255,225,248,.92) 48%,rgba(238,214,255,.9))!important}.union-panel-polished:after{content:"";position:absolute;right:-60px;bottom:-90px;width:260px;height:260px;border-radius:999px;background:radial-gradient(circle,rgba(200,80,255,.23),transparent 62%);pointer-events:none}.union-mini-list a{display:flex;align-items:center;gap:10px}.marriage-proposal-card{background:linear-gradient(135deg,rgba(255,248,226,.97),rgba(255,235,250,.88))!important}.marriage-proposal-card .suitor-picker{display:grid;grid-template-columns:minmax(260px,1fr) minmax(260px,1fr);gap:10px;align-items:center;margin:6px 0 6px}.marriage-proposal-card input[list],.marriage-proposal-card select{min-height:44px}.marriage-submit:disabled{filter:grayscale(1);opacity:.58;box-shadow:none!important;cursor:not-allowed}.mythic-union-home{background:linear-gradient(180deg,#ffe0fb,#b56bff 54%,#ff5f9f)!important;border-color:#7a39c5!important;color:#270d31!important;box-shadow:0 0 22px rgba(220,85,255,.42),0 7px 0 rgba(61,20,91,.55)!important}.mythic-union-home img{animation:unionPulse 1.55s ease-in-out infinite}.mythic-union-modal.active{background:rgba(18,0,30,.72)!important}.union-chest-panel{position:relative;overflow:hidden;background:radial-gradient(circle at 50% 24%,rgba(255,242,173,.98),rgba(255,228,251,.95) 36%,rgba(223,185,255,.92) 100%)!important;border-color:#7c33c6!important;box-shadow:0 0 46px rgba(194,83,255,.52),0 18px 60px rgba(0,0,0,.4)!important}.union-chest-aura{position:absolute;inset:-80px;background:radial-gradient(circle at 50% 40%,rgba(255,255,255,.8),rgba(230,76,255,.25) 32%,transparent 60%);opacity:.7;animation:unionAura 2.4s ease-in-out infinite;pointer-events:none}.union-chest-panel>*:not(.union-chest-aura):not(.chest-flash){position:relative;z-index:2}.union-chest-open{background:linear-gradient(135deg,#fff08a,#cd73ff 52%,#ff4d9f)!important;border-color:#7431c0!important;min-width:190px}.union-chest-open img{filter:drop-shadow(0 0 12px rgba(255,255,255,.85));animation:unionPulse 1.2s ease-in-out infinite}.union-particle{width:38px!important;height:38px!important;animation-duration:4.2s!important;filter:drop-shadow(0 0 10px rgba(255,166,255,.85)) drop-shadow(0 5px 0 rgba(0,0,0,.22))!important}.union-wave{border-color:rgba(231,116,255,.92)!important}.category-marriage{background:linear-gradient(135deg,#fff5c7,#f0d6ff 42%,#ffd4ef)!important;border-color:#9a56d6!important;box-shadow:0 0 24px rgba(197,83,255,.18)!important}.category-marriage.unread summary{background:linear-gradient(90deg,rgba(209,86,255,.28),rgba(255,190,228,.18),transparent)!important}.category-marriage .inbox-category{color:#7d2192!important}.category-marriage .badge{background:#b56bff!important;color:#fff!important}.form-warning[hidden]{display:none!important}@keyframes unionPulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.12);filter:brightness(1.22)}}@keyframes unionAura{0%,100%{transform:scale(.94) rotate(0);opacity:.55}50%{transform:scale(1.05) rotate(2deg);opacity:.9}}
.return-gift-details{width:100%;margin:10px 0;padding:10px;border:1px solid rgba(131,81,38,.24);border-radius:14px;background:rgba(255,255,255,.34)}.return-gift-details summary{cursor:pointer;font-weight:900;color:#5a2a63}.compact-marriage-gift-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.compact-gift-preview{margin-top:8px}.marriage-gift-row{display:flex!important;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.marriage-gift-note{font-style:italic;background:rgba(255,255,255,.35);border-radius:14px;padding:10px}.gift-chest-home img{animation:unionPulse 1.25s ease-in-out infinite}
@media (max-width:760px){.marriage-proposal-card .suitor-picker{grid-template-columns:1fr}.resource-input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.resource-input-grid label{padding:8px}.mythic-union-modal .chest-panel{width:min(94vw,520px);max-height:88vh;overflow:auto}.union-chest-open{min-width:150px}}
.marriage-offer-row{display:flex!important;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.marriage-offer-row>a{display:flex!important;align-items:center;gap:10px;background:transparent!important;border:0!important;padding:0!important}.marriage-offer-row .inline-actions{margin-top:0}.inbox-action-btn{display:inline-flex;margin-top:8px}
/* v42.25: reinforcement relocation controls on Owned > Reinforcing. */
.reinforce-move-slider label{display:flex;align-items:center;gap:8px;font-weight:900;}
.reinforce-move-slider .tiny-icon{width:28px;height:28px;object-fit:contain;image-rendering:pixelated;}
#move-troop-sliders{margin:10px 0;}

/* v42.27: milestone celebration overlay. Particle presets live in game/icon_config.py. */
.celebration-overlay{position:fixed;inset:0;z-index:10030;display:grid;place-items:center;background:radial-gradient(circle at 50% 28%,rgba(255,240,162,.38),rgba(59,18,82,.78) 42%,rgba(9,5,18,.88));opacity:0;pointer-events:none;transition:opacity .32s ease;overflow:hidden;backdrop-filter:blur(3px)}
.celebration-overlay.active{opacity:1;pointer-events:auto}.celebration-overlay:before,.celebration-overlay:after{content:"";position:absolute;border-radius:999px;pointer-events:none;filter:blur(1px);opacity:.8}.celebration-overlay:before{width:65vmin;height:65vmin;background:radial-gradient(circle,rgba(255,255,255,.52),rgba(255,205,86,.26) 34%,transparent 68%);animation:celebrationGlow 3.2s ease-in-out infinite}.celebration-overlay:after{width:120vmax;height:120vmax;border:3px dashed rgba(255,231,139,.22);animation:celebrationRotate 22s linear infinite}.celebration-overlay[data-kind="marriage"]{background:radial-gradient(circle at 50% 30%,rgba(255,214,246,.46),rgba(104,37,127,.8) 44%,rgba(18,0,30,.91))}.celebration-overlay[data-kind="era"]{background:radial-gradient(circle at 50% 28%,rgba(255,235,121,.48),rgba(123,71,20,.76) 45%,rgba(18,10,3,.9))}.celebration-card{position:relative;z-index:10045;width:min(92vw,680px);text-align:center;padding:30px 24px!important;border-color:rgba(255,226,126,.66)!important;box-shadow:0 0 70px rgba(255,218,109,.46),0 24px 80px rgba(0,0,0,.45)!important;transform:translateY(18px) scale(.96);opacity:0;transition:transform .38s cubic-bezier(.2,1.25,.35,1),opacity .3s ease}.celebration-overlay.active .celebration-card{transform:translateY(0) scale(1);opacity:1}.celebration-burst-icon{width:108px;height:108px;margin:0 auto 8px;display:grid;place-items:center;border-radius:28px;background:linear-gradient(135deg,#fff3ad,#ffba51 44%,#c46bff);box-shadow:0 0 35px rgba(255,237,150,.74),0 8px 0 rgba(92,48,18,.45);animation:celebrationIconBounce 1.25s ease-in-out infinite}.celebration-burst-icon img{width:72px;height:72px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 5px 0 rgba(0,0,0,.22))}.celebration-card h1{font-size:clamp(34px,7vw,72px);line-height:.95;margin:8px 0 12px;color:#3f1b08;text-shadow:0 2px 0 rgba(255,255,255,.58),0 0 26px rgba(255,224,95,.55)}.celebration-card p{font-size:clamp(15px,2.6vw,20px);max-width:560px;margin:0 auto 20px;color:#52331d!important}.celebration-eyebrow{color:#8d4d14!important;font-size:13px!important;letter-spacing:.18em!important}.celebration-close{min-width:170px}.celebration-overlay.settled .celebration-close{animation:celebrationContinuePulse 1.2s ease-in-out infinite}.celebration-particle{position:fixed;z-index:10040;width:36px;height:36px;object-fit:contain;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(0 0 10px rgba(255,236,143,.86)) drop-shadow(0 5px 0 rgba(0,0,0,.2));animation:celebrationParticleFall 5s cubic-bezier(.12,.52,.22,1) forwards}.celebration-shockwave{position:fixed;z-index:10038;width:14px;height:14px;border:3px solid rgba(255,229,126,.86);border-radius:999px;pointer-events:none;transform:translate(-50%,-50%);animation:celebrationShockwave 1.35s ease-out forwards;box-shadow:0 0 22px rgba(255,236,142,.7)}
@keyframes celebrationParticleFall{0%{transform:translate3d(0,0,0) rotate(0deg) scale(.45);opacity:0}10%{opacity:1;transform:translate3d(0,0,0) rotate(0deg) scale(1)}78%{opacity:1}100%{transform:translate3d(var(--dx),var(--dy),0) rotate(var(--spin)) scale(.82);opacity:0}}
@keyframes celebrationShockwave{0%{width:18px;height:18px;opacity:.9}100%{width:68vmin;height:68vmin;opacity:0}}
@keyframes celebrationIconBounce{0%,100%{transform:translateY(0) rotate(-2deg) scale(1)}50%{transform:translateY(-8px) rotate(2deg) scale(1.07)}}
@keyframes celebrationGlow{0%,100%{transform:scale(.92);opacity:.58}50%{transform:scale(1.12);opacity:.9}}
@keyframes celebrationRotate{to{transform:rotate(360deg)}}
@keyframes celebrationContinuePulse{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@media(max-width:760px){.celebration-card{padding:24px 16px!important}.celebration-burst-icon{width:86px;height:86px;border-radius:22px}.celebration-burst-icon img{width:58px;height:58px}.celebration-particle{width:30px;height:30px}.celebration-card h1{font-size:clamp(31px,11vw,52px)}}
@media(prefers-reduced-motion:reduce){.celebration-particle,.celebration-shockwave{display:none!important}.celebration-overlay:before,.celebration-overlay:after,.celebration-burst-icon,.celebration-close{animation:none!important}.celebration-card{transition:none!important}}

/* v42.29: cinematic arrival login */
.landing-auth{background:#07080d!important;place-items:center!important;isolation:isolate}.landing-auth .auth-battle-game{z-index:0;filter:saturate(.82) contrast(1.14) brightness(.54);transform:scale(1.035);transform-origin:center}.auth-world-stage{position:fixed;inset:0;z-index:2;pointer-events:none;overflow:hidden;background:linear-gradient(180deg,rgba(3,5,10,.2) 0%,rgba(6,5,9,.14) 35%,rgba(8,2,2,.72) 100%)}.auth-world-stage:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 64%,rgba(255,158,47,.34),transparent 16%),radial-gradient(circle at 50% 56%,rgba(255,224,123,.16),transparent 25%),linear-gradient(90deg,rgba(0,22,44,.42),transparent 35%,transparent 65%,rgba(55,5,8,.48));mix-blend-mode:screen;opacity:.9}.auth-heraldic-side{position:absolute;top:38.2%;width:min(260px,22vw);aspect-ratio:1/1;transform:translateY(-50%);display:grid;place-items:center;opacity:.78;filter:drop-shadow(0 22px 34px rgba(0,0,0,.45));animation:heraldFloat 8s ease-in-out infinite}.auth-heraldic-left{left:clamp(18px,7vw,112px)}.auth-heraldic-right{right:clamp(18px,7vw,112px);animation-delay:-4s}.auth-heraldic-medallion{position:relative;width:100%;height:100%;display:grid;place-items:center}.auth-heraldic-medallion:before{content:"";position:absolute;inset:10%;border-radius:50%;background:radial-gradient(circle at 50% 50%,rgba(255,237,182,.16),rgba(0,0,0,.05) 55%,rgba(0,0,0,0) 72%);box-shadow:inset 0 0 0 1px rgba(255,228,170,.09),0 0 70px rgba(255,210,122,.07)}.auth-heraldic-medallion-left:before{background:radial-gradient(circle at 50% 50%,rgba(232,238,255,.12),rgba(5,10,24,.04) 55%,rgba(0,0,0,0) 72%);box-shadow:inset 0 0 0 1px rgba(217,223,241,.09),0 0 70px rgba(190,210,255,.06)}.auth-heraldic-medallion-right:before{background:radial-gradient(circle at 50% 50%,rgba(255,226,187,.12),rgba(24,5,5,.03) 55%,rgba(0,0,0,0) 72%);box-shadow:inset 0 0 0 1px rgba(255,218,163,.09),0 0 70px rgba(255,170,120,.06)}.auth-heraldic-medallion img{position:relative;z-index:1;display:block;width:86%;height:86%;object-fit:contain;opacity:.92;animation:heraldPulse 6.4s ease-in-out infinite}.auth-sunbreak{position:absolute;left:50%;bottom:30%;width:min(880px,86vw);height:130px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse at center,rgba(255,210,104,.72) 0%,rgba(219,83,28,.34) 42%,transparent 72%);filter:blur(2px);animation:authSunSwell 7s ease-in-out infinite}.auth-horizon-band{position:absolute;left:0;right:0;height:7px;background:linear-gradient(90deg,transparent,rgba(255,183,68,.9),transparent);box-shadow:0 0 30px rgba(255,128,35,.8)}.auth-horizon-band.band-one{bottom:34%}.auth-horizon-band.band-two{bottom:30%;opacity:.35;height:18px;filter:blur(8px)}.auth-keep-shadow{position:absolute;left:50%;bottom:29.5%;width:360px;height:180px;transform:translateX(-50%);filter:drop-shadow(0 0 30px rgba(255,151,52,.18))}.auth-keep-shadow:before{content:"";position:absolute;left:48px;right:48px;bottom:0;height:88px;background:#060509;clip-path:polygon(0 100%,0 35%,12% 35%,12% 10%,25% 10%,25% 35%,42% 35%,42% 0,58% 0,58% 35%,75% 35%,75% 10%,88% 10%,88% 35%,100% 35%,100% 100%)}.auth-keep-shadow:after{content:"";position:absolute;left:0;right:0;bottom:-30px;height:34px;background:#050407;clip-path:polygon(0 100%,8% 25%,20% 55%,34% 18%,50% 48%,66% 12%,82% 58%,100% 22%,100% 100%)}.auth-keep-shadow span,.auth-keep-shadow i,.auth-keep-shadow b{position:absolute;bottom:54px;width:8px;height:26px;background:rgba(255,155,55,.7);box-shadow:0 0 12px rgba(255,155,55,.9);animation:torchFlicker 1.4s steps(2,end) infinite}.auth-keep-shadow span{left:122px}.auth-keep-shadow i{left:176px}.auth-keep-shadow b{right:122px}.auth-banners{position:absolute;left:50%;bottom:28%;width:min(960px,94vw);transform:translateX(-50%)}.auth-banners span{position:absolute;bottom:0;width:4px;height:86px;background:#100509}.auth-banners span:after{content:"";position:absolute;left:4px;top:6px;width:36px;height:22px;background:#5e0d1a;clip-path:polygon(0 0,100% 12%,74% 50%,100% 88%,0 100%);animation:bannerRipple 1.1s steps(3,end) infinite}.auth-banners span:nth-child(1){left:12%}.auth-banners span:nth-child(2){left:78%;height:104px}.auth-banners span:nth-child(3){left:88%;height:70px}.auth-embers{position:absolute;inset:0;overflow:hidden}.auth-embers span{position:absolute;left:var(--x);bottom:-12px;width:var(--size);height:var(--size);background:#ffb347;border-radius:2px;box-shadow:0 0 12px #ff7a1f;animation:emberRise var(--dur) linear var(--delay) infinite;image-rendering:pixelated}.auth-arrival{position:fixed;inset:0;z-index:4;display:grid;place-items:center;padding:24px;text-align:center;pointer-events:auto;background:linear-gradient(180deg,#000 0%,rgba(0,0,0,.74) 10%,rgba(0,0,0,.08) 36%,rgba(0,0,0,.48) 100%);animation:arrivalFade 2.1s ease-out forwards}.auth-title-monument{max-width:min(820px,92vw);transform:translateY(18px);animation:titleDrop 1.25s cubic-bezier(.18,.88,.28,1.08) .7s both}.auth-title-kicker{font-family:Georgia,serif;text-transform:uppercase;letter-spacing:.34em;font-weight:900;color:#f5bd61;text-shadow:0 3px 0 #15080a,0 0 18px rgba(255,160,59,.65);font-size:clamp(11px,1.7vw,17px)}.auth-title-monument h1{margin:4px 0 8px;font-family:Georgia,'Times New Roman',serif;text-transform:uppercase;letter-spacing:.09em;font-size:clamp(56px,10vw,132px);line-height:.82;color:#f7d484;text-shadow:0 5px 0 #2b1109,0 0 26px rgba(255,182,59,.42),0 0 80px rgba(255,95,33,.24)}.auth-title-divider{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:15px;max-width:540px;margin:0 auto 16px}.auth-title-divider span{height:3px;background:linear-gradient(90deg,transparent,#e5ab55,transparent);box-shadow:0 0 12px rgba(232,150,54,.55)}.auth-title-divider i{width:16px;height:16px;display:block;transform:rotate(45deg);background:#b71931;box-shadow:0 0 0 5px rgba(255,218,117,.14),0 0 22px rgba(255,107,55,.7)}.auth-title-monument p{max-width:560px;margin:0 auto 24px;color:#f7dfb5;font-weight:800;line-height:1.45;text-shadow:0 2px 0 #000}.auth-press{appearance:none;border:3px solid #d49a45;border-radius:999px;background:linear-gradient(180deg,rgba(255,228,136,.92),rgba(159,67,22,.92));color:#210c07;font-weight:1000;letter-spacing:.16em;text-transform:uppercase;padding:15px 28px;box-shadow:0 0 0 1px rgba(255,246,184,.45) inset,0 10px 0 rgba(55,16,5,.9),0 0 36px rgba(255,156,53,.38);cursor:pointer;animation:pressPulse 1.45s ease-in-out 1.8s infinite}.landing-auth .auth-login-panel{opacity:0;transform:translateY(38px) scale(.96);pointer-events:none;transition:opacity .56s ease,transform .56s cubic-bezier(.2,.8,.2,1);z-index:5!important}.landing-auth.auth-entered .auth-login-panel{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}.landing-auth.auth-entered .auth-arrival{opacity:0;transform:scale(1.03);pointer-events:none;transition:opacity .55s ease,transform .55s ease}.landing-auth.auth-entered .auth-world-stage{filter:brightness(.78);transition:filter .6s ease}.landing-auth.auth-entered .auth-card{animation:loginSlideIn .58s cubic-bezier(.22,.9,.22,1.08) both}.landing-auth .epic-auth-card h1{font-family:Georgia,'Times New Roman',serif!important;text-transform:uppercase!important;letter-spacing:.04em!important}.landing-auth .auth-crown-halo{font-family:serif}@keyframes arrivalFade{0%{background:#000}100%{background:linear-gradient(180deg,rgba(0,0,0,.88),rgba(0,0,0,.18) 36%,rgba(0,0,0,.52))}}@keyframes titleDrop{0%{opacity:0;transform:translateY(-36px) scale(.94);filter:blur(3px)}100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}@keyframes pressPulse{0%,100%{transform:translateY(0);filter:brightness(1)}50%{transform:translateY(-3px);filter:brightness(1.18)}}@keyframes emberRise{0%{transform:translateY(0) translateX(0) scale(.7);opacity:0}12%{opacity:.9}100%{transform:translateY(-105vh) translateX(46px) scale(1.35);opacity:0}}@keyframes torchFlicker{0%,100%{opacity:.75;height:24px}50%{opacity:1;height:31px}}@keyframes bannerRipple{0%,100%{transform:skewY(0)}50%{transform:skewY(-8deg)}}@keyframes authSunSwell{0%,100%{opacity:.62;transform:translateX(-50%) scale(.96)}50%{opacity:.92;transform:translateX(-50%) scale(1.05)}}@keyframes heraldFloat{0%,100%{transform:translateY(-50%) translateX(0) scale(1)}50%{transform:translateY(calc(-50% - 8px)) translateX(3px) scale(1.02)}}@keyframes heraldPulse{0%,100%{transform:scale(.985);filter:brightness(.98)}50%{transform:scale(1.018);filter:brightness(1.08)}}@keyframes loginSlideIn{0%{filter:blur(2px)}100%{filter:blur(0)}}@media(max-width:760px){.auth-title-monument h1{font-size:clamp(44px,16vw,74px)}.auth-title-kicker{letter-spacing:.22em}.auth-press{padding:13px 20px}.auth-keep-shadow{width:260px;height:140px}.auth-banners span:nth-child(3){display:none}.auth-heraldic-side{top:30%;width:min(132px,28vw);opacity:.62}.auth-heraldic-left{left:-8px}.auth-heraldic-right{right:-8px}.landing-auth .auth-card{margin-top:36px}}

/* V42.34: hard fix for the cinematic Crownlands logo centering/fitting.
   The logo line is now a full-viewport row and the painted text is centered inside it.
   This prevents long-word overflow from anchoring to a narrow parent and drifting right. */
.auth-arrival{
  overflow:hidden!important;
  padding-left:0!important;
  padding-right:0!important;
}
.auth-title-monument{
  width:100vw!important;
  max-width:100vw!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  overflow:visible!important;
}
.auth-title-monument h1.auth-crownlands-title{
  width:100vw!important;
  max-width:100vw!important;
  min-width:0!important;
  box-sizing:border-box!important;
  display:block!important;
  margin:4px 0 8px!important;
  padding:0 16px!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow:visible!important;
  transform:none!important;
  text-indent:0!important;
  letter-spacing:clamp(.012em,.34vw,.052em)!important;
  font-size:clamp(48px,7.15vw,118px)!important;
  line-height:.86!important;
}
.auth-title-monument h1.auth-crownlands-title .auth-title-text{
  display:inline-block!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  white-space:nowrap!important;
  transform:translateX(var(--auth-title-center-offset,0px)) scale(var(--auth-title-scale,1))!important;
  transform-origin:center center!important;
  will-change:transform;
}
.auth-title-kicker,
.auth-title-divider,
.auth-title-monument p,
.auth-press{
  max-width:calc(100vw - 32px)!important;
  text-align:center!important;
}
@media(max-width:900px){
  .auth-title-monument h1.auth-crownlands-title{
    font-size:clamp(35px,9.6vw,72px)!important;
    letter-spacing:clamp(.004em,.12vw,.018em)!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .auth-title-kicker{
    font-size:clamp(9px,2.2vw,13px)!important;
    letter-spacing:clamp(.05em,.42vw,.13em)!important;
  }
}
@media(max-width:420px){
  .auth-title-monument h1.auth-crownlands-title{
    font-size:clamp(28px,8.9vw,39px)!important;
    letter-spacing:0!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }
}

/* V42.35: tiered reward chests and slower reward pours. */
.reward-chest-panel{overflow:visible!important}
.reward-chest-tier-badge{display:inline-flex;align-items:center;justify-content:center;margin:0 auto 8px;padding:6px 12px;border-radius:999px;background:linear-gradient(180deg,#ffe99a,#d99322);border:2px solid rgba(94,49,12,.35);box-shadow:0 5px 0 rgba(67,31,7,.28),0 0 22px rgba(255,206,79,.34);font-weight:1000;text-transform:uppercase;letter-spacing:.08em;color:#3a1807}
.round-action.chest-tier-2{box-shadow:0 0 0 3px rgba(255,211,89,.28),var(--rr-shadow)}
.round-action.chest-tier-3{box-shadow:0 0 0 3px rgba(159,99,255,.26),var(--rr-shadow)}
.round-action.chest-tier-4{box-shadow:0 0 0 3px rgba(255,99,184,.30),var(--rr-shadow)}
.round-action.chest-tier-5{box-shadow:0 0 0 4px rgba(255,226,93,.42),0 0 34px rgba(255,191,37,.28),var(--rr-shadow)}
.reward-particle.chest-flow-particle{width:var(--reward-size,30px);height:var(--reward-size,30px);z-index:10005;animation:rewardPour var(--reward-duration,2400ms) cubic-bezier(.12,.76,.18,1) forwards;filter:drop-shadow(0 0 8px rgba(255,230,128,.78)) drop-shadow(0 5px 0 rgba(0,0,0,.22))}
.reward-shockwave.chest-flow-wave{animation-duration:1.05s;border-color:rgba(255,232,116,.88);box-shadow:0 0 30px rgba(255,209,68,.72)}
@keyframes rewardPour{0%{transform:translate(-50%,-50%) scale(.25) rotate(0deg);opacity:0}8%{opacity:1;transform:translate(-50%,-50%) scale(1.06) rotate(0deg)}62%{opacity:1;transform:translate(calc(var(--dx) * .78),var(--dy)) scale(1.18) rotate(var(--spin))}100%{opacity:0;transform:translate(var(--dx),calc(var(--dy) + var(--fall,240px))) scale(.68) rotate(var(--spin))}}
@media(max-width:760px){.reward-particle.chest-flow-particle{width:calc(var(--reward-size,30px) * .82);height:calc(var(--reward-size,30px) * .82)}.reward-chest-tier-badge{font-size:12px}}

/* V42.37: preserve the old daily chest snap while making higher-tier era chests flow over time. */
.daily-chest-panel{overflow:visible!important}
.reward-chest-panel.reward-kind-era{background:radial-gradient(circle at 50% 18%,rgba(255,245,173,.98),rgba(255,233,191,.94) 42%,rgba(231,184,91,.90) 100%)!important;border-color:#b06a20!important;box-shadow:0 0 42px rgba(255,197,75,.42),0 18px 56px rgba(0,0,0,.38)!important}
.reward-chest-panel.reward-tier-4{background:radial-gradient(circle at 50% 18%,rgba(255,233,171,.98),rgba(255,205,229,.92) 42%,rgba(198,134,255,.90) 100%)!important;border-color:#9d55d9!important;box-shadow:0 0 56px rgba(211,99,255,.46),0 18px 64px rgba(0,0,0,.42)!important}

.reward-chest-panel.reward-kind-milestone{background:radial-gradient(circle at 50% 18%,rgba(255,255,214,.98),rgba(255,223,128,.96) 36%,rgba(196,118,255,.90) 100%)!important;border-color:#e0ae3e!important;box-shadow:0 0 70px rgba(255,220,105,.56),0 0 44px rgba(179,85,255,.38),0 22px 76px rgba(0,0,0,.44)!important}
.reward-chest-panel.reward-tier-5{background:radial-gradient(circle at 50% 18%,rgba(255,255,214,.98),rgba(255,220,116,.96) 35%,rgba(180,80,255,.88) 72%,rgba(65,19,91,.88) 100%)!important;border-color:#f1c861!important;box-shadow:0 0 82px rgba(255,220,105,.62),0 0 52px rgba(179,85,255,.45),0 22px 80px rgba(0,0,0,.48)!important}
.reward-chest-panel.reward-tier-4 .reward-chest-tier-badge,.reward-chest-panel.reward-tier-5 .reward-chest-tier-badge{transform:scale(1.06);box-shadow:0 7px 0 rgba(67,31,7,.32),0 0 32px rgba(255,228,103,.55)}
.reward-chest-panel.reward-tier-5 .big-chest-button{background:linear-gradient(135deg,#fff5a7,#ffc23f 38%,#d273ff 72%,#ff5fa4)!important;border:3px solid #ffe08c!important;box-shadow:0 18px 0 rgba(71,22,94,.5),0 0 44px rgba(255,225,103,.58),0 0 28px rgba(211,104,255,.42)!important}
.reward-particle.explosive.chest-pop-particle{width:var(--reward-size,34px);height:var(--reward-size,34px);z-index:10008;filter:drop-shadow(0 0 9px rgba(255,238,144,.82)) drop-shadow(0 5px 0 rgba(0,0,0,.22))}
.chest-screen-celebration{position:fixed;inset:0;z-index:10003;pointer-events:none;overflow:hidden;background:radial-gradient(circle at 50% 34%,rgba(255,244,155,.22),transparent 33%),radial-gradient(circle at 50% 68%,rgba(196,88,255,.18),transparent 42%);animation:chestScreenGlow 1.2s ease-out both}
.chest-screen-celebration.chest-screen-tier-5{background:radial-gradient(circle at 50% 30%,rgba(255,248,173,.34),transparent 32%),radial-gradient(circle at 50% 62%,rgba(223,102,255,.25),transparent 44%),rgba(20,5,28,.10)}
.chest-screen-particle{position:fixed;z-index:10009;object-fit:contain;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(0 0 12px rgba(255,240,144,.9)) drop-shadow(0 6px 0 rgba(0,0,0,.24));animation:chestScreenParticleFall 5s cubic-bezier(.12,.52,.22,1) forwards}
.chest-screen-shockwave{position:fixed;z-index:10004;width:18px;height:18px;border:4px solid rgba(255,236,134,.88);border-radius:999px;pointer-events:none;transform:translate(-50%,-50%);animation:chestScreenShockwave 1.35s ease-out forwards;box-shadow:0 0 26px rgba(255,236,142,.74)}
@keyframes chestScreenGlow{0%{opacity:0}18%{opacity:1}100%{opacity:.85}}
@keyframes chestScreenParticleFall{0%{transform:translate3d(0,0,0) rotate(0deg) scale(.45);opacity:0}10%{opacity:1;transform:translate3d(0,0,0) rotate(0deg) scale(1)}78%{opacity:1}100%{transform:translate3d(var(--dx),var(--dy),0) rotate(var(--spin)) scale(.82);opacity:0}}
@keyframes chestScreenShockwave{0%{width:18px;height:18px;opacity:.95}100%{width:72vmin;height:72vmin;opacity:0}}
@media(max-width:760px){.reward-chest-panel.reward-tier-5 .big-chest-button{box-shadow:0 12px 0 rgba(71,22,94,.5),0 0 32px rgba(255,225,103,.5)!important}.chest-screen-particle{width:32px;height:32px}}

/* V42.52: guest signup errors visible on cinematic login. */
.auth-message-stack{display:grid;gap:8px;margin:12px 0 14px}.auth-message-stack .toast{position:relative;left:auto;right:auto;top:auto;margin:0;text-align:left}.auth-message-stack .toast.error{border-color:#bc312f;background:#ffe0dc;color:#5b0a0a}.auth-message-stack .toast.success{border-color:#5f9d44;background:#e3f8d6;color:#173c0d}.auth-message-stack .toast.info{border-color:#5a86bd;background:#dceeff;color:#0b3458}
/* V42.53: world-select capacity states */
.world-row-card.full{filter:saturate(.78);background:rgba(230,224,213,.72);border-color:rgba(116,86,62,.32)}
.world-row-card.full h2,.world-row-card.full .world-code{opacity:.72}.world-state-pill.full{background:#e9ded1;color:#6c4d38;border:1px solid #b8a694}.road-status.full-world{color:#8c251b;font-weight:1000}.road-status.capacity-priority{color:#2f6d27;font-weight:1000}.world-full-button{display:inline-flex;align-items:center;justify-content:center;min-width:104px}.world-select-messages{position:static!important;margin-bottom:12px;max-width:none!important}.world-select-messages .toast{opacity:1!important;transform:none!important}


/* V42.55: Make auth/guest errors unmistakably visible on the cinematic login panel. */
.landing-auth.auth-entered .auth-login-panel{overflow:visible!important}
.auth-message-stack{position:relative!important;z-index:20!important;display:grid!important;gap:10px!important;margin:14px 0 16px!important;opacity:1!important;visibility:visible!important;transform:none!important;min-height:0!important}
.auth-message-stack .auth-visible-alert{display:block!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;margin:0!important;opacity:1!important;visibility:visible!important;transform:none!important;padding:13px 15px!important;border-radius:16px!important;font-size:15px!important;line-height:1.35!important;font-weight:1000!important;text-align:left!important;box-shadow:0 8px 0 rgba(100,40,24,.18),0 18px 34px rgba(0,0,0,.18)!important}
.auth-message-stack .auth-visible-alert.error{background:#ffe1dd!important;border:3px solid #c33b34!important;color:#4c0707!important}
.auth-message-stack .auth-visible-alert.info{background:#deeeff!important;border:3px solid #5c84bd!important;color:#0b3458!important}
.auth-message-stack .auth-visible-alert.success{background:#e0f8d5!important;border:3px solid #5c9d44!important;color:#173c0d!important}

/* v43.0: Sound settings and collapsed account menu. */
.top-gear{font-size:18px;line-height:1;filter:drop-shadow(0 1px 0 rgba(0,0,0,.25))}.settings-panel{max-width:560px!important}.settings-block{margin-top:14px;background:rgba(255,248,224,.58);border:1px solid rgba(139,84,30,.22);border-radius:18px;padding:14px}.settings-block-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.settings-block h3{margin:0;color:#4a230f}.volume-control{display:grid;gap:8px;margin-top:12px;font-weight:1000;color:#3f210f}.volume-control span{display:flex;align-items:center;justify-content:space-between;gap:12px}.volume-control input[type=range]{width:100%;accent-color:#d49121;cursor:pointer}.sound-settings-block .small-note{margin:4px 0 10px}.account-settings-block{padding:0;overflow:hidden}.account-settings-block summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;font-weight:1000;color:#3b1b0c}.account-settings-block summary::-webkit-details-marker{display:none}.account-settings-block summary:after{content:'▾';font-size:18px;transition:transform .18s ease}.account-settings-block[open] summary:after{transform:rotate(180deg)}.account-settings-block summary span{display:inline-flex;align-items:center;gap:8px}.account-settings-block summary small{color:#8a6a4c;font-weight:800}.account-settings-block>p,.account-settings-block>.action-row{padding:0 14px 14px;margin:0}.text-icon{display:inline-grid;place-items:center}.settings-modal .btn-small[data-sound-unlock]{white-space:nowrap}@media(max-width:760px){.settings-block-head{align-items:flex-start;flex-direction:column}.account-settings-block summary{align-items:flex-start;flex-direction:column}.settings-modal .event-modal .panel,.settings-panel{max-width:calc(100vw - 24px)!important}}

/* v43.1: Auth page music toggle + cleaner landing art. */
.auth-clean-landing .auth-keep-shadow,
.auth-clean-landing .auth-banners{display:none!important;}
.auth-music-toggle{
  position:fixed;
  top:max(14px,env(safe-area-inset-top));
  right:max(14px,env(safe-area-inset-right));
  z-index:30;
  appearance:none;
  border:1px solid rgba(255,217,139,.42);
  border-radius:999px;
  padding:9px 14px;
  background:rgba(9,8,10,.54);
  color:#f8ddb0;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter:blur(10px);
  cursor:pointer;
}
.auth-music-toggle:hover{background:rgba(31,18,11,.68);border-color:rgba(255,219,138,.72);}
.auth-music-toggle.music-off,
.auth-music-toggle[aria-pressed="false"]{color:#d9c3a5;background:rgba(7,7,8,.38);border-color:rgba(217,195,165,.28);}
.sound-settings-block [data-music-toggle]{justify-self:start;margin:0 0 4px;}
@media(max-width:640px){.auth-music-toggle{top:10px;right:10px;padding:8px 11px;font-size:11px;}}

/* v43.2: Compact music icon toggles for auth and home pages. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.music-icon-toggle{display:inline-grid!important;place-items:center!important;line-height:1!important;text-align:center!important;}
.auth-music-toggle.music-icon-toggle{
  width:46px;
  height:46px;
  padding:0;
  font-size:20px;
  letter-spacing:0;
  border-radius:50%;
}
.quick-music-toggle{
  min-width:42px;
  width:42px;
  height:42px;
  padding:0!important;
  border-radius:999px!important;
  font-size:19px;
}
.quick-music-toggle b{display:none!important;}
.pixel-music-toggle{
  border-radius:12px!important;
  border:2px solid #6d4a2d!important;
  background:linear-gradient(180deg,#4f3527,#231712)!important;
  box-shadow:inset 0 0 0 1px rgba(255,220,155,.12),0 2px 0 rgba(18,9,6,.65)!important;
}
.pixel-music-toggle:hover{transform:translateY(-1px);filter:brightness(1.06);}
.pixel-music-toggle[aria-pressed="false"]{filter:saturate(.84) brightness(.9);}
.pixel-music-toggle-icon{width:24px;height:24px;display:block;image-rendering:pixelated;}
.music-icon-toggle[aria-pressed="false"]{filter:saturate(.78) brightness(.9);}
@media(max-width:640px){.auth-music-toggle.music-icon-toggle{width:42px;height:42px;font-size:18px;}}


/* v43.5: removed heraldic rose composition from auth landing; keep class hidden if older markup is cached. */
.auth-heraldic-side{display:none!important;}
/* v43.5: the pixel audio toggle controls both music and SFX. */
.pixel-music-toggle.audio-off .pixel-music-toggle-icon,
.pixel-music-toggle.music-off .pixel-music-toggle-icon{opacity:.84;}
.auth-music-toggle.pixel-music-toggle .pixel-music-toggle-icon{width:26px;height:26px;}


/* v43.7: Store polish + first-week starter deal banner. */
.starter-deal-banner{
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(160px,.55fr) minmax(260px,.9fr);
  gap:20px;
  align-items:center;
  margin:0 0 24px;
  padding:24px;
  border-radius:34px;
  overflow:hidden;
  color:#fff7df;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,232,154,.34),transparent 28%),
    radial-gradient(circle at 72% 42%,rgba(184,84,255,.34),transparent 30%),
    linear-gradient(135deg,#251028 0%,#5a1338 38%,#8b281e 68%,#d89833 100%);
  border:4px solid rgba(255,219,126,.55);
  box-shadow:0 24px 54px rgba(34,12,8,.38), inset 0 0 0 2px rgba(255,255,255,.08);
}
.starter-deal-banner:before{
  content:"";
  position:absolute;
  inset:6px;
  border-radius:28px;
  border:1px solid rgba(255,241,180,.28);
  pointer-events:none;
}
.starter-deal-banner:after{
  content:"";
  position:absolute;
  inset:-30% -12% auto auto;
  width:360px;
  height:360px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,252,202,.42),rgba(255,209,85,.12) 48%,transparent 70%);
  animation:starterAura 5.8s ease-in-out infinite;
  z-index:-1;
}
.starter-deal-aura{
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 2px,transparent 2px 10px),
    linear-gradient(90deg,rgba(0,0,0,.18),transparent 36%,rgba(0,0,0,.22));
  mix-blend-mode:screen;
  opacity:.7;
  z-index:-1;
}
.starter-badges{margin-bottom:8px;}
.starter-deal-copy .eyebrow{color:#ffd76f;text-shadow:0 2px 0 rgba(0,0,0,.5);}
.starter-deal-copy h2{
  margin:0 0 8px;
  font-family:Georgia,'Times New Roman',serif;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:clamp(30px,4.6vw,58px);
  line-height:.95;
  text-shadow:0 4px 0 rgba(45,10,0,.7),0 0 28px rgba(255,211,98,.4);
}
.starter-deal-copy p{max-width:560px;margin:0 0 12px;font-weight:900;color:#ffeec2;}
.starter-deal-countdown{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.26);
  border:1px solid rgba(255,230,168,.25);
  font-weight:1000;
  color:#fff4ce;
}
.starter-deal-countdown b{color:#ffdd63;}
.starter-deal-countdown.claimed{color:#dfffd4;background:rgba(26,93,35,.28);}
.starter-deal-countdown.expired{color:#ead4c9;background:rgba(0,0,0,.32);}
.starter-deal-center{display:grid;place-items:center;}
.mythic-chest{
  position:relative;
  width:150px;
  height:132px;
  image-rendering:pixelated;
  filter:drop-shadow(0 16px 0 rgba(0,0,0,.24));
}
.mythic-chest .chest-lid{
  position:absolute;
  left:16px;
  right:16px;
  top:18px;
  height:42px;
  border-radius:18px 18px 6px 6px;
  background:linear-gradient(180deg,#ffe08a,#c07318);
  border:5px solid #4b1b0c;
  box-shadow:inset 0 0 0 4px rgba(255,255,255,.18);
  transform-origin:bottom center;
  animation:chestLid 3.8s ease-in-out infinite;
}
.mythic-chest .chest-core{
  position:absolute;
  left:8px;
  right:8px;
  bottom:10px;
  height:74px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:linear-gradient(180deg,#8d2436,#3d1027);
  border:5px solid #4b1b0c;
  box-shadow:inset 0 0 0 4px rgba(255,255,255,.08),0 0 30px rgba(255,195,70,.18);
}
.mythic-chest .chest-core img{width:52px;height:52px;image-rendering:pixelated;filter:drop-shadow(0 6px 0 rgba(0,0,0,.26));}
.mythic-chest .chest-glow{
  position:absolute;
  left:36px;
  right:36px;
  top:52px;
  height:18px;
  background:#fff4a6;
  box-shadow:0 0 22px #ffd55a,0 0 55px #bf5cff;
  animation:chestGlow 2.4s ease-in-out infinite;
}
.starter-deal-rewards{
  position:relative;
  padding:16px;
  border-radius:24px;
  background:rgba(16,8,22,.42);
  border:1px solid rgba(255,231,169,.24);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
}
.starter-deal-rewards ul{
  list-style:none;
  padding:0;
  margin:0 0 14px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.starter-deal-rewards li{
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,244,201,.1);
  border:1px solid rgba(255,236,178,.18);
  font-weight:900;
  color:#fff7df;
}
.starter-deal-rewards li:before{content:"✦ ";color:#ffd966;}
.starter-price-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.starter-price-row strong{
  font-size:38px;
  line-height:1;
  color:#fff;
  text-shadow:0 3px 0 #2b0a04;
}
.starter-buy-button{
  min-width:190px;
  background:linear-gradient(180deg,#fff2a8,#f0a312)!important;
  color:#3d1300!important;
  border-color:#6a2c0d!important;
  box-shadow:0 6px 0 rgba(59,18,4,.75),inset 0 0 0 1px rgba(255,255,255,.35)!important;
}
.starter-deal-banner.redeemed{filter:saturate(.88);background:linear-gradient(135deg,#143516,#245b28 45%,#b9912e);}
.starter-deal-banner.expired{filter:saturate(.55) brightness(.86);}
.ruby-store-section{
  padding:20px;
  border-radius:30px;
  background:linear-gradient(180deg,rgba(255,248,220,.78),rgba(242,220,160,.5));
  border:2px solid rgba(123,76,22,.12);
}
.ruby-section-head{margin-bottom:14px;}
.polished-ruby-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.polished-ruby-card{
  min-height:315px;
  padding:18px!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 80% 10%,rgba(255,255,255,.52),transparent 22%),
    linear-gradient(180deg,#fff4d8,#edc56d 62%,#d89b37)!important;
  border:3px solid rgba(106,43,17,.2)!important;
  box-shadow:0 18px 30px rgba(72,35,10,.22),inset 0 0 0 1px rgba(255,255,255,.28)!important;
}
.polished-ruby-card.featured{
  background:
    radial-gradient(circle at 82% 10%,rgba(255,255,255,.7),transparent 25%),
    linear-gradient(180deg,#fff7e7,#f0ca79 52%,#ca5a82)!important;
  border-color:rgba(178,61,125,.32)!important;
}
.ruby-card-shine{
  position:absolute;
  inset:-35% auto auto -45%;
  width:170px;
  height:170px;
  transform:rotate(24deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);
  animation:rubyShine 4.8s ease-in-out infinite;
}
.ruby-card-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;position:relative;z-index:1;}
.ruby-badge,.ruby-secure{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.ruby-badge{background:#2a1424;color:#ffd876;border:1px solid rgba(255,216,118,.3);}
.ruby-secure{background:rgba(255,255,255,.5);color:#5b3212;border:1px solid rgba(91,50,18,.14);}
.polished-ruby-card .ruby-pile{
  margin:0 auto 12px;
  width:96px;
  height:96px;
  border-radius:30px;
  background:radial-gradient(circle at 50% 30%,#ffd6eb,#e44775 56%,#8c1234);
  box-shadow:0 12px 0 rgba(86,13,31,.22),0 0 26px rgba(231,65,118,.28);
}
.polished-ruby-card .ruby-pile img{width:58px;height:58px;image-rendering:pixelated;filter:drop-shadow(0 7px 0 rgba(0,0,0,.24));}
.polished-ruby-card h3{text-align:center;margin:0 0 6px;font-size:22px;}
.polished-ruby-card .bundle-rubies{text-align:center;font-size:28px;color:#611b33;text-shadow:0 1px 0 rgba(255,255,255,.38);}
.polished-ruby-card p{text-align:center;min-height:42px;font-weight:800;color:#68442b;}
.polished-ruby-card .bundle-price{
  display:block;
  width:max-content;
  margin:10px auto 12px;
  font-size:34px;
  background:#1d1022;
  color:#fff;
  border-radius:16px;
  padding:6px 14px;
  box-shadow:0 6px 0 rgba(0,0,0,.2);
}
.ruby-buy-button{
  background:linear-gradient(180deg,#ffe889,#e59e19)!important;
  color:#351200!important;
  border-color:#7a3b10!important;
  box-shadow:0 4px 0 rgba(74,28,4,.55)!important;
}
@keyframes starterAura{0%,100%{transform:scale(.96);opacity:.64}50%{transform:scale(1.06);opacity:1}}
@keyframes chestLid{0%,100%{transform:rotate(0deg)}45%,58%{transform:rotate(-8deg) translateY(-4px)}}
@keyframes chestGlow{0%,100%{opacity:.55;transform:scaleX(.82)}50%{opacity:1;transform:scaleX(1.18)}}
@keyframes rubyShine{0%,68%{transform:translateX(-40px) rotate(24deg);opacity:0}76%{opacity:1}100%{transform:translateX(260px) rotate(24deg);opacity:0}}
@media(max-width:1100px){.polished-ruby-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.starter-deal-banner{grid-template-columns:1fr minmax(220px,.8fr)}.starter-deal-center{display:none}}
@media(max-width:720px){.starter-deal-banner{grid-template-columns:1fr;padding:18px;border-radius:26px}.starter-deal-rewards ul{grid-template-columns:1fr}.starter-price-row strong{font-size:32px}.polished-ruby-grid{grid-template-columns:1fr}.ruby-store-section{padding:14px}}


/* v43.12: Week I War Bundle visual upgrade */
.starter-deal-banner{
  grid-template-columns:minmax(0,1.05fr) minmax(300px,.9fr) minmax(270px,.9fr);
}
.starter-deal-copy h2{
  font-size:clamp(28px,4.4vw,56px);
}
.starter-deal-center{
  position:relative;
  min-height:230px;
}
.grail-showcase{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  justify-items:center;
  gap:8px;
}
.grail-showcase-left{left:0; animation:grailFloatA 5.2s ease-in-out infinite;}
.grail-showcase-right{right:0; animation:grailFloatB 5.8s ease-in-out infinite;}
.grail-card-frame{
  width:92px;
  height:118px;
  padding:10px;
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,245,206,.96),rgba(236,191,86,.92) 65%,rgba(121,41,56,.96));
  border:4px solid rgba(89,26,12,.8);
  box-shadow:0 12px 22px rgba(0,0,0,.24), inset 0 0 0 2px rgba(255,255,255,.22);
  display:grid;
  place-items:center;
}
.grail-card-frame img{
  width:66px;
  height:66px;
  image-rendering:pixelated;
  filter:drop-shadow(0 5px 0 rgba(0,0,0,.28));
  animation:grailPulse 3.1s ease-in-out infinite;
}
.grail-card-label{
  padding:5px 9px;
  border-radius:999px;
  background:rgba(20,8,22,.55);
  border:1px solid rgba(255,229,156,.22);
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#ffe6a1;
}
.starter-reward-grid{
  list-style:none;
  padding:0;
  margin:0 0 14px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.starter-reward-chip{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,244,201,.1);
  border:1px solid rgba(255,236,178,.18);
  font-weight:900;
  color:#fff7df;
}
.starter-reward-chip img{
  width:26px;
  height:26px;
  image-rendering:pixelated;
  flex:0 0 auto;
  filter:drop-shadow(0 4px 0 rgba(0,0,0,.22));
}
.starter-reward-chip.highlight{
  background:rgba(255,216,125,.16);
  border-color:rgba(255,238,176,.28);
  box-shadow:0 0 20px rgba(255,219,127,.14);
}
.starter-deal-rewards li:before{content:none;}
@keyframes grailFloatA{0%,100%{transform:translateY(-50%) translateX(0) rotate(-4deg)}50%{transform:translateY(calc(-50% - 10px)) translateX(5px) rotate(1deg)}}
@keyframes grailFloatB{0%,100%{transform:translateY(-50%) translateX(0) rotate(4deg)}50%{transform:translateY(calc(-50% - 8px)) translateX(-6px) rotate(-1deg)}}
@keyframes grailPulse{0%,100%{transform:translateY(0) scale(.98)}50%{transform:translateY(-2px) scale(1.06)}}
@media(max-width:1100px){
  .starter-deal-banner{grid-template-columns:1fr;}
  .starter-deal-center{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:170px}
  .grail-showcase{position:relative;top:auto;transform:none}
  .grail-showcase-left,.grail-showcase-right{left:auto;right:auto}
}
@media(max-width:720px){
  .starter-deal-center{grid-template-columns:1fr;gap:10px}
  .grail-showcase-right{display:none}
  .grail-showcase-left{justify-self:center}
  .starter-reward-grid{grid-template-columns:1fr}
}


/* v43.13: Juicy store + alliance shop card polish and slow ruby VFX.
   Append this block to the end of game/static/game/css/app.css.
   If you keep mirrored static output in your repo, append it there too:
   static/game/css/app.css and staticfiles/game/css/app.css.
*/

.starter-bundle-showcase{
  position:relative;
  min-height:260px;
  display:grid;
  place-items:center;
}
.starter-bundle-cards{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.bundle-showcase-card{
  position:absolute;
  display:grid;
  justify-items:center;
  gap:7px;
  animation:bundleCardFloat 5.6s ease-in-out infinite;
  filter:drop-shadow(0 12px 12px rgba(0,0,0,.22));
}
.bundle-card-frame{
  position:relative;
  width:92px;
  height:116px;
  display:grid;
  place-items:center;
  border-radius:19px;
  background:
    linear-gradient(180deg,rgba(255,244,196,.98),rgba(240,191,75,.94) 62%,rgba(116,36,52,.96));
  border:4px solid rgba(82,25,9,.85);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.22),
    inset 0 -14px 20px rgba(91,20,34,.24),
    0 14px 20px rgba(0,0,0,.2);
  overflow:hidden;
}
.bundle-card-frame:before{
  content:"";
  position:absolute;
  top:28px;
  left:20%;
  right:20%;
  height:2px;
  background:rgba(255,255,255,.45);
}
.bundle-card-frame img{
  width:58px;
  height:58px;
  object-fit:contain;
  image-rendering:pixelated;
  filter:drop-shadow(0 5px 0 rgba(0,0,0,.25));
  animation:bundleIconPulse 3.4s ease-in-out infinite;
}
.bundle-card-label{
  padding:5px 9px;
  border-radius:999px;
  background:rgba(23,8,18,.7);
  border:1px solid rgba(255,231,163,.26);
  color:#ffeaa9;
  font-size:11px;
  line-height:1;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.055em;
  white-space:nowrap;
}
.bundle-card-chests{left:7%;top:7%;animation-delay:.1s}
.bundle-card-pass{right:8%;top:8%;animation-delay:.55s}
.bundle-card-knights{left:3%;bottom:8%;animation-delay:.9s}
.bundle-card-grail{right:4%;bottom:8%;animation-delay:1.25s}
.bundle-card-rubies{left:50%;top:0;transform:translateX(-50%);animation-delay:1.55s}
.week-bundle-chest{z-index:4}
.starter-reward-chip{transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease}
.starter-reward-chip:hover{
  transform:translateY(-2px);
  border-color:rgba(255,235,160,.38);
  box-shadow:0 10px 20px rgba(0,0,0,.14), 0 0 18px rgba(255,214,99,.14);
}

/* Shared premium store card language */
.fancy-shop-card,
.juicy-ruby-card{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
.fancy-shop-card:hover,
.juicy-ruby-card:hover{
  transform:translateY(-4px);
  box-shadow:
    0 18px 34px rgba(28,9,4,.26),
    0 0 0 1px rgba(255,232,153,.18),
    inset 0 0 0 1px rgba(255,255,255,.08);
}
.card-ambient-glow{
  position:absolute;
  inset:-40% -30% auto auto;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,246,180,.34),rgba(255,178,59,.12) 48%,transparent 70%);
  opacity:.72;
  animation:shopCardGlow 6.2s ease-in-out infinite;
  pointer-events:none;
  z-index:-1;
}
.fancy-shop-card:before,
.juicy-ruby-card:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(115deg,transparent 0 34%,rgba(255,255,255,.18) 42%,transparent 50% 100%);
  transform:translateX(-115%);
  animation:shopCardSheen 7.2s ease-in-out infinite;
  pointer-events:none;
  z-index:1;
}
.fancy-shop-card .offer-art,
.juicy-ruby-card .ruby-pile{
  position:relative;
  z-index:2;
  transform-origin:center bottom;
  animation:shopIconBreathe 4.4s ease-in-out infinite;
}
.fancy-shop-card .offer-art img,
.juicy-ruby-card .ruby-pile img{
  image-rendering:pixelated;
  filter:drop-shadow(0 8px 0 rgba(0,0,0,.17));
}
.fancy-shop-card .offer-badges,
.fancy-shop-card h3,
.fancy-shop-card p,
.fancy-shop-card form,
.fancy-shop-card .offer-limit,
.juicy-ruby-card .ruby-card-top,
.juicy-ruby-card h3,
.juicy-ruby-card .bundle-rubies,
.juicy-ruby-card p,
.juicy-ruby-card .bundle-price,
.juicy-ruby-card form{
  position:relative;
  z-index:3;
}
.seasonal-card.fancy-shop-card{
  border-color:rgba(255,220,112,.55);
  background:
    radial-gradient(circle at 82% 8%,rgba(255,255,190,.5),transparent 22%),
    linear-gradient(180deg,#fff8cf,#f4d276 70%,#d99642);
}
.offer-card.fancy-shop-card .buy-button,
.juicy-ruby-card .ruby-buy-button{
  box-shadow:
    0 5px 0 rgba(65,26,8,.62),
    inset 0 0 0 1px rgba(255,255,255,.34);
}
.juicy-ruby-card{
  background:
    radial-gradient(circle at 80% 8%,rgba(255,255,214,.72),transparent 24%),
    linear-gradient(180deg,#fff6c6 0%,#f5c86d 58%,#e88a8f 100%);
  border:2px solid rgba(118,47,80,.42);
}
.juicy-ruby-card.featured{
  border-color:rgba(255,93,177,.68);
  box-shadow:
    0 18px 34px rgba(54,8,44,.2),
    0 0 26px rgba(255,79,167,.22);
}
.juicy-ruby-card .ruby-pile{
  width:90px;
  height:90px;
  margin-inline:auto;
  border-radius:30px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 38% 32%,rgba(255,255,255,.55),transparent 24%),
    linear-gradient(180deg,#ff5aa2,#ad215b);
  box-shadow:0 12px 22px rgba(56,5,26,.24), inset 0 0 0 2px rgba(255,255,255,.18);
}
.juicy-ruby-card .ruby-pile img{
  width:54px;
  height:54px;
}
.juicy-ruby-card .bundle-price{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-inline:auto;
  padding:8px 14px;
  border-radius:16px;
  background:#241427;
  color:#fff7dc;
  text-shadow:0 2px 0 rgba(0,0,0,.55);
  box-shadow:0 5px 0 rgba(0,0,0,.25);
}

/* Alliance shop gets the same premium treatment without rewriting alliance logic. */
.alliance-shop-polished{
  padding:18px;
  border-radius:30px;
  background:
    radial-gradient(circle at 80% 0,rgba(255,224,120,.22),transparent 28%),
    linear-gradient(180deg,rgba(255,248,219,.82),rgba(237,204,126,.62));
  border:2px solid rgba(121,71,32,.38);
}
.alliance-shop-polished .section-head{padding:4px 2px 10px}
.alliance-fancy-card{
  background:
    radial-gradient(circle at 82% 10%,rgba(255,245,181,.5),transparent 23%),
    linear-gradient(180deg,#fff2ba,#efc668 65%,#cc8846);
  border-color:rgba(115,60,25,.46);
}
.alliance-fancy-card .offer-limit{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:6px 10px;
  margin:4px 0 10px;
  border-radius:999px;
  background:rgba(58,29,19,.12);
  border:1px solid rgba(92,49,24,.18);
  font-weight:900;
  color:#5a321e;
}

@keyframes bundleCardFloat{
  0%,100%{translate:0 0;rotate:-1deg}
  50%{translate:0 -9px;rotate:1.5deg}
}
@keyframes bundleIconPulse{
  0%,100%{transform:translateY(0) scale(.98)}
  50%{transform:translateY(-2px) scale(1.07)}
}
@keyframes shopCardGlow{
  0%,100%{transform:scale(.88);opacity:.54}
  50%{transform:scale(1.08);opacity:.82}
}
@keyframes shopCardSheen{
  0%,68%{transform:translateX(-115%)}
  82%,100%{transform:translateX(115%)}
}
@keyframes shopIconBreathe{
  0%,100%{transform:translateY(0) scale(1)}
  50%{transform:translateY(-3px) scale(1.035)}
}
@media(max-width:1100px){
  .starter-bundle-showcase{min-height:340px}
  .bundle-showcase-card{position:relative;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important}
  .starter-bundle-cards{
    position:relative;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-bottom:12px;
  }
  .bundle-card-frame{width:78px;height:94px}
  .bundle-card-frame img{width:48px;height:48px}
}
@media(max-width:720px){
  .starter-bundle-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bundle-card-rubies{grid-column:1/-1;justify-self:center}
  .bundle-card-label{font-size:10px}
}


/* v43.14: Cleaner rarity cards, no ruby pop VFX, and focused Week I bundle cards. */
.starter-bundle-showcase{min-height:250px;}
.starter-bundle-cards-focused{
  position:absolute;
  inset:0;
  display:block;
  pointer-events:none;
}
.bundle-showcase-card{z-index:3;}
.bundle-card-household{left:7%;bottom:9%;animation-delay:.15s;}
.bundle-card-grail{right:5%;bottom:8%;animation-delay:.75s;}
.bundle-card-rubies{left:50%;top:0;transform:translateX(-50%);animation-delay:1.2s;}
.bundle-card-chests,.bundle-card-pass,.bundle-card-knights{display:none!important;}
.bundle-card-frame{
  width:104px;
  height:128px;
  border-radius:22px;
  background:
    linear-gradient(115deg,rgba(255,255,255,.36),transparent 28%,rgba(255,255,255,.14) 42%,transparent 60%),
    linear-gradient(180deg,#fff0ae 0%,#e5a63d 58%,#743044 100%);
  border:4px solid rgba(80,25,10,.86);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.22),
    inset 0 -18px 24px rgba(70,19,39,.24),
    0 16px 18px rgba(0,0,0,.22),
    0 0 24px rgba(255,209,96,.13);
}
.bundle-card-frame:after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.24);
  pointer-events:none;
}
.bundle-card-frame img{width:66px;height:66px;}
.rare-card .bundle-card-frame{
  background:
    linear-gradient(115deg,rgba(255,255,255,.34),transparent 26%,rgba(255,255,255,.15) 45%,transparent 64%),
    linear-gradient(180deg,#d9f2ff 0%,#71a8d7 48%,#285077 100%);
  border-color:#183d68;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.2),0 16px 18px rgba(0,0,0,.22),0 0 26px rgba(90,176,255,.22);
}
.mythic-card .bundle-card-frame{
  background:
    radial-gradient(circle at 50% 14%,rgba(255,255,217,.78),transparent 28%),
    linear-gradient(115deg,rgba(255,255,255,.38),transparent 24%,rgba(255,220,120,.18) 46%,transparent 68%),
    linear-gradient(180deg,#ffe89a 0%,#e33f3f 48%,#5b1135 100%);
  border-color:#5b1b0e;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.26),0 18px 20px rgba(0,0,0,.25),0 0 30px rgba(255,75,75,.28),0 0 44px rgba(255,211,96,.2);
}
.premium-card .bundle-card-frame{
  background:
    linear-gradient(115deg,rgba(255,255,255,.38),transparent 26%,rgba(255,255,255,.16) 44%,transparent 64%),
    linear-gradient(180deg,#ffd6ea 0%,#ee5795 50%,#7d1d52 100%);
  border-color:#6d1643;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.22),0 16px 18px rgba(0,0,0,.22),0 0 28px rgba(255,73,157,.25);
}
.bundle-card-label{font-size:10px;max-width:132px;text-align:center;line-height:1.1;padding:6px 10px;}

/* Foil card styling applied across store, ruby bundles and alliance shop. */
.fancy-shop-card,.juicy-ruby-card,.alliance-fancy-card{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:24px!important;
  border-width:3px!important;
  background:
    radial-gradient(circle at 82% 8%,rgba(255,255,210,.52),transparent 22%),
    linear-gradient(180deg,#fff4c4,#efc36a 65%,#c78442)!important;
  box-shadow:0 14px 26px rgba(28,9,4,.18), inset 0 0 0 1px rgba(255,255,255,.14);
}
.fancy-shop-card:before,.juicy-ruby-card:before,.alliance-fancy-card:before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg,transparent 0 32%,rgba(255,255,255,.18) 42%,transparent 52% 100%);
  transform:translateX(-120%);
  animation:shopCardSheen 7.5s ease-in-out infinite;
  pointer-events:none;
  z-index:1;
}
.fancy-shop-card:after,.juicy-ruby-card:after,.alliance-fancy-card:after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.18);
  pointer-events:none;
  z-index:1;
}
.fancy-shop-card:hover,.juicy-ruby-card:hover,.alliance-fancy-card:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 34px rgba(28,9,4,.26),0 0 26px rgba(255,219,118,.16),inset 0 0 0 1px rgba(255,255,255,.16);
}
.fancy-shop-card .card-ambient-glow,.juicy-ruby-card .card-ambient-glow,.alliance-fancy-card .card-ambient-glow{display:block;}
.rarity-rare,.rarity-event-rare{
  border-color:#2c6c9f!important;
  background:radial-gradient(circle at 82% 8%,rgba(216,245,255,.55),transparent 22%),linear-gradient(180deg,#eaf8ff,#91c4e7 62%,#477aa8)!important;
}
.rarity-mythic{
  border-color:#7b2b1f!important;
  background:radial-gradient(circle at 50% 0,rgba(255,247,184,.5),transparent 30%),linear-gradient(180deg,#ffe7a2,#e2774d 46%,#8b2248 100%)!important;
  box-shadow:0 20px 36px rgba(60,12,37,.24),0 0 34px rgba(255,85,133,.18),0 0 30px rgba(255,211,96,.14)!important;
}
.rarity-event{
  border-color:#a76822!important;
  background:radial-gradient(circle at 82% 8%,rgba(255,255,210,.65),transparent 22%),linear-gradient(180deg,#fff6c8,#f1c85b 58%,#d48632)!important;
}
.juicy-ruby-card{
  border-color:#a83e78!important;
  background:radial-gradient(circle at 80% 8%,rgba(255,255,214,.72),transparent 24%),linear-gradient(180deg,#fff1ba 0%,#f5bc62 52%,#de6a99 100%)!important;
}
.juicy-ruby-card.featured,.ruby-tier-royal,.ruby-tier-best-value{
  border-color:#d04693!important;
  box-shadow:0 18px 34px rgba(54,8,44,.2),0 0 30px rgba(255,79,167,.22)!important;
}
.alliance-shop-polished{border-radius:30px;}

@media(max-width:1100px){
  .starter-bundle-showcase{min-height:260px;}
  .starter-bundle-cards-focused{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start;margin-bottom:12px;}
  .bundle-card-household,.bundle-card-grail,.bundle-card-rubies{position:relative;left:auto;right:auto;top:auto;bottom:auto;transform:none;}
}
@media(max-width:720px){
  .starter-bundle-cards-focused{grid-template-columns:1fr;justify-items:center;}
}


/* v43.15: Week I banner fit cleanup.
   Removes the extra ruby showcase card and restores the cleaner two-card fit.
   The chest already communicates rubies, so the only large foil cards are the troop rewards. */
.starter-bundle-showcase{
  min-height:210px;
  display:grid;
  place-items:center;
}
.starter-bundle-cards-focused{
  position:absolute;
  inset:0;
  display:block;
  pointer-events:none;
}
.starter-bundle-cards-focused .bundle-card-rubies{
  display:none!important;
}
.starter-bundle-cards-focused .bundle-card-household{
  left:7%;
  bottom:8%;
  top:auto;
  transform:none;
  animation-delay:.15s;
}
.starter-bundle-cards-focused .bundle-card-grail{
  right:7%;
  bottom:8%;
  top:auto;
  transform:none;
  animation-delay:.75s;
}
.starter-bundle-cards-focused .bundle-card-frame{
  width:96px;
  height:118px;
  border-radius:21px;
}
.starter-bundle-cards-focused .bundle-card-frame img{
  width:62px;
  height:62px;
}
.starter-bundle-cards-focused .bundle-card-label{
  max-width:150px;
  font-size:10px;
  line-height:1.08;
}
.week-bundle-chest{
  z-index:5;
  transform:translateY(8px);
}
.week-bundle-chest .chest-lid{
  animation:chestLid 4.2s ease-in-out infinite;
}
.week-bundle-chest .chest-core{
  box-shadow:inset 0 0 0 4px rgba(255,255,255,.08),0 0 30px rgba(255,195,70,.18),0 18px 22px rgba(0,0,0,.24);
}
.rare-card .bundle-card-label{
  color:#dff3ff;
  border-color:rgba(149,218,255,.34);
}
.mythic-card .bundle-card-label{
  color:#ffe9a6;
  border-color:rgba(255,226,129,.36);
  box-shadow:0 0 18px rgba(255,82,82,.16);
}
@media(max-width:1100px){
  .starter-bundle-showcase{
    min-height:245px;
  }
  .starter-bundle-cards-focused{
    position:absolute;
    display:block;
  }
  .starter-bundle-cards-focused .bundle-showcase-card{
    position:absolute;
  }
  .starter-bundle-cards-focused .bundle-card-household{
    left:8%;
    bottom:6%;
  }
  .starter-bundle-cards-focused .bundle-card-grail{
    right:8%;
    bottom:6%;
  }
}
@media(max-width:720px){
  .starter-bundle-showcase{
    min-height:330px;
  }
  .starter-bundle-cards-focused .bundle-card-household{
    left:4%;
    bottom:8px;
  }
  .starter-bundle-cards-focused .bundle-card-grail{
    right:4%;
    bottom:8px;
  }
  .starter-bundle-cards-focused .bundle-card-frame{
    width:82px;
    height:100px;
  }
  .starter-bundle-cards-focused .bundle-card-frame img{
    width:52px;
    height:52px;
  }
}


/* v43.16: Week I banner card visibility fix.
   Pulls the troop foil cards out from behind the chest so both are clearly visible. */
.starter-bundle-showcase{
  min-height:220px;
}
.starter-bundle-cards-focused .bundle-card-household{
  left:-2%;
  bottom:19%;
  z-index:6;
  transform:rotate(-4deg);
}
.starter-bundle-cards-focused .bundle-card-grail{
  right:-2%;
  bottom:19%;
  z-index:6;
  transform:rotate(4deg);
}
.starter-bundle-cards-focused .bundle-card-household .bundle-card-frame,
.starter-bundle-cards-focused .bundle-card-grail .bundle-card-frame{
  width:102px;
  height:124px;
}
.starter-bundle-cards-focused .bundle-card-household .bundle-card-label,
.starter-bundle-cards-focused .bundle-card-grail .bundle-card-label{
  transform:translateY(-2px);
}
.week-bundle-chest{
  z-index:5;
  transform:translateY(16px) scale(.96);
}
@media(max-width:1100px){
  .starter-bundle-cards-focused .bundle-card-household{
    left:0;
    bottom:18%;
  }
  .starter-bundle-cards-focused .bundle-card-grail{
    right:0;
    bottom:18%;
  }
}
@media(max-width:720px){
  .starter-bundle-cards-focused .bundle-card-household{
    left:-2px;
    bottom:18px;
  }
  .starter-bundle-cards-focused .bundle-card-grail{
    right:-2px;
    bottom:18px;
  }
  .week-bundle-chest{
    transform:translateY(-4px) scale(.92);
  }
}


/* v43.17: cancel queue actions and experimental chest card reveal. */
.queue-action-row,
.queue-meta-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.queue-meta-actions form{margin:0;}
.queue-card .btn-small.red.tiny-btn,
.queue-card .btn-small.red{
  box-shadow:0 4px 0 rgba(70,16,13,.55);
}
.chest-panel{
  position:relative;
  overflow:hidden;
}
.chest-card-reveal-zone{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-48%);
  z-index:8;
  width:min(250px,52vw);
  min-height:300px;
  display:grid;
  place-items:center;
  pointer-events:auto;
}
.chest-card-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:10px 0;
  position:relative;
  z-index:10;
}
.chest-reveal-card{
  position:relative;
  width:210px;
  min-height:282px;
  border:5px solid #4d1b0b;
  border-radius:26px;
  cursor:pointer;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:9px;
  padding:16px;
  color:#fff3c8;
  text-align:center;
  text-transform:none;
  font:inherit;
  background:
    radial-gradient(circle at 50% 12%,rgba(255,255,218,.74),transparent 24%),
    linear-gradient(115deg,rgba(255,255,255,.34),transparent 24%,rgba(255,255,255,.15) 45%,transparent 64%),
    linear-gradient(180deg,#fff1a8 0%,#d3922b 48%,#5c1436 100%);
  box-shadow:
    0 20px 30px rgba(0,0,0,.32),
    0 0 42px rgba(255,207,93,.22),
    inset 0 0 0 2px rgba(255,255,255,.22),
    inset 0 -24px 30px rgba(56,9,30,.24);
  image-rendering:pixelated;
  animation:chestCardArrive .38s cubic-bezier(.2,1.35,.35,1) both;
}
.chest-reveal-card:before{
  content:"";
  position:absolute;
  inset:9px;
  border-radius:19px;
  border:1px solid rgba(255,255,255,.28);
  pointer-events:none;
}
.chest-reveal-card:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg,transparent 0 34%,rgba(255,255,255,.34) 44%,transparent 54% 100%);
  border-radius:20px;
  transform:translateX(-120%);
  animation:chestCardFoil 2.4s ease-in-out infinite;
  pointer-events:none;
}
.chest-card-count,
.chest-card-rarity{
  position:absolute;
  top:10px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(22,7,17,.72);
  border:1px solid rgba(255,236,170,.24);
  font-size:11px;
  font-weight:1000;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.chest-card-count{left:10px;}
.chest-card-rarity{right:10px;}
.chest-card-art{
  width:92px;
  height:92px;
  border-radius:26px;
  display:grid;
  place-items:center;
  background:rgba(255,244,202,.16);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.13);
  margin-top:22px;
}
.chest-card-art img{
  width:62px;
  height:62px;
  object-fit:contain;
  image-rendering:pixelated;
  filter:drop-shadow(0 6px 0 rgba(0,0,0,.24));
}
.chest-reveal-card b{
  font-size:22px;
  line-height:1.05;
  text-shadow:0 3px 0 rgba(0,0,0,.44);
}
.chest-reveal-card strong{
  font-size:34px;
  line-height:1;
  color:#fff;
  text-shadow:0 4px 0 rgba(0,0,0,.42);
}
.chest-reveal-card small{
  color:#ffe9a6;
  font-weight:900;
}
.chest-reveal-common{
  border-color:#70401f;
}
.chest-reveal-rare{
  background:
    radial-gradient(circle at 50% 12%,rgba(240,252,255,.78),transparent 24%),
    linear-gradient(115deg,rgba(255,255,255,.35),transparent 24%,rgba(255,255,255,.15) 45%,transparent 64%),
    linear-gradient(180deg,#d9f2ff 0%,#67a7db 48%,#28436d 100%);
  border-color:#15365e;
  box-shadow:0 20px 30px rgba(0,0,0,.32),0 0 44px rgba(81,177,255,.3),inset 0 0 0 2px rgba(255,255,255,.2);
}
.chest-reveal-epic{
  background:
    radial-gradient(circle at 50% 12%,rgba(255,235,255,.78),transparent 24%),
    linear-gradient(115deg,rgba(255,255,255,.35),transparent 24%,rgba(255,255,255,.16) 45%,transparent 64%),
    linear-gradient(180deg,#f7d1ff 0%,#b849de 48%,#441467 100%);
  border-color:#4c196a;
  box-shadow:0 20px 30px rgba(0,0,0,.32),0 0 48px rgba(210,81,255,.34),inset 0 0 0 2px rgba(255,255,255,.2);
}
.chest-reveal-mythic{
  background:
    radial-gradient(circle at 50% 12%,rgba(255,255,216,.86),transparent 25%),
    linear-gradient(115deg,rgba(255,255,255,.4),transparent 23%,rgba(255,227,116,.22) 45%,transparent 66%),
    linear-gradient(180deg,#fff09e 0%,#f14f35 45%,#65123b 100%);
  border-color:#651b0f;
  box-shadow:0 22px 34px rgba(0,0,0,.36),0 0 54px rgba(255,86,68,.38),0 0 76px rgba(255,216,91,.22),inset 0 0 0 2px rgba(255,255,255,.28);
}
.chest-card-loot-list{
  position:relative;
  z-index:7;
  max-height:240px;
  overflow:auto;
  padding-right:4px;
}
.chest-card-loot-row{
  animation:lootRowAdd .24s ease-out both;
}
.chest-loot-rare{border-color:rgba(96,173,255,.34)!important;box-shadow:0 0 18px rgba(89,170,255,.12);}
.chest-loot-epic{border-color:rgba(210,100,255,.34)!important;box-shadow:0 0 18px rgba(191,82,255,.12);}
.chest-loot-mythic{border-color:rgba(255,208,88,.42)!important;box-shadow:0 0 22px rgba(255,201,80,.18);}
.chest-card-flash{
  position:absolute;
  inset:50% auto auto 50%;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff5a8;
  transform:translate(-50%,-50%);
  pointer-events:none;
  animation:chestCardFlash .72s ease-out forwards;
  z-index:-1;
}
.chest-card-flash-rare{background:#a9ddff;}
.chest-card-flash-epic{background:#e4a8ff;}
.chest-card-flash-mythic{background:#ffe267;}
@keyframes chestCardArrive{
  from{opacity:0;transform:translateY(26px) scale(.72) rotate(-4deg);}
  to{opacity:1;transform:translateY(0) scale(1) rotate(0deg);}
}
@keyframes chestCardFoil{
  0%,48%{transform:translateX(-120%);opacity:.2;}
  64%{opacity:.75;}
  84%,100%{transform:translateX(120%);opacity:.1;}
}
@keyframes chestCardFlash{
  0%{opacity:.86;box-shadow:0 0 0 0 currentColor;transform:translate(-50%,-50%) scale(.8);}
  100%{opacity:0;box-shadow:0 0 0 130px currentColor;transform:translate(-50%,-50%) scale(1.15);}
}
@keyframes lootRowAdd{
  from{opacity:0;transform:translateY(8px) scale(.98);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
@media(max-width:720px){
  .chest-card-reveal-zone{position:relative;left:auto;top:auto;transform:none;width:100%;min-height:255px;margin:8px 0;}
  .chest-reveal-card{width:min(205px,80vw);min-height:260px;}
}

/* v43.18: Chest card reveal revamp + clean feature-flag fallback.
   When GAME_CHEST_CARD_REVEAL_EXPERIMENT is false, the old chest behavior is preserved:
   the reveal controls remain hidden and the old particle/list flow runs. */
.chest-card-reveal-zone[hidden],
.chest-card-actions[hidden],
.chest-card-loot-list[hidden],
.daily-reward-list[hidden]{
  display:none!important;
}
.chest-card-experiment{
  width:min(980px,92vw);
  min-height:min(780px,88vh);
  padding:34px clamp(22px,4vw,48px)!important;
  border-radius:34px!important;
  color:#fff2cf;
  border:5px solid rgba(152,82,29,.92)!important;
  background:
    radial-gradient(circle at 52% 35%,rgba(255,217,110,.28),transparent 28%),
    radial-gradient(circle at 22% 18%,rgba(255,255,225,.18),transparent 22%),
    linear-gradient(135deg,#2b0923 0%,#5d123a 42%,#9a2d28 72%,#d88c22 100%)!important;
  box-shadow:0 30px 80px rgba(0,0,0,.42), inset 0 0 0 2px rgba(255,236,181,.22)!important;
}
.chest-card-experiment:before{
  content:"";
  position:absolute;
  inset:10px;
  border-radius:26px;
  border:1px solid rgba(255,236,180,.22);
  pointer-events:none;
  z-index:0;
}
.chest-card-experiment:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 2px,transparent 2px 10px),
    linear-gradient(90deg,rgba(0,0,0,.14),transparent 36%,rgba(0,0,0,.16));
  pointer-events:none;
  mix-blend-mode:screen;
  opacity:.72;
  z-index:0;
}
.chest-card-experiment > *{
  position:relative;
  z-index:2;
}
.chest-card-experiment h2{
  margin:0 0 8px;
  color:#fff8df;
  font-size:clamp(34px,4.2vw,56px);
  line-height:.95;
  font-family:Georgia,'Times New Roman',serif;
  text-transform:uppercase;
  letter-spacing:.035em;
  text-shadow:0 4px 0 rgba(45,10,0,.72),0 0 26px rgba(255,211,98,.32);
}
.chest-card-experiment .muted,
.chest-card-experiment .chest-card-intro{
  color:#ffe8ba!important;
  font-weight:900;
  max-width:720px;
  margin-inline:auto;
}
.chest-card-experiment .chest-card-stage{
  position:relative;
  min-height:320px;
  display:grid;
  place-items:center;
  margin:14px auto 8px;
  isolation:isolate;
}
.chest-card-experiment .big-chest-button{
  width:245px;
  min-height:245px;
  border-radius:36px;
  background:
    radial-gradient(circle at 50% 18%,rgba(255,255,255,.32),transparent 24%),
    linear-gradient(180deg,#ffe88a,#f0a91e 72%,#c56a11)!important;
  border:4px solid rgba(84,37,10,.86)!important;
  box-shadow:0 18px 0 rgba(53,25,5,.28),0 0 45px rgba(255,207,82,.24),inset 0 0 0 2px rgba(255,255,255,.22)!important;
  transition:transform .28s ease, opacity .28s ease, filter .28s ease;
}
.chest-card-experiment .big-chest-button img{
  width:132px;
  height:132px;
  image-rendering:pixelated;
  filter:drop-shadow(0 8px 0 rgba(0,0,0,.24));
}
.chest-card-experiment .big-chest-button span{
  font-size:28px;
  font-weight:1000;
  text-shadow:0 2px 0 rgba(255,255,255,.3);
}
.chest-card-experiment.charging .big-chest-button,
.chest-card-experiment .big-chest-button.charging{
  animation:chestAnticipation .62s ease-in-out infinite;
}
.chest-card-experiment.card-revealing .big-chest-button,
.chest-card-experiment .big-chest-button.card-source{
  transform:translateY(42px) scale(.78);
  opacity:.92;
  filter:saturate(1.05) brightness(.96);
}
.chest-card-experiment.card-revealing .big-chest-button span,
.chest-card-experiment.card-revealing .big-chest-button img{
  opacity:.62;
}
.chest-card-experiment .chest-card-reveal-zone:not([hidden]){
  position:absolute;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%);
  z-index:12;
  width:min(300px,72vw);
  min-height:370px;
  display:grid;
  place-items:center;
  pointer-events:auto;
}
.chest-card-experiment .chest-card-actions:not([hidden]){
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin:4px 0 12px;
  position:relative;
  z-index:14;
}
.chest-card-experiment .chest-card-actions .btn-small{
  min-width:190px;
  padding:12px 18px;
  font-size:16px;
  border-radius:16px;
  box-shadow:0 6px 0 rgba(63,25,6,.6),inset 0 0 0 1px rgba(255,255,255,.24)!important;
}
.chest-card-experiment .daily-reward-text{
  min-height:28px;
  margin:6px 0;
  color:#ffe8a8;
  font-weight:1000;
  text-shadow:0 2px 0 rgba(0,0,0,.35);
}
.chest-card-experiment .chest-reveal-card{
  position:relative;
  width:260px;
  min-height:348px;
  border:6px solid #4d1b0b;
  border-radius:30px;
  cursor:pointer;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:10px;
  padding:18px;
  color:#fff3c8;
  text-align:center;
  text-transform:none;
  font:inherit;
  background:
    radial-gradient(circle at 50% 12%,rgba(255,255,218,.78),transparent 25%),
    linear-gradient(115deg,rgba(255,255,255,.36),transparent 23%,rgba(255,255,255,.15) 45%,transparent 64%),
    linear-gradient(180deg,#fff1a8 0%,#d3922b 48%,#5c1436 100%);
  box-shadow:
    0 22px 34px rgba(0,0,0,.36),
    0 0 46px rgba(255,207,93,.26),
    inset 0 0 0 2px rgba(255,255,255,.24),
    inset 0 -26px 32px rgba(56,9,30,.26);
  image-rendering:pixelated;
  animation:chestCardDeal .44s cubic-bezier(.2,1.45,.35,1) both;
  overflow:hidden;
}
.chest-card-experiment .chest-reveal-card:before{
  content:"";
  position:absolute;
  inset:10px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.3);
  pointer-events:none;
  z-index:1;
}
.chest-card-experiment .chest-reveal-card:after{
  content:"";
  position:absolute;
  inset:-4px;
  background:linear-gradient(115deg,transparent 0 34%,rgba(255,255,255,.42) 44%,transparent 54% 100%);
  border-radius:26px;
  transform:translateX(-120%);
  animation:chestCardFoil 2.15s ease-in-out infinite;
  pointer-events:none;
  z-index:3;
}
.chest-card-backdrop{
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 50% 34%,rgba(255,255,255,.12),transparent 32%);
  z-index:0;
}
.chest-card-experiment .chest-card-count,
.chest-card-experiment .chest-card-rarity,
.chest-card-experiment .chest-card-art,
.chest-card-experiment .chest-reveal-card b,
.chest-card-experiment .chest-reveal-card strong,
.chest-card-experiment .chest-reveal-card small{
  position:relative;
  z-index:2;
}
.chest-card-experiment .chest-card-count,
.chest-card-experiment .chest-card-rarity{
  position:absolute;
  top:12px;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(22,7,17,.76);
  border:1px solid rgba(255,236,170,.28);
  font-size:11px;
  font-weight:1000;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.chest-card-experiment .chest-card-count{left:12px;}
.chest-card-experiment .chest-card-rarity{right:12px;}
.chest-card-experiment .chest-card-art{
  width:118px;
  height:118px;
  border-radius:30px;
  display:grid;
  place-items:center;
  background:rgba(255,244,202,.18);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.16),0 10px 18px rgba(0,0,0,.13);
  margin-top:28px;
}
.chest-card-experiment .chest-card-art img{
  width:78px;
  height:78px;
  object-fit:contain;
  image-rendering:pixelated;
  filter:drop-shadow(0 7px 0 rgba(0,0,0,.26));
}
.chest-card-experiment .chest-reveal-card b{
  font-size:27px;
  line-height:1.02;
  color:#fff8df;
  text-shadow:0 4px 0 rgba(0,0,0,.42);
}
.chest-card-experiment .chest-reveal-card strong{
  font-size:43px;
  line-height:1;
  color:#fff;
  text-shadow:0 5px 0 rgba(0,0,0,.42);
}
.chest-card-experiment .chest-reveal-card small{
  color:#ffe9a6;
  font-weight:1000;
}
.chest-card-experiment .chest-reveal-rare{
  background:
    radial-gradient(circle at 50% 12%,rgba(240,252,255,.84),transparent 25%),
    linear-gradient(115deg,rgba(255,255,255,.38),transparent 23%,rgba(255,255,255,.16) 45%,transparent 64%),
    linear-gradient(180deg,#daf4ff 0%,#65aee6 48%,#243f70 100%);
  border-color:#123862;
  box-shadow:0 22px 34px rgba(0,0,0,.36),0 0 50px rgba(81,177,255,.34),inset 0 0 0 2px rgba(255,255,255,.23);
}
.chest-card-experiment .chest-reveal-epic{
  background:
    radial-gradient(circle at 50% 12%,rgba(255,235,255,.84),transparent 25%),
    linear-gradient(115deg,rgba(255,255,255,.38),transparent 23%,rgba(255,255,255,.17) 45%,transparent 64%),
    linear-gradient(180deg,#f7d1ff 0%,#ba4ae4 48%,#431565 100%);
  border-color:#4c196a;
  box-shadow:0 22px 34px rgba(0,0,0,.36),0 0 52px rgba(210,81,255,.39),inset 0 0 0 2px rgba(255,255,255,.23);
}
.chest-card-experiment .chest-reveal-mythic{
  background:
    radial-gradient(circle at 50% 12%,rgba(255,255,216,.9),transparent 26%),
    linear-gradient(115deg,rgba(255,255,255,.42),transparent 23%,rgba(255,227,116,.24) 45%,transparent 66%),
    linear-gradient(180deg,#fff09e 0%,#f14f35 45%,#65123b 100%);
  border-color:#651b0f;
  box-shadow:0 24px 38px rgba(0,0,0,.4),0 0 58px rgba(255,86,68,.44),0 0 82px rgba(255,216,91,.28),inset 0 0 0 2px rgba(255,255,255,.3);
}
.chest-card-experiment .chest-card-loot-list:not([hidden]){
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:8px;
  width:min(780px,100%);
  max-height:210px;
  overflow:auto;
  margin:10px auto 4px;
  padding:10px;
  border-radius:20px;
  background:rgba(23,8,17,.38);
  border:1px solid rgba(255,229,161,.2);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
}
.chest-loot-header{
  grid-column:1/-1;
  color:#ffe29a;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:1000;
  opacity:.9;
}
.chest-card-experiment .chest-card-loot-row{
  animation:lootRowAdd .26s ease-out both;
  background:rgba(255,248,218,.12)!important;
  border:1px solid rgba(255,238,178,.18)!important;
  color:#fff3cf!important;
}
.chest-card-experiment .chest-card-loot-row img{image-rendering:pixelated;}
.chest-card-experiment .chest-card-flash{
  position:absolute;
  inset:50% auto auto 50%;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff5a8;
  transform:translate(-50%,-50%);
  pointer-events:none;
  animation:chestCardFlash .76s ease-out forwards;
  z-index:-1;
}
.chest-card-experiment .chest-card-flash-rare{background:#a9ddff;}
.chest-card-experiment .chest-card-flash-epic{background:#e4a8ff;}
.chest-card-experiment .chest-card-flash-mythic{background:#ffe267;}
.chest-card-experiment.rapid-opening .chest-reveal-card{
  animation-duration:.22s;
}
.chest-card-experiment.card-reveal-complete .chest-reveal-card{
  filter:saturate(1.08) brightness(1.05);
}
@keyframes chestAnticipation{
  0%,100%{transform:translateY(0) rotate(0deg)}
  30%{transform:translateY(-4px) rotate(-1.5deg)}
  60%{transform:translateY(2px) rotate(1.5deg)}
}
@keyframes chestCardDeal{
  from{opacity:0;transform:translateY(44px) scale(.72) rotate(-7deg);filter:brightness(1.25)}
  62%{opacity:1;transform:translateY(-8px) scale(1.06) rotate(2deg);filter:brightness(1.1)}
  to{opacity:1;transform:translateY(0) scale(1) rotate(0deg);filter:brightness(1)}
}
@media(max-width:720px){
  .chest-card-experiment{
    min-height:88vh;
    padding:24px 16px!important;
  }
  .chest-card-experiment h2{font-size:34px;}
  .chest-card-experiment .chest-card-stage{min-height:300px;}
  .chest-card-experiment .big-chest-button{width:200px;min-height:200px;}
  .chest-card-experiment .big-chest-button img{width:108px;height:108px;}
  .chest-card-experiment .chest-card-reveal-zone:not([hidden]){width:min(255px,84vw);min-height:330px;}
  .chest-card-experiment .chest-reveal-card{width:min(235px,82vw);min-height:318px;}
  .chest-card-experiment .chest-card-actions .btn-small{min-width:155px;}
  .chest-card-experiment .chest-card-loot-list:not([hidden]){grid-template-columns:1fr;max-height:170px;}
}
.chest-panel:not(.chest-card-experiment) .chest-card-stage{display:contents;}
.chest-panel:not(.chest-card-experiment) .chest-card-reveal-zone,
.chest-panel:not(.chest-card-experiment) .chest-card-actions{display:none!important;}


/* v43.19: map texture, chest readability, safer scrolling, mobile bundle fit, tutorial polish. */
body.mature-terrain-enabled{
  background:#130514;
}
body.mature-terrain-enabled #world-game canvas{
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.82)) contrast(var(--terrain-contrast,1.08)) hue-rotate(var(--terrain-hue,-8deg));
}
body.mature-terrain-enabled .kingdom-map{
  position:relative;
  background-color:#1d3a24!important;
  background-image:
    linear-gradient(180deg,rgba(18,22,18,.18),rgba(12,8,14,.28)),
    url('/static/game/img/ui/grass_texture_64.png')!important;
  background-repeat:repeat!important;
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.82)) contrast(var(--terrain-contrast,1.08)) hue-rotate(var(--terrain-hue,-8deg));
}
body.mature-terrain-enabled .kingdom-map:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(circle at 28% 18%,rgba(255,224,132,.10),transparent 24%),radial-gradient(circle at 80% 80%,rgba(3,0,14,.22),transparent 36%),linear-gradient(180deg,rgba(6,0,12,.06),rgba(6,0,10,.16));
  mix-blend-mode:multiply;
  z-index:1;
}
.kingdom-map .building-node,.kingdom-path{z-index:2;}
.world-wrap.popup-locked #world-game{cursor:not-allowed;}
.daily-chest-modal{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
.daily-chest-modal .chest-panel,
.reward-chest-modal .reward-chest-panel{
  max-height:calc(100vh - 28px)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}
.chest-card-experiment .chest-card-loot-list:not([hidden]),
.daily-reward-list.chest-card-loot-list:not([hidden]){
  max-height:min(34vh,310px)!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
  padding-right:8px;
}
.chest-card-experiment.reward-tier-1{background:linear-gradient(135deg,#3f1435 0%,#7b2146 55%,#c98524 100%)!important;}
.chest-card-experiment.reward-tier-2{background:linear-gradient(135deg,#35144a 0%,#8a2f62 55%,#d38d27 100%)!important;}
.chest-card-experiment.reward-tier-3{background:linear-gradient(135deg,#162e44 0%,#6b2f74 48%,#d78d2e 100%)!important;}
.chest-card-experiment.reward-tier-4{background:linear-gradient(135deg,#171735 0%,#6d194d 46%,#d58e24 100%)!important;}
.chest-card-experiment.reward-tier-5,
.chest-card-experiment.reward-kind-weekly,
.chest-card-experiment.reward-kind-milestone{background:linear-gradient(135deg,#160b28 0%,#6b103e 44%,#c36c1d 74%,#f0aa28 100%)!important;}
.chest-card-experiment h2,
.chest-card-experiment .muted,
.chest-card-experiment .daily-reward-text,
.chest-card-experiment .chest-card-intro{color:#fff3c8!important;text-shadow:0 2px 0 rgba(0,0,0,.42);}
.chest-card-experiment .chest-reveal-card{color:#fff8dc!important;}
.chest-card-experiment .chest-reveal-card b,
.chest-card-experiment .chest-reveal-card strong,
.chest-card-experiment .chest-reveal-card small{color:#fff8dc!important;text-shadow:0 3px 0 rgba(0,0,0,.38);}
.chest-card-experiment .chest-reveal-common{background:linear-gradient(180deg,#fff2bc,#c98832 58%,#5a2634)!important;}
.chest-card-experiment .chest-reveal-rare{background:linear-gradient(180deg,#d9f4ff,#5f99d4 56%,#1b355f)!important;}
.chest-card-experiment .chest-reveal-epic{background:linear-gradient(180deg,#f6d8ff,#b65def 55%,#49146a)!important;}
.chest-card-experiment .chest-reveal-mythic{background:radial-gradient(circle at 50% 18%,#fff6b3,transparent 28%),linear-gradient(180deg,#ffe799,#e2393e 50%,#4c1138)!important;}
.chest-screen-particle{opacity:.82!important;}
@media(max-width:760px){
  .starter-deal-banner{grid-template-columns:1fr!important;gap:14px!important;padding:22px!important;}
  .starter-deal-copy h2{font-size:clamp(34px,11vw,62px)!important;}
  .starter-bundle-showcase{min-height:300px!important;margin:4px 0 0;}
  .starter-bundle-cards-focused .bundle-card-household{left:12%!important;bottom:14%!important;transform:rotate(-5deg) scale(.88)!important;}
  .starter-bundle-cards-focused .bundle-card-grail{right:12%!important;bottom:14%!important;transform:rotate(5deg) scale(.88)!important;}
  .week-bundle-chest{transform:translateY(22px) scale(.86)!important;}
  .starter-deal-rewards{margin-top:4px!important;}
}
.tutorial-overlay{position:fixed;inset:0;z-index:10050;display:grid;place-items:end center;padding:20px;background:linear-gradient(180deg,rgba(8,3,10,.12),rgba(8,3,10,.54));pointer-events:auto;}
.tutorial-card{max-width:min(620px,calc(100vw - 28px));padding:24px;border-radius:28px;background:linear-gradient(135deg,#491436,#952349 52%,#e0972e);border:3px solid rgba(255,218,119,.55);color:#fff4cf;box-shadow:0 26px 60px rgba(0,0,0,.38);}
.tutorial-card h2{margin:0 0 8px;font-family:Georgia,serif;text-transform:uppercase;letter-spacing:.04em;text-shadow:0 3px 0 rgba(0,0,0,.35);}
.tutorial-kicker{font-weight:1000;text-transform:uppercase;letter-spacing:.16em;color:#ffd96f;font-size:12px;}
.tutorial-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:16px;}
.tutorial-highlight{position:relative!important;z-index:10051!important;box-shadow:0 0 0 4px rgba(202,22,48,.88),0 0 30px rgba(255,39,72,.62)!important;animation:tutorialPulse 1.4s ease-in-out infinite;}
@keyframes tutorialPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.18)}}


/* v43.19b: chest/action rail overflow safety. */
.home-overlay-actions{
  max-height:calc(100vh - 150px);
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:6px;
}
.home-overlay-actions::-webkit-scrollbar,
.chest-card-loot-list::-webkit-scrollbar{width:8px;height:8px;}
.home-overlay-actions::-webkit-scrollbar-thumb,
.chest-card-loot-list::-webkit-scrollbar-thumb{background:rgba(255,213,104,.42);border-radius:999px;}


/* v43.20: Guided, click-through tutorial coach. */
.tutorial-overlay.guided-tutorial{
  position:fixed;
  inset:0;
  z-index:10050;
  display:block;
  padding:0;
  background:transparent;
  pointer-events:none;
}
.tutorial-overlay.guided-tutorial[hidden]{display:none!important;}
.guided-tutorial .tutorial-card{
  position:fixed;
  left:50%;
  bottom:calc(86px + env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);
  width:min(560px,calc(100vw - 28px));
  max-height:min(34vh,280px);
  overflow:auto;
  pointer-events:auto;
  padding:18px 20px;
  border-radius:24px;
  background:
    radial-gradient(circle at 88% 8%,rgba(255,232,132,.26),transparent 28%),
    linear-gradient(135deg,#40102d,#8e2448 52%,#db8f2b);
  border:3px solid rgba(255,218,119,.62);
  color:#fff4cf;
  box-shadow:0 20px 46px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,255,255,.10);
}
.guided-tutorial .tutorial-card.is-top{
  top:calc(78px + env(safe-area-inset-top,0px));
  bottom:auto;
}
.guided-tutorial .tutorial-card.is-left{
  left:22px;
  right:auto;
  transform:none;
  bottom:calc(86px + env(safe-area-inset-bottom,0px));
}
.guided-tutorial .tutorial-card h2{font-size:clamp(20px,3.4vw,30px);line-height:1.05;margin-bottom:6px;}
.guided-tutorial .tutorial-card p{margin:6px 0;color:#ffefc8;font-weight:800;}
.tutorial-hint{font-size:14px;color:#ffe27d!important;}
.guided-tutorial .tutorial-actions{margin-top:12px;display:flex;justify-content:flex-end;gap:8px;}
.tutorial-highlight{
  position:relative!important;
  z-index:10060!important;
  outline:4px solid rgba(220,18,50,.92)!important;
  outline-offset:5px!important;
  box-shadow:0 0 0 8px rgba(220,18,50,.20),0 0 36px rgba(255,47,86,.72)!important;
  animation:tutorialPulse 1.2s ease-in-out infinite!important;
}
.tutorial-highlight:after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:inherit;
  border:2px dashed rgba(255,239,150,.85);
  pointer-events:none;
}
@media(max-width:760px){
  .guided-tutorial .tutorial-card{
    width:calc(100vw - 18px);
    max-height:27vh;
    padding:14px 15px;
    border-radius:20px;
    bottom:calc(76px + env(safe-area-inset-bottom,0px));
  }
  .guided-tutorial .tutorial-card.is-top{top:calc(64px + env(safe-area-inset-top,0px));}
  .guided-tutorial .tutorial-card h2{font-size:21px;}
  .guided-tutorial .tutorial-card p{font-size:14px;line-height:1.25;}
  .tutorial-hint{font-size:12px!important;}
  .guided-tutorial .tutorial-actions .btn-small{padding:8px 10px;font-size:13px;}
}


/* v43.24: textured world map, chest viewport polish, store/home UI pass. */

/* World map texture via CSS, with Phaser canvas kept transparent in terrain mode. */
body.mature-terrain-enabled .modern-world-wrap,
body.mature-terrain-enabled #world-game{
  background-color:#1f432b!important;
  background-image:
    radial-gradient(circle at 22% 18%,rgba(220,178,88,.08),transparent 24%),
    radial-gradient(circle at 78% 82%,rgba(0,0,0,.24),transparent 38%),
    linear-gradient(180deg,rgba(6,0,14,.18),rgba(8,0,10,.34)),
    url('/static/game/img/ui/grass_texture_64.png')!important;
  background-repeat:no-repeat,no-repeat,no-repeat,repeat!important;
  background-size:auto,auto,auto,64px 64px!important;
}
body.mature-terrain-enabled #world-game canvas{
  background:transparent!important;
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.86)) contrast(var(--terrain-contrast,1.1)) hue-rotate(var(--terrain-hue,-8deg));
}

/* Chest modals: no off-screen top overflow, no horizontal scroll, clean mobile fit. */
.daily-chest-modal,
.reward-chest-modal{
  align-items:center!important;
  justify-items:center!important;
  padding:clamp(8px,2vw,18px)!important;
  overflow:hidden!important;
}
.daily-chest-modal.active,
.reward-chest-modal.active{
  display:grid!important;
}
.daily-chest-modal .chest-panel,
.reward-chest-modal .reward-chest-panel{
  width:min(760px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
  margin:0 auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  box-sizing:border-box;
  scrollbar-width:thin;
}
.chest-card-experiment{
  min-height:0!important;
  padding:clamp(18px,3vw,30px)!important;
}
.chest-card-experiment h2{
  font-size:clamp(34px,8vw,72px)!important;
  line-height:.88!important;
  margin-top:6px!important;
}
.chest-card-experiment .chest-card-intro{
  font-size:clamp(15px,2.8vw,22px)!important;
  line-height:1.15!important;
  margin-bottom:4px!important;
}
.chest-card-experiment .chest-card-stage{
  min-height:clamp(250px,38vh,330px)!important;
  margin:6px auto!important;
}
.chest-card-experiment .chest-card-reveal-zone:not([hidden]){
  width:min(285px,74vw)!important;
  min-height:clamp(288px,40vh,352px)!important;
}
.chest-card-experiment .chest-reveal-card{
  width:min(252px,72vw)!important;
  min-height:clamp(300px,39vh,342px)!important;
}
.chest-card-experiment .chest-card-loot-list:not([hidden]){
  max-height:min(28vh,230px)!important;
  overflow-y:auto!important;
}
.chest-card-experiment .chest-card-actions:not([hidden]){
  margin-top:2px!important;
}
.chest-card-experiment .event-close.daily-close{
  margin-top:10px!important;
}
@media(max-width:760px){
  .daily-chest-modal,
  .reward-chest-modal{
    padding:8px!important;
    align-items:stretch!important;
  }
  .daily-chest-modal .chest-panel,
  .reward-chest-modal .reward-chest-panel{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:26px!important;
  }
  .chest-card-experiment h2{
    font-size:clamp(38px,15vw,56px)!important;
  }
  .chest-card-experiment .chest-card-stage{
    min-height:285px!important;
  }
  .chest-card-experiment .chest-card-actions .btn-small{
    width:100%;
    min-width:0!important;
  }
  .chest-card-experiment .chest-card-loot-list:not([hidden]){
    max-height:24vh!important;
  }
}

/* Chest home buttons by tier/rarity, so the rail is not all yellow. */
.round-action.chest-tier-1{background:linear-gradient(180deg,#fff1a5,#e8a61f)!important;}
.round-action.chest-tier-2{background:linear-gradient(180deg,#dff3ff,#54a5dd)!important;border-color:#286a9b!important;}
.round-action.chest-tier-3{background:linear-gradient(180deg,#efe4ff,#9a65da)!important;border-color:#6734a5!important;color:#221033!important;}
.round-action.chest-tier-4{background:linear-gradient(180deg,#ffe3fa,#d9519d 58%,#823278)!important;border-color:#a2387e!important;color:#fff7e8!important;}
.round-action.chest-tier-5{background:linear-gradient(180deg,#fff2a3,#ee5b37 48%,#65123b)!important;border-color:#e0b24c!important;color:#fff8db!important;box-shadow:0 12px 22px rgba(0,0,0,.25),0 0 22px rgba(255,94,65,.25),inset 0 -6px rgba(126,68,8,.24)!important;}
.reward-chest-trigger[data-kind="weekly"],
.reward-chest-trigger[data-kind="milestone"]{
  box-shadow:0 12px 22px rgba(0,0,0,.25),0 0 30px rgba(213,91,255,.28),inset 0 -6px rgba(126,68,8,.24)!important;
}

/* More deliberate chest palette by tier: readable text, stronger identity. */
.reward-chest-panel.reward-tier-1,
.chest-card-experiment.reward-tier-1{
  border-color:#a86525!important;
  background:linear-gradient(135deg,#3b1724 0%,#7a2340 48%,#c47425 100%)!important;
}
.reward-chest-panel.reward-tier-2,
.chest-card-experiment.reward-tier-2{
  border-color:#3f86b8!important;
  background:linear-gradient(135deg,#17233f 0%,#23578a 50%,#6bb6e9 100%)!important;
}
.reward-chest-panel.reward-tier-3,
.chest-card-experiment.reward-tier-3{
  border-color:#8858d8!important;
  background:linear-gradient(135deg,#21123f 0%,#67318f 52%,#d076e9 100%)!important;
}
.reward-chest-panel.reward-tier-4,
.chest-card-experiment.reward-tier-4{
  border-color:#b65adf!important;
  background:linear-gradient(135deg,#230833 0%,#7e1e67 48%,#d55d73 100%)!important;
}
.reward-chest-panel.reward-tier-5,
.chest-card-experiment.reward-tier-5{
  border-color:#f0c963!important;
  background:linear-gradient(135deg,#17061f 0%,#65123b 42%,#d04c3b 72%,#e2a733 100%)!important;
}
.chest-card-experiment.reward-tier-2 .chest-card-intro,
.chest-card-experiment.reward-tier-2 .daily-reward-text,
.chest-card-experiment.reward-tier-3 .chest-card-intro,
.chest-card-experiment.reward-tier-3 .daily-reward-text{
  color:#fff4cf!important;
  text-shadow:0 2px 0 rgba(0,0,0,.45);
}

/* Store layout polish. If the offer count is odd, the last card (usually rarest) spans. */
.offer-grid.premium-offers > .offer-card:last-child:nth-child(odd){
  grid-column:1 / -1;
}
.offer-grid.premium-offers > .offer-card:last-child:nth-child(odd) .offer-art img{
  width:110px;
  height:110px;
}
.offer-grid.premium-offers > .offer-card:last-child:nth-child(odd){
  min-height:250px;
}
.starter-deal-banner{
  border-radius:34px!important;
}
.starter-reward-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.starter-reward-chip span{
  overflow-wrap:anywhere;
}
@media(min-width:860px){
  .starter-reward-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:760px){
  .starter-deal-banner{
    overflow:hidden!important;
  }
  .starter-deal-center{
    min-height:280px!important;
  }
  .starter-bundle-cards-focused .bundle-card-household{
    left:8%!important;
    bottom:20px!important;
    transform:rotate(-4deg) scale(.88)!important;
  }
  .starter-bundle-cards-focused .bundle-card-grail{
    right:8%!important;
    bottom:20px!important;
    transform:rotate(4deg) scale(.88)!important;
  }
  .week-bundle-chest{
    transform:translateY(-4px) scale(.86)!important;
  }
  .starter-reward-grid{
    grid-template-columns:1fr!important;
  }
  .starter-price-row{
    flex-wrap:wrap;
    gap:12px;
  }
}

/* Mobile home map: reduce accidental taps by separating buildings and enlarging safe click targets. */
@media(max-width:760px){
  .home-full-town{
    min-height:760px!important;
  }
  .home-full-town .building-node{
    min-width:118px;
    min-height:118px;
    display:grid;
    place-items:center;
    touch-action:manipulation;
  }
  .home-full-town .building-node img{
    max-width:112px!important;
    max-height:112px!important;
  }
  .home-full-town .node-lumberyard{left:42%!important;top:21%!important;}
  .home-full-town .node-mine{left:77%!important;top:31%!important;}
  .home-full-town .node-keep{left:52%!important;top:36%!important;}
  .home-full-town .node-barracks{left:25%!important;top:49%!important;}
  .home-full-town .node-farmstead{left:66%!important;top:63%!important;}
  .home-full-town .node-storehouse{left:30%!important;top:68%!important;}
  .home-full-town .node-walls{left:53%!important;top:84%!important;}
  .home-full-town .building-node .label{
    font-size:18px!important;
    padding:5px 12px!important;
  }
}

/* General professional UI pass: cleaner panels/forms/lists without changing layout logic. */
.panel,
.clean-card,
.glass-panel,
.compact-panel,
.list-row,
.member-card,
.worker-dismiss-card,
.recruit-preview-card,
.queue-card{
  border-radius:24px;
  box-shadow:0 16px 34px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.08);
}
.panel.hero,
.clean-hero,
.compact-hero{
  background:
    radial-gradient(circle at 86% 10%,rgba(255,224,120,.22),transparent 28%),
    linear-gradient(135deg,rgba(255,248,223,.96),rgba(239,203,124,.92))!important;
  border:3px solid rgba(126,73,28,.36)!important;
}
.section-head h2,
.clean-hero h1,
.panel.hero h1{
  text-shadow:0 2px 0 rgba(255,255,255,.35);
}
.form-warning{
  border-radius:14px;
}
input,select,textarea{
  box-shadow:inset 0 2px 0 rgba(0,0,0,.05);
}
.btn,.btn-small,.buy-button{
  transition:transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.btn:hover,.btn-small:hover,.buy-button:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
}


/* v43.24: mobile chest fullscreen polish + animated chrome collapse */
body.chest-modal-open{
  overflow:hidden;
}
body.chest-modal-open .top-shell{
  transform:translateY(calc(-100% - 12px));
  opacity:.08;
  pointer-events:none;
}
body.chest-modal-open .bottom-nav{
  transform:translateY(calc(100% + 18px));
  opacity:.08;
  pointer-events:none;
}
.top-shell,.bottom-nav{
  transition:transform .34s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.daily-chest-modal.active,
.reward-chest-modal.active{
  position:fixed!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  width:100vw!important;
  height:100dvh!important;
  padding:clamp(8px,2vw,22px)!important;
  overflow:hidden!important;
  overscroll-behavior:contain;
}
.daily-chest-modal.active .chest-panel,
.reward-chest-modal.active .reward-chest-panel{
  width:min(760px,calc(100vw - 18px))!important;
  max-width:calc(100vw - 18px)!important;
  max-height:calc(100dvh - 18px)!important;
  margin:0 auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  box-sizing:border-box;
}
.daily-chest-modal.active .chest-panel::-webkit-scrollbar,
.reward-chest-modal.active .reward-chest-panel::-webkit-scrollbar{width:8px;height:0}
.daily-chest-modal.active .chest-panel::-webkit-scrollbar-thumb,
.reward-chest-modal.active .reward-chest-panel::-webkit-scrollbar-thumb{background:rgba(255,221,124,.42);border-radius:999px}
.chest-card-experiment .chest-card-stage{
  min-width:0;
}
.chest-card-experiment .chest-reveal-card{
  max-width:100%;
}
@media(max-width:760px){
  .daily-chest-modal.active,
  .reward-chest-modal.active{
    padding:6px!important;
    place-items:stretch!important;
  }
  .daily-chest-modal.active .chest-panel,
  .reward-chest-modal.active .reward-chest-panel{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    min-height:auto!important;
    max-height:calc(100dvh - 12px)!important;
    border-radius:22px!important;
    padding:18px 14px 22px!important;
  }
  .chest-card-experiment .chest-panel h2,
  .chest-card-experiment h2{
    font-size:clamp(34px,13vw,62px)!important;
    line-height:.92!important;
    word-break:normal;
  }
  .chest-card-experiment .chest-card-intro{
    max-width:92%;
    margin-inline:auto;
    font-size:15px!important;
    line-height:1.2!important;
  }
  .chest-card-experiment .big-chest-button{
    width:min(260px,76vw)!important;
    min-height:240px!important;
    padding:22px!important;
  }
  .chest-card-experiment .big-chest-button img{
    width:118px!important;
    height:118px!important;
  }
  .chest-card-experiment .chest-reveal-card{
    width:min(285px,82vw)!important;
    min-height:390px!important;
  }
  .chest-card-experiment .chest-reveal-card strong{
    font-size:clamp(44px,14vw,68px)!important;
  }
  .chest-card-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    width:min(310px,86vw);
    margin-inline:auto;
  }
  .chest-card-actions[hidden]{display:none!important;}
  .chest-card-actions .btn-small{
    width:100%;
    min-width:0!important;
  }
  .chest-card-loot-list:not([hidden]){
    width:100%!important;
    max-width:100%!important;
    max-height:30dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  .chest-card-loot-row{
    grid-template-columns:34px minmax(0,1fr) auto!important;
    gap:10px!important;
  }
  .chest-card-loot-row span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}


/* v43.25: world map CSS grass texture that pans/zooms without breaking Phaser objects */
.textured-world-map{
  position:relative;
  overflow:hidden;
  background-color:#17311f;
}
.textured-world-map:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:
    linear-gradient(180deg,rgba(9,8,11,.18),rgba(8,0,10,.28)),
    var(--world-grass-texture);
  background-size:auto, var(--world-grass-size,64px) var(--world-grass-size,64px);
  background-position:center, var(--world-grass-x,0px) var(--world-grass-y,0px);
  background-repeat:repeat, repeat;
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.82)) contrast(var(--terrain-contrast,1.08)) hue-rotate(var(--terrain-hue,-8deg));
}
.textured-world-map #world-game,
.textured-world-map .world-hud,
.textured-world-map .world-controls,
.textured-world-map .minimap-panel,
.textured-world-map .map-side-controls,
.textured-world-map .event-modal{
  position:relative;
  z-index:1;
}
.textured-world-map #world-game canvas{
  background:transparent!important;
}


/* v43.26: store grid odd-card width + mobile home hit-target spacing */
.offer-grid .offer-card:last-child:nth-child(odd),
.rotating-deals-grid .offer-card:last-child:nth-child(odd),
.shop-offer-grid .offer-card:last-child:nth-child(odd){
  grid-column:1 / -1;
}
@media(max-width:760px){
  .home-full-town{
    min-height:760px!important;
    transform-origin:top center;
  }
  .home-full-town .building-node{
    min-width:92px;
    min-height:82px;
    padding:10px;
    border-radius:22px;
  }
  .home-full-town .building-node .label{
    font-size:18px;
    white-space:nowrap;
  }
  .home-full-town .node-lumberyard{left:38%!important;top:10%!important;}
  .home-full-town .node-mine{left:68%!important;top:20%!important;}
  .home-full-town .node-barracks{left:16%!important;top:38%!important;}
  .home-full-town .node-keep{left:47%!important;top:31%!important;}
  .home-full-town .node-storehouse{left:54%!important;top:53%!important;}
  .home-full-town .node-farmstead{left:28%!important;top:58%!important;}
  .home-full-town .node-walls{left:44%!important;top:76%!important;}
}


/* v43.27: world map terrain matches the darker/desaturated home-map treatment.
   The texture remains CSS-backed so Phaser objects keep rendering safely. */
body.mature-terrain-enabled .textured-world-map{
  background-color:#1d3a24!important;
}
body.mature-terrain-enabled .textured-world-map:before{
  background-image:
    linear-gradient(180deg,rgba(18,22,18,.18),rgba(12,8,14,.28)),
    var(--world-grass-texture)!important;
  background-size:auto, var(--world-grass-size,64px) var(--world-grass-size,64px)!important;
  background-position:center, var(--world-grass-x,0px) var(--world-grass-y,0px)!important;
  background-repeat:repeat,repeat!important;
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.82)) contrast(var(--terrain-contrast,1.08)) hue-rotate(var(--terrain-hue,-8deg));
  opacity:1;
}
body.mature-terrain-enabled .textured-world-map:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(circle at 28% 18%,rgba(255,224,132,.10),transparent 24%),
    radial-gradient(circle at 80% 80%,rgba(3,0,14,.22),transparent 36%),
    linear-gradient(180deg,rgba(6,0,12,.06),rgba(6,0,10,.16));
  mix-blend-mode:multiply;
}
body.mature-terrain-enabled .textured-world-map #world-game,
body.mature-terrain-enabled .textured-world-map .world-hud,
body.mature-terrain-enabled .textured-world-map .world-controls,
body.mature-terrain-enabled .textured-world-map .minimap-panel,
body.mature-terrain-enabled .textured-world-map .map-side-controls{
  position:relative;
  z-index:1;
}


/* v43.30: mature terrain treatment for world + battle replay. */
body.mature-terrain-enabled #battle-game canvas,
body.mature-terrain-enabled .battle-canvas canvas{
  filter:saturate(var(--terrain-saturation,.78)) brightness(var(--terrain-brightness,.82)) contrast(var(--terrain-contrast,1.08)) hue-rotate(var(--terrain-hue,-8deg));
}
body.mature-terrain-enabled .battle-stage{
  background:#130514;
}


/* v43.31: world map full-width layout + reliable full-camera terrain coverage */
body[data-page="world"] .app-main{
  max-width:none!important;
  width:100vw!important;
  margin:0!important;
  padding:0 0 calc(78px + env(safe-area-inset-bottom))!important;
}
body[data-page="world"] .world-wrap{
  width:100vw!important;
  max-width:none!important;
  height:calc(100dvh - 148px)!important;
  min-height:640px!important;
  margin:0!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
}
body[data-page="world"] #world-game{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
}
body.mature-terrain-enabled .textured-world-map:before{
  display:none!important;
}
body.mature-terrain-enabled .modern-world-wrap,
body.mature-terrain-enabled #world-game{
  background-image:none!important;
  background-color:#1d3a24!important;
}
body.mature-terrain-enabled #world-game canvas{
  background:transparent!important;
}
@media(max-width:760px){
  body[data-page="world"] .world-wrap{
    height:calc(100dvh - 128px)!important;
    min-height:520px!important;
  }
}


/* v43.32: premium world select UX */
.world-select-body{
  min-height:100dvh;
  background:
    radial-gradient(circle at 16% 12%,rgba(255,206,99,.14),transparent 22%),
    radial-gradient(circle at 84% 78%,rgba(124,41,99,.20),transparent 32%),
    linear-gradient(180deg,#36001b,#17000c 68%,#090006)!important;
  color:#2c1207;
}
.world-select-page{
  width:min(1240px,calc(100vw - 32px));
  margin:0 auto;
  padding:clamp(22px,4vw,58px) 0 calc(96px + env(safe-area-inset-bottom));
}
.world-select-hero{
  position:relative;
  overflow:hidden;
  border-radius:34px;
  padding:clamp(28px,5vw,54px);
  border:4px solid rgba(111,55,23,.72);
  background:
    radial-gradient(circle at 86% 18%,rgba(255,255,255,.38),transparent 18%),
    linear-gradient(135deg,#fff4cf 0%,#f8d773 58%,#d89a29 100%);
  box-shadow:0 18px 0 rgba(59,20,11,.55),0 34px 70px rgba(0,0,0,.34),inset 0 2px rgba(255,255,255,.55);
}
.world-select-hero:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.24),transparent 20%,transparent 76%,rgba(255,255,255,.18));
}
.world-select-kicker,.world-code{
  letter-spacing:.28em;
  text-transform:uppercase;
  color:#a91847;
  font-weight:1000;
}
.world-select-hero h1{
  margin:8px 0 10px;
  font-size:clamp(46px,8vw,112px);
  line-height:.86;
  color:#251006;
  text-shadow:0 3px rgba(255,255,255,.38);
}
.world-select-hero p{
  margin:0;
  max-width:850px;
  color:#6d421f;
  font-size:clamp(17px,2vw,22px);
  font-weight:800;
}
.world-current-strip{
  margin-top:24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:16px 18px;
  border-radius:24px;
  background:rgba(255,255,255,.34);
  border:2px solid rgba(118,66,20,.18);
  box-shadow:inset 0 -3px rgba(127,72,20,.08);
}
.world-current-strip .eyebrow{margin-bottom:4px}
.world-current-strip strong{display:block;font-size:22px;color:#301306}
.world-current-strip span{display:block;margin-top:3px;color:#744b28;font-weight:900}

.world-select-board{
  margin-top:28px;
  border-radius:34px;
  padding:clamp(18px,3vw,30px);
  border:5px solid rgba(116,55,21,.82);
  background:linear-gradient(180deg,rgba(255,248,223,.98),rgba(244,214,145,.96));
  box-shadow:0 18px 0 rgba(61,22,10,.58),0 34px 70px rgba(0,0,0,.28),inset 0 2px rgba(255,255,255,.55);
}
.world-board-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:end;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.world-board-head h2{
  margin:4px 0 0;
  font-size:clamp(28px,4vw,48px);
  line-height:.95;
}
.world-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:18px;
}
.world-choice-card{
  position:relative;
  overflow:hidden;
  display:grid;
  gap:16px;
  min-height:360px;
  padding:24px;
  border-radius:30px;
  border:3px solid rgba(145,91,33,.36);
  background:
    radial-gradient(circle at 85% 8%,rgba(255,221,126,.34),transparent 22%),
    linear-gradient(180deg,#fff6cf,#ebc66f);
  box-shadow:0 16px 30px rgba(66,32,12,.18),inset 0 2px rgba(255,255,255,.48);
}
.world-choice-card.current{
  border-color:#7e4d1f;
  box-shadow:0 18px 38px rgba(88,56,18,.20),0 0 0 5px rgba(126,77,31,.10),inset 0 2px rgba(255,255,255,.55);
}
.world-choice-card.recommended{
  border-color:#b32758;
  box-shadow:0 18px 38px rgba(84,19,50,.28),0 0 0 5px rgba(179,39,88,.10),inset 0 2px rgba(255,255,255,.55);
}
.world-choice-card.full{
  filter:saturate(.82);
  opacity:.86;
}
.world-choice-top{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:start;
}
.world-choice-top h3{
  margin:8px 0 0;
  font-size:clamp(30px,4vw,48px);
  line-height:.94;
  color:#241005;
}
.world-reco{
  white-space:nowrap;
  padding:9px 12px;
  border-radius:999px;
  background:linear-gradient(180deg,#ffed9d,#e39b17);
  border:2px solid rgba(105,55,13,.46);
  color:#301305;
  font-weight:1000;
  box-shadow:0 5px 0 rgba(88,46,12,.28);
}
.world-state-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.world-state-pill,.world-age-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 11px;
  border-radius:999px;
  border:1px solid rgba(112,63,21,.24);
  background:rgba(255,255,255,.45);
  color:#623714;
  font-weight:1000;
}
.world-state-pill.war,.world-state-pill.challenged{
  color:#fff8d8;
  background:linear-gradient(180deg,#9f2140,#571125);
  border-color:rgba(255,221,146,.32);
}
.world-state-pill.full{
  color:#fff8d8;
  background:linear-gradient(180deg,#5c5964,#2e2a34);
}
.world-population-card{
  padding:16px;
  border-radius:24px;
  border:2px solid rgba(121,67,20,.20);
  background:rgba(255,255,255,.42);
}
.world-population-card.founding{
  background:linear-gradient(180deg,rgba(255,248,221,.64),rgba(255,228,151,.42));
}
.world-population-card.growing{
  background:linear-gradient(180deg,rgba(225,255,216,.55),rgba(255,238,171,.40));
}
.world-population-card.thriving,.world-population-card.crowded{
  background:linear-gradient(180deg,rgba(220,237,255,.55),rgba(250,218,255,.38));
}
.world-pop-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
}
.world-pop-head b{font-size:22px;color:#2b1206}
.world-pop-head small{font-weight:1000;color:#7f5630}
.world-population-card p{
  margin:5px 0 12px;
  color:#76502b;
  font-weight:900;
}
.world-capacity-meter{
  height:16px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(74,34,14,.14);
  border:1px solid rgba(101,55,16,.20);
}
.world-capacity-meter span{
  display:block;
  height:100%;
  min-width:18px;
  border-radius:999px;
  background:linear-gradient(90deg,#c23358,#f0a51b,#ffe27d);
  box-shadow:0 0 18px rgba(236,166,31,.32);
}
.world-info-list{
  display:grid;
  gap:10px;
}
.world-info-list div{
  display:grid;
  gap:2px;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(255,255,255,.38);
  border:1px solid rgba(126,75,28,.15);
}
.world-info-list b{
  color:#4b230d;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.world-info-list span{
  color:#6c4625;
  font-weight:800;
}
.world-choice-actions{
  display:flex;
  justify-content:flex-end;
  align-items:end;
  margin-top:auto;
}
.world-enter-btn{
  min-width:170px;
  text-align:center;
}
.world-full-button{
  opacity:.72;
}
@media(max-width:760px){
  .world-select-page{width:calc(100vw - 18px);padding-top:16px}
  .world-select-hero,.world-select-board{border-radius:26px}
  .world-current-strip{display:grid}
  .world-card-grid{grid-template-columns:1fr}
  .world-choice-card{padding:18px;min-height:auto}
  .world-choice-top{display:grid}
  .world-choice-actions .btn{width:100%}
}


/* v43.34: mobile keep/home building placement correction.
   Keeps the left-side chest/store/pass rail clear and re-centres the actual
   building cluster in the usable play area. */
@media(max-width:760px){
  .home-full-town{
    min-height:780px!important;
  }
  .home-full-town .building-node{
    min-width:104px!important;
    min-height:96px!important;
    padding:8px!important;
  }
  .home-full-town .building-node img{
    max-width:116px!important;
    max-height:116px!important;
  }
  .home-full-town .node-lumberyard{left:45%!important;top:14%!important;}
  .home-full-town .node-mine{left:75%!important;top:24%!important;}
  .home-full-town .node-keep{left:55%!important;top:35%!important;}
  .home-full-town .node-barracks{left:35%!important;top:47%!important;}
  .home-full-town .node-storehouse{left:63%!important;top:57%!important;}
  .home-full-town .node-farmstead{left:39%!important;top:68%!important;}
  .home-full-town .node-walls{left:55%!important;top:85%!important;}
  .home-full-town .building-node .label{
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
@media(max-width:430px){
  .home-full-town .node-lumberyard{left:48%!important;top:14%!important;}
  .home-full-town .node-mine{left:78%!important;top:24%!important;}
  .home-full-town .node-keep{left:57%!important;top:35%!important;}
  .home-full-town .node-barracks{left:38%!important;top:47%!important;}
  .home-full-town .node-storehouse{left:65%!important;top:57%!important;}
  .home-full-town .node-farmstead{left:41%!important;top:68%!important;}
  .home-full-town .node-walls{left:57%!important;top:85%!important;}
}


/* v43.36: mobile chest action button centering */
@media(max-width:760px){
  .daily-chest-modal.active .chest-card-actions:not([hidden]),
  .reward-chest-modal.active .chest-card-actions:not([hidden]),
  .chest-card-experiment .chest-card-actions:not([hidden]){
    display:grid!important;
    grid-template-columns:minmax(0, min(430px, 86vw))!important;
    justify-content:center!important;
    justify-items:stretch!important;
    align-items:center!important;
    width:100%!important;
    max-width:100%!important;
    margin:14px auto 18px!important;
    padding:0!important;
    gap:10px!important;
    transform:none!important;
    left:auto!important;
    right:auto!important;
  }
  .daily-chest-modal.active .chest-card-actions .btn-small,
  .reward-chest-modal.active .chest-card-actions .btn-small,
  .chest-card-experiment .chest-card-actions .btn-small{
    width:100%!important;
    max-width:430px!important;
    min-width:0!important;
    margin:0 auto!important;
    justify-self:center!important;
    box-sizing:border-box!important;
  }
  .daily-chest-modal.active .daily-reward-text,
  .reward-chest-modal.active .daily-reward-text,
  .chest-card-experiment .daily-reward-text{
    width:min(430px,86vw)!important;
    margin:10px auto 8px!important;
    text-align:center!important;
  }
}


/* v43.43: world-select copy cleanup */
.world-select-hero{
  padding-block:clamp(24px,4vw,42px)!important;
}
.world-select-hero h1{
  margin-bottom:0!important;
}
.world-current-strip{
  margin-top:22px!important;
}
.world-current-strip strong{
  font-size:24px!important;
}
.world-current-strip span:empty,
.world-board-head > p:empty{
  display:none!important;
}
.world-board-head{
  margin-bottom:22px!important;
}
.world-choice-card{
  min-height:0!important;
  gap:14px!important;
}
.world-info-list:empty{
  display:none!important;
}
.world-info-list div{
  padding:12px 14px!important;
}
.world-choice-top h3{
  margin-top:6px!important;
}
@media(max-width:760px){
  .world-select-hero h1{
    font-size:clamp(42px,14vw,78px)!important;
  }
}



/* v43.46: fixed map/replay viewport and in-view popups */
body[data-page="world"],
body[data-page="battle"]{
  height:100dvh!important;
  overflow:hidden!important;
}
body[data-page="world"] .app-main,
body[data-page="battle"] .app-main{
  max-width:none!important;
  width:100vw!important;
  height:calc(100dvh - var(--top-shell-h, 140px) - var(--bottom-nav-h, 96px))!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body[data-page="world"] .world-wrap{
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  border-radius:0!important;
}
body[data-page="world"] .tile-modal.modern-modal{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(var(--bottom-nav-h, 96px) + 12px)!important;
  transform:translateX(-50%)!important;
  width:min(720px, calc(100vw - 24px))!important;
  max-height:calc(100dvh - var(--top-shell-h, 140px) - var(--bottom-nav-h, 96px) - 24px)!important;
  overflow:auto!important;
  z-index:90!important;
}
body[data-page="world"] .army-modal{
  position:fixed!important;
  right:12px!important;
  left:auto!important;
  bottom:calc(var(--bottom-nav-h, 96px) + 12px)!important;
  width:min(360px, calc(100vw - 24px))!important;
  max-height:calc(100dvh - var(--top-shell-h, 140px) - var(--bottom-nav-h, 96px) - 24px)!important;
  overflow:auto!important;
  z-index:92!important;
}
body[data-page="battle"] .battle-stage{
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  border-radius:0!important;
}
body[data-page="battle"] .battle-summary-overlay{
  position:fixed!important;
  left:16px!important;
  right:16px!important;
  bottom:calc(var(--bottom-nav-h, 96px) + 12px)!important;
  max-height:min(42dvh, calc(100dvh - var(--top-shell-h, 0px) - var(--bottom-nav-h, 96px) - 24px))!important;
  overflow:auto!important;
  z-index:95!important;
}
@media(max-width:760px){
  body[data-page="world"] .tile-modal.modern-modal{
    left:8px!important;
    right:8px!important;
    bottom:calc(var(--bottom-nav-h, 118px) + 8px)!important;
    transform:none!important;
    width:auto!important;
    max-height:calc(100dvh - var(--top-shell-h, 260px) - var(--bottom-nav-h, 118px) - 16px)!important;
  }
  body[data-page="world"] .army-modal{
    left:8px!important;
    right:8px!important;
    bottom:calc(var(--bottom-nav-h, 118px) + 8px)!important;
    width:auto!important;
    max-height:calc(100dvh - var(--top-shell-h, 260px) - var(--bottom-nav-h, 118px) - 16px)!important;
  }
  body[data-page="battle"] .battle-summary-overlay{
    left:8px!important;
    right:8px!important;
    bottom:calc(var(--bottom-nav-h, 118px) + 8px)!important;
    max-height:46dvh!important;
  }
}
/* v43.47: compact responsive top HUD */
.compact-top-shell{
  position:sticky!important;
  top:0!important;
  z-index:9000!important;
  padding:7px 10px 8px!important;
  overflow:visible!important;
  border-bottom:2px solid rgba(141,47,63,.55)!important;
  background:linear-gradient(180deg,#440020 0%,#250010 100%)!important;
}
.compact-brand-row{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
}
.compact-top-shell .brand{min-width:max-content!important;margin:0!important;gap:8px!important;}
.compact-top-shell .brand-icon{width:40px!important;height:40px!important;border-radius:13px!important;}
.compact-top-shell .brand-icon img{width:32px!important;height:32px!important;}
.compact-top-shell .brand strong{font-size:20px!important;line-height:1!important;}
.compact-top-shell .brand small{font-size:11px!important;line-height:1!important;}
.desktop-top-pills{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:7px!important;
  overflow:hidden!important;
  min-width:0!important;
  padding:0!important;
}
.desktop-top-pills .top-action,
.desktop-top-pills .era-pill,
.desktop-top-pills .crown-pill{
  min-height:32px!important;
  height:32px!important;
  flex:0 0 auto!important;
  padding:4px 9px!important;
  border-radius:12px!important;
  font-size:12px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.desktop-top-pills .top-icon{width:20px!important;height:20px!important;}
.desktop-top-pills .top-gear{font-size:17px!important;line-height:1!important;}
.desktop-resource-rail{
  display:flex!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  gap:6px!important;
  padding:6px 2px 2px!important;
  margin:0!important;
  scrollbar-width:thin!important;
  justify-content:flex-start!important;
}
.desktop-resource-rail::-webkit-scrollbar{height:5px;}
.desktop-resource-rail::-webkit-scrollbar-thumb{background:rgba(255,220,150,.42);border-radius:999px;}
.desktop-resource-rail .res-chip{
  flex:0 0 auto!important;
  min-width:104px!important;
  height:38px!important;
  min-height:38px!important;
  padding:5px 9px 10px!important;
  border-radius:13px!important;
  gap:5px!important;
}
.desktop-resource-rail .res-icon{width:24px!important;height:24px!important;flex:0 0 24px!important;}
.desktop-resource-rail .res-icon img{width:23px!important;height:23px!important;}
.desktop-resource-rail .res-value{font-size:13px!important;max-width:62px!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.desktop-resource-rail .res-trend{font-size:9px!important;padding:2px 4px!important;}
.mobile-top-controls,.mobile-primary-resources{display:none!important;}
.mobile-hud-panel{display:none;}
@media(max-width:760px){
  .compact-top-shell{
    padding:6px 7px 7px!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .compact-brand-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    align-items:center!important;
  }
  .compact-top-shell .brand{min-width:0!important;gap:6px!important;}
  .compact-top-shell .brand-icon{width:36px!important;height:36px!important;border-width:2px!important;}
  .compact-top-shell .brand-icon img{width:29px!important;height:29px!important;}
  .compact-top-shell .brand strong{font-size:17px!important;}
  .compact-top-shell .brand small{font-size:10px!important;}
  .desktop-top-pills,.desktop-resource-rail{display:none!important;}
  .mobile-top-controls{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    min-width:max-content!important;
  }
  .mobile-icon-action,
  .mobile-hud-menu>summary{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    width:42px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    border-radius:11px!important;
    border:2px solid #8b541d!important;
    background:linear-gradient(#ffe891,#d89419)!important;
    color:#1f0c05!important;
    box-shadow:0 3px 0 #6f421a!important;
    font-weight:1000!important;
    text-decoration:none!important;
    list-style:none!important;
    cursor:pointer!important;
  }
  .mobile-hud-menu>summary::-webkit-details-marker{display:none!important;}
  .mobile-hud-menu>summary b{font-size:10px!important;display:none!important;}
  .mobile-icon-action .top-icon,.mobile-hud-menu .top-icon{width:22px!important;height:22px!important;}
  .mobile-icon-action b{font-size:11px!important;line-height:1!important;}
  .account-hud-menu{position:relative!important;}
  .mobile-hud-menu[open]>summary{filter:brightness(1.06);}
  .account-hud-panel{
    display:grid!important;
    position:absolute!important;
    right:0!important;
    top:calc(100% + 8px)!important;
    width:min(260px,calc(100vw - 14px))!important;
    max-height:65vh!important;
    overflow:auto!important;
    gap:7px!important;
    padding:10px!important;
    border-radius:18px!important;
    border:3px solid #8b541d!important;
    background:linear-gradient(180deg,#fff2ca,#e8b84f)!important;
    box-shadow:0 16px 32px rgba(0,0,0,.36)!important;
  }
  .account-hud-panel a,
  .account-hud-panel button,
  .account-hud-panel .mobile-crowns{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    border:2px solid rgba(120,74,29,.35)!important;
    background:rgba(255,255,255,.42)!important;
    color:#2c1307!important;
    font-weight:1000!important;
    text-decoration:none!important;
    font-size:14px!important;
    box-shadow:none!important;
    width:100%!important;
    text-align:left!important;
  }
  .mobile-primary-resources{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr)) auto!important;
    gap:4px!important;
    align-items:center!important;
    padding-top:6px!important;
    position:relative!important;
  }
  .mobile-primary-resources .res-chip{
    min-width:0!important;
    width:auto!important;
    height:34px!important;
    min-height:34px!important;
    padding:4px 4px 8px!important;
    border-radius:11px!important;
    gap:2px!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  .mobile-primary-resources .res-icon{width:21px!important;height:21px!important;flex:0 0 21px!important;}
  .mobile-primary-resources .res-icon img{width:20px!important;height:20px!important;}
  .mobile-primary-resources .res-value{font-size:11px!important;line-height:1!important;max-width:45px!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .mobile-primary-resources .res-trend{display:none!important;}
  .mobile-primary-resources .res-cap-meter{left:7px!important;right:7px!important;bottom:3px!important;height:3px!important;}
  .resource-hud-menu{position:relative!important;}
  .resource-hud-menu>summary{
    width:46px!important;
    height:34px!important;
    font-size:12px!important;
  }
  .mobile-resource-grid{
    display:grid!important;
    position:absolute!important;
    right:0!important;
    top:calc(100% + 8px)!important;
    width:min(360px,calc(100vw - 14px))!important;
    max-height:55vh!important;
    overflow:auto!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:9px!important;
    border-radius:18px!important;
    border:3px solid #8b541d!important;
    background:linear-gradient(180deg,#fff2ca,#e8b84f)!important;
    box-shadow:0 16px 32px rgba(0,0,0,.36)!important;
    z-index:9200!important;
  }
  .mobile-resource-grid .res-chip{
    width:100%!important;
    height:38px!important;
    padding:5px 7px 10px!important;
    justify-content:flex-start!important;
    background:linear-gradient(180deg,#f6d57a,#b88336)!important;
  }
  .mobile-resource-grid .res-value{font-size:12px!important;max-width:72px!important;}
  .mobile-resource-grid .res-trend{display:inline-flex!important;font-size:9px!important;}
  .resource-popover-portal{z-index:30000!important;}
  .app-main{padding-top:6px!important;}
  .top-shell .top-pills{display:none!important;}
  .top-shell .resource-rail:not(.desktop-resource-rail){display:none!important;}
}
@media(min-width:761px) and (max-width:1180px){
  .desktop-top-pills .profile-action b,
  .desktop-top-pills .settings-trigger b,
  .desktop-top-pills .top-store b,
  .desktop-top-pills .top-market b{display:none!important;}
  .desktop-resource-rail .res-chip{min-width:92px!important;}
}
@media(max-width:760px){
  .account-hud-menu:not([open]) .account-hud-panel,
  .resource-hud-menu:not([open]) .mobile-resource-grid{display:none!important;}
  .account-hud-menu[open] .account-hud-panel{display:grid!important;}
  .resource-hud-menu[open] .mobile-resource-grid{display:grid!important;}
}

/* v43.48: proper compact HUD redesign.
   One command row, one resource rail. No giant dropdowns, no panel covering gameplay. */
.compact-top-shell{
  position:sticky!important;
  top:0!important;
  z-index:9000!important;
  padding:7px 12px 7px!important;
  background:linear-gradient(180deg,#3b0022 0%,#260016 58%,#16000d 100%)!important;
  border-bottom:2px solid rgba(126,45,84,.75)!important;
  box-shadow:0 10px 22px rgba(0,0,0,.34)!important;
  overflow:visible!important;
}
.compact-brand-row{
  display:grid!important;
  grid-template-columns:minmax(165px,auto) minmax(0,1fr)!important;
  align-items:center!important;
  gap:12px!important;
  padding:0!important;
  min-width:0!important;
}
.compact-top-shell .brand{
  min-width:0!important;
  max-width:260px!important;
  gap:8px!important;
}
.compact-top-shell .brand-icon{
  width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  border-width:2px!important;
  box-shadow:0 4px 0 rgba(0,0,0,.28)!important;
}
.compact-top-shell .brand-icon img{width:34px!important;height:34px!important;}
.compact-top-shell .brand strong{
  display:block!important;
  font-size:20px!important;
  line-height:.95!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.compact-top-shell .brand small{
  font-size:10px!important;
  line-height:1!important;
  color:#ffd98a!important;
}
.desktop-top-pills{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  min-width:0!important;
  overflow:visible!important;
  padding:0!important;
}
.desktop-top-pills .top-action,
.desktop-top-pills .era-pill,
.desktop-top-pills .crown-pill{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  height:33px!important;
  min-height:33px!important;
  min-width:0!important;
  padding:4px 8px!important;
  border-radius:11px!important;
  border:2px solid #8b541d!important;
  background:linear-gradient(180deg,#ffe790,#e1a027)!important;
  color:#1f0c05!important;
  box-shadow:0 3px 0 #6d3d14!important;
  font-size:12px!important;
  font-weight:1000!important;
  line-height:1!important;
  white-space:nowrap!important;
  text-decoration:none!important;
}
.desktop-top-pills .top-action:hover,
.desktop-top-pills .era-pill:hover,
.desktop-top-pills .crown-pill:hover{filter:brightness(1.06);}
.desktop-top-pills .top-icon,
.desktop-top-pills .pixel-music-toggle-icon{
  width:21px!important;
  height:21px!important;
  flex:0 0 21px!important;
  object-fit:contain!important;
  image-rendering:pixelated!important;
}
.desktop-top-pills .top-gear{font-size:18px!important;line-height:1!important;}
.desktop-top-pills .top-action-badged .nav-badge{
  top:-9px!important;
  right:-9px!important;
}
.desktop-top-pills .quick-music-toggle{
  width:38px!important;
  min-width:38px!important;
  padding:0!important;
}
.desktop-resource-rail{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:6px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding:6px 1px 2px!important;
  margin:0!important;
  width:100%!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(255,220,150,.50) transparent!important;
  -webkit-overflow-scrolling:touch!important;
}
.desktop-resource-rail::-webkit-scrollbar{height:5px!important;}
.desktop-resource-rail::-webkit-scrollbar-thumb{background:rgba(255,220,150,.42)!important;border-radius:999px!important;}
.desktop-resource-rail .res-chip{
  flex:0 0 auto!important;
  min-width:106px!important;
  height:36px!important;
  min-height:36px!important;
  padding:4px 8px 9px!important;
  border-radius:11px!important;
  border-width:2px!important;
  gap:5px!important;
  justify-content:flex-start!important;
  overflow:visible!important;
}
.desktop-resource-rail .res-icon{
  width:23px!important;
  height:23px!important;
  flex:0 0 23px!important;
}
.desktop-resource-rail .res-icon img{width:22px!important;height:22px!important;}
.desktop-resource-rail .res-value{
  min-width:0!important;
  max-width:58px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important;
  line-height:1!important;
}
.desktop-resource-rail .res-trend{
  flex:0 0 auto!important;
  font-size:9px!important;
  padding:2px 4px!important;
  margin-left:auto!important;
}
.desktop-resource-rail .res-cap-meter{
  left:7px!important;
  right:7px!important;
  bottom:3px!important;
  height:3px!important;
}
.mobile-top-controls,
.mobile-primary-resources,
.mobile-hud-panel,
.account-hud-menu,
.resource-hud-menu{
  display:none!important;
}
@media(max-width:900px){
  .desktop-top-pills .top-action b,
  .desktop-top-pills .settings-trigger b{display:none!important;}
  .desktop-top-pills .top-action,
  .desktop-top-pills .era-pill,
  .desktop-top-pills .crown-pill{padding-inline:7px!important;}
}
@media(max-width:760px){
  .compact-top-shell{
    padding:6px 7px 6px!important;
    max-height:none!important;
  }
  .compact-brand-row{
    grid-template-columns:1fr!important;
    gap:5px!important;
  }
  .compact-top-shell .brand{
    max-width:100%!important;
    gap:7px!important;
  }
  .compact-top-shell .brand-icon{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }
  .compact-top-shell .brand-icon img{width:31px!important;height:31px!important;}
  .compact-top-shell .brand strong{font-size:18px!important;}
  .compact-top-shell .brand small{font-size:10px!important;}
  .desktop-top-pills{
    display:grid!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    gap:4px!important;
    width:100%!important;
    overflow:visible!important;
  }
  .desktop-top-pills .top-action,
  .desktop-top-pills .era-pill,
  .desktop-top-pills .crown-pill{
    width:100%!important;
    height:35px!important;
    min-height:35px!important;
    padding:0!important;
    border-radius:10px!important;
    box-shadow:0 2px 0 #6d3d14!important;
    font-size:0!important;
  }
  .desktop-top-pills .top-action b,
  .desktop-top-pills .settings-trigger b,
  .desktop-top-pills .profile-action b{display:none!important;}
  .desktop-top-pills .top-icon,
  .desktop-top-pills .pixel-music-toggle-icon{
    width:22px!important;
    height:22px!important;
    flex-basis:22px!important;
  }
  .desktop-top-pills .era-pill{
    font-size:0!important;
    gap:2px!important;
  }
  .desktop-top-pills .era-pill b,
  .desktop-top-pills [data-live="processes"]{
    display:inline!important;
    font-size:11px!important;
    line-height:1!important;
  }
  .desktop-top-pills .crown-pill{display:none!important;}
  .desktop-top-pills .profile-action{display:flex!important;}
  .desktop-resource-rail{
    gap:4px!important;
    padding:5px 0 1px!important;
    scroll-snap-type:x proximity!important;
  }
  .desktop-resource-rail .res-chip{
    flex:0 0 92px!important;
    min-width:92px!important;
    height:35px!important;
    min-height:35px!important;
    padding:4px 6px 8px!important;
    border-radius:10px!important;
    gap:3px!important;
    scroll-snap-align:start!important;
  }
  .desktop-resource-rail .res-icon{
    width:22px!important;
    height:22px!important;
    flex-basis:22px!important;
  }
  .desktop-resource-rail .res-icon img{width:21px!important;height:21px!important;}
  .desktop-resource-rail .res-value{
    font-size:12px!important;
    max-width:52px!important;
  }
  .desktop-resource-rail .res-trend{display:none!important;}
  .resource-popover-portal,
  .res-tip{
    max-width:calc(100vw - 16px)!important;
  }
  .app-main{padding-top:6px!important;}
}
@media(max-width:390px){
  .desktop-top-pills{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:3px!important;}
  .desktop-top-pills .top-action,
  .desktop-top-pills .era-pill{height:33px!important;}
  .desktop-top-pills .top-icon,
  .desktop-top-pills .pixel-music-toggle-icon{width:20px!important;height:20px!important;flex-basis:20px!important;}
  .desktop-resource-rail .res-chip{flex-basis:82px!important;min-width:82px!important;}
  .desktop-resource-rail .res-value{max-width:45px!important;font-size:11px!important;}
}


/* v43.49: top HUD layout correction.
   The command buttons must be visible on mobile, resources must scroll cleanly,
   and desktop must not leave a strange stretched/outlined middle lane. */
.compact-top-shell,
.compact-top-shell *{
  box-sizing:border-box!important;
}
.compact-top-shell{
  padding:7px 10px 7px!important;
  overflow:visible!important;
}
.compact-brand-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  outline:none!important;
  border:0!important;
}
.compact-brand-row:focus,
.desktop-top-pills:focus,
.desktop-top-pills:focus-within{
  outline:none!important;
}
.compact-top-shell .brand{
  flex:0 0 auto!important;
  width:auto!important;
  max-width:250px!important;
  min-width:150px!important;
  margin:0!important;
}
.top-shell .desktop-top-pills,
.compact-top-shell .desktop-top-pills{
  display:flex!important;
  flex:0 1 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  width:auto!important;
  max-width:calc(100vw - 300px)!important;
  min-width:0!important;
  margin-left:auto!important;
  padding:0!important;
  overflow:visible!important;
  outline:none!important;
  border:0!important;
  background:transparent!important;
}
.compact-top-shell .desktop-resource-rail{
  display:flex!important;
  width:100%!important;
  max-width:100%!important;
  gap:6px!important;
  padding:6px 0 1px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
.compact-top-shell .desktop-resource-rail::-webkit-scrollbar{display:none!important;}
.compact-top-shell .mobile-top-controls,
.compact-top-shell .mobile-primary-resources,
.compact-top-shell .account-hud-menu,
.compact-top-shell .resource-hud-menu,
.compact-top-shell .mobile-hud-panel{
  display:none!important;
}
@media(min-width:761px){
  .compact-top-shell .desktop-top-pills .top-action,
  .compact-top-shell .desktop-top-pills .era-pill,
  .compact-top-shell .desktop-top-pills .crown-pill{
    height:32px!important;
    min-height:32px!important;
    padding:4px 8px!important;
    border-radius:10px!important;
    font-size:12px!important;
  }
  .compact-top-shell .desktop-top-pills .top-icon,
  .compact-top-shell .desktop-top-pills .pixel-music-toggle-icon{
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
  .compact-top-shell .desktop-resource-rail .res-chip{
    min-width:104px!important;
    height:34px!important;
    min-height:34px!important;
  }
}
@media(max-width:760px){
  .compact-top-shell{
    padding:6px 6px 6px!important;
  }
  .compact-brand-row{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:5px!important;
  }
  .compact-top-shell .brand{
    flex:1 1 102px!important;
    min-width:96px!important;
    max-width:136px!important;
    gap:5px!important;
  }
  .compact-top-shell .brand-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:10px!important;
  }
  .compact-top-shell .brand-icon img{
    width:28px!important;
    height:28px!important;
  }
  .compact-top-shell .brand strong{
    font-size:15px!important;
    max-width:94px!important;
  }
  .compact-top-shell .brand small{
    font-size:9px!important;
  }
  .top-shell .desktop-top-pills,
  .compact-top-shell .desktop-top-pills{
    display:flex!important;
    flex:0 0 auto!important;
    max-width:none!important;
    width:auto!important;
    margin-left:auto!important;
    gap:3px!important;
    overflow:visible!important;
  }
  .compact-top-shell .desktop-top-pills .top-action,
  .compact-top-shell .desktop-top-pills .era-pill,
  .compact-top-shell .desktop-top-pills .crown-pill{
    flex:0 0 30px!important;
    width:30px!important;
    min-width:30px!important;
    height:31px!important;
    min-height:31px!important;
    padding:0!important;
    border-radius:9px!important;
    font-size:0!important;
    gap:0!important;
  }
  .compact-top-shell .desktop-top-pills .top-action b,
  .compact-top-shell .desktop-top-pills .settings-trigger b,
  .compact-top-shell .desktop-top-pills .profile-action b,
  .compact-top-shell .desktop-top-pills .top-store b,
  .compact-top-shell .desktop-top-pills .top-market b,
  .compact-top-shell .desktop-top-pills .top-action-badged b{
    display:none!important;
  }
  .compact-top-shell .desktop-top-pills .top-icon,
  .compact-top-shell .desktop-top-pills .pixel-music-toggle-icon{
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
  .compact-top-shell .desktop-top-pills .top-gear{
    font-size:17px!important;
  }
  .compact-top-shell .desktop-top-pills .era-pill b,
  .compact-top-shell .desktop-top-pills [data-live="processes"]{
    display:block!important;
    font-size:10px!important;
    line-height:1!important;
    margin-left:1px!important;
  }
  .compact-top-shell .desktop-top-pills .crown-pill{
    display:none!important;
  }
  .compact-top-shell .desktop-top-pills .nav-badge{
    top:-8px!important;
    right:-8px!important;
    min-width:16px!important;
    height:16px!important;
    font-size:10px!important;
    padding:0 4px!important;
  }
  .compact-top-shell .desktop-resource-rail{
    margin-top:5px!important;
    padding:0 1px 1px!important;
    gap:4px!important;
    scroll-snap-type:x proximity!important;
  }
  .compact-top-shell .desktop-resource-rail .res-chip{
    flex:0 0 86px!important;
    min-width:86px!important;
    height:32px!important;
    min-height:32px!important;
    padding:4px 5px 8px!important;
    border-radius:9px!important;
    gap:3px!important;
    scroll-snap-align:start!important;
  }
  .compact-top-shell .desktop-resource-rail .res-icon{
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
  .compact-top-shell .desktop-resource-rail .res-icon img{
    width:19px!important;
    height:19px!important;
  }
  .compact-top-shell .desktop-resource-rail .res-value{
    font-size:11px!important;
    max-width:48px!important;
  }
  .compact-top-shell .desktop-resource-rail .res-trend{
    display:none!important;
  }
  .compact-top-shell .desktop-resource-rail .res-cap-meter{
    left:6px!important;
    right:6px!important;
    bottom:3px!important;
    height:3px!important;
  }
  .res-tip{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:96px!important;
    width:auto!important;
    max-width:none!important;
    max-height:55vh!important;
    overflow:auto!important;
    z-index:30000!important;
  }
}
@media(max-width:380px){
  .compact-top-shell .brand{max-width:110px!important;min-width:92px!important;}
  .compact-top-shell .brand strong{font-size:14px!important;max-width:72px!important;}
  .compact-top-shell .desktop-top-pills .top-action,
  .compact-top-shell .desktop-top-pills .era-pill,
  .compact-top-shell .desktop-top-pills .crown-pill{
    flex-basis:28px!important;
    width:28px!important;
    min-width:28px!important;
  }
  .compact-top-shell .desktop-top-pills{gap:2px!important;}
  .compact-top-shell .desktop-resource-rail .res-chip{
    flex-basis:78px!important;
    min-width:78px!important;
  }
}

/* v43.51: compact caravan market and offer-led pricing UI */
.market-tools-grid{margin-bottom:14px}.market-tool-card{min-height:0}.market-full-button{width:100%;margin-top:10px}.market-travel-list{display:grid;gap:7px;margin-top:14px}.market-travel-row,.market-own-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border-radius:12px;background:rgba(255,255,255,.42);border:1px solid rgba(126,79,35,.18);font-size:13px}.market-travel-row span:last-child,.market-own-row span{color:#7b6042;font-weight:800}.market-empty-line{padding:10px 2px;color:#7b6042}.market-form-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.market-price-guide{min-height:36px;padding:9px 11px;border-radius:11px;background:rgba(83,49,24,.08);border:1px solid rgba(126,79,35,.16);font-size:13px;font-weight:900;color:#65462d}.market-price-guide[data-rating="low"]{background:rgba(43,124,55,.1);color:#245e2d}.market-price-guide[data-rating="high"]{background:rgba(165,45,45,.09);color:#8a2525}.market-board-panel{padding:18px}.market-board-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}.market-listing-title{justify-content:flex-start;margin-bottom:3px}.market-listing-title h2{margin:0}.market-board-note{margin:0;font-size:14px}.market-filter-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.market-filter-form label{font-size:12px;font-weight:1000;text-transform:uppercase;letter-spacing:.08em;color:#725238}.market-filter-form select{min-width:180px;border:2px solid #8b5a2b;border-radius:12px;padding:8px 10px;background:#fff8df;color:#241004;font-weight:900}.market-offer-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:12px}.market-offer-card{display:flex;flex-direction:column;gap:11px;min-width:0;padding:13px;border:2px solid rgba(126,79,35,.23);border-radius:17px;background:linear-gradient(180deg,rgba(255,255,255,.56),rgba(255,248,220,.32));box-shadow:0 8px 16px rgba(64,37,13,.09)}.market-offer-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.market-offer-resource{display:flex;align-items:center;gap:9px;min-width:0}.market-offer-resource img{width:34px;height:34px;object-fit:contain;image-rendering:pixelated;flex:0 0 auto}.market-offer-resource div{display:grid;gap:2px;min-width:0}.market-offer-resource b{font-size:17px;line-height:1.1}.market-offer-resource span{font-size:12px;color:#75593e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.market-value-card{display:grid;justify-items:center;min-width:62px;padding:6px 8px;border-radius:11px;border:1px solid rgba(88,58,31,.18);background:rgba(95,70,45,.08);line-height:1}.market-value-card span{font-size:9px;font-weight:1000;text-transform:uppercase;letter-spacing:.1em}.market-value-card b{font-size:14px;margin-top:4px}.market-value-low{background:rgba(44,132,55,.12);border-color:rgba(44,132,55,.25);color:#225d2b}.market-value-high{background:rgba(173,48,48,.10);border-color:rgba(173,48,48,.22);color:#8c2626}.market-value-fair{background:rgba(187,125,24,.12);border-color:rgba(187,125,24,.25);color:#7b4d0c}.market-offer-metrics{display:grid;grid-template-columns:1fr 1fr;gap:7px}.market-offer-metrics>div{display:grid;gap:1px;padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.45);border:1px solid rgba(126,79,35,.12)}.market-offer-metrics span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:900;color:#826548}.market-offer-metrics b{font-size:13px}.market-offer-total{margin-top:auto;padding:9px 10px;border-radius:12px;background:rgba(68,38,18,.08);border:1px solid rgba(91,52,24,.15)}.market-offer-total>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.market-offer-total span{font-size:12px;font-weight:900}.market-offer-total b{display:inline-flex;align-items:center;gap:5px;font-size:16px}.market-offer-total img{width:19px;height:19px;object-fit:contain;image-rendering:pixelated}.market-offer-total small{display:block;margin-top:3px;color:#765a3d;font-size:11px}.market-buy-button{width:100%;padding:9px 12px;border-radius:13px;font-size:13px}.market-empty-state{grid-column:1/-1;min-height:140px}.market-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-top:15px}.market-pagination a:last-child{justify-self:end}.market-pagination b{font-size:13px;color:#66472e}.market-own-list{display:grid;gap:7px}.market-own-row>div{display:grid;gap:2px}.market-own-row span{font-size:12px}.market-own-row form{margin:0}.market-own-panel{padding:16px}
@media(max-width:900px){.market-board-head{align-items:stretch;flex-direction:column}.market-filter-form{width:100%}.market-filter-form select{flex:1}.market-tools-grid{grid-template-columns:1fr}.market-offer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.market-offer-grid{grid-template-columns:1fr}.market-form-pair{grid-template-columns:1fr}.market-filter-form label{width:100%}.market-filter-form select{min-width:0;width:100%}.market-pagination{grid-template-columns:auto 1fr auto}.market-pagination b{text-align:center}.market-offer-card{padding:12px}.market-board-panel{padding:13px}.market-own-row{align-items:flex-start}}

.map-directory-modal{
  align-items:center;
  justify-items:center;
  overflow:hidden;
  padding:clamp(10px,2.5vw,28px);
}
.event-modal.map-directory-modal .map-directory-panel{
  width:min(1080px,100%);
  max-width:1080px!important;
  max-height:88vh;
  max-height:88dvh;
  margin:0!important;
  padding:clamp(14px,2vw,22px)!important;
  display:flex;
  flex-direction:column;
  overflow:hidden!important;
  border-radius:24px;
}
.event-modal.map-directory-modal .houses-panel{max-width:920px!important}
.map-directory-head{
  flex:0 0 auto;
  margin:0 0 12px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(92,52,20,.18);
  flex-wrap:nowrap;
}
.map-directory-head>div{min-width:0}
.map-directory-head h2{margin:0}
.map-directory-head p{margin:4px 0 0;line-height:1.3}
.map-directory-head .event-close{flex:0 0 auto}
.map-directory-scroll{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:2px 4px 4px 2px;
}
.road-city-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.road-city-card{min-width:0;padding:14px;border-radius:18px}
.road-city-card h3{justify-content:flex-start;flex-wrap:wrap;margin-bottom:10px}
.road-city-card h3 small{margin-left:auto;color:#75563b;font-size:12px}
.road-city-list{gap:7px}
.road-city-row{
  min-width:0;
  padding:10px 11px;
  border-radius:12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.road-city-main{min-width:0}
.road-city-main b,.road-city-main small,.road-city-main em{display:block}
.road-city-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.road-city-main em{margin:2px 0 0;font-size:11px;text-transform:uppercase;letter-spacing:.03em}
.owner-pill{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.lord-alliance-list{display:grid;gap:14px}
.lord-alliance-card{
  min-width:0;
  padding:14px;
  border:2px solid rgba(91,52,17,.16);
  border-radius:18px;
  background:rgba(255,255,255,.48);
}
.lord-alliance-card.featured{border-color:rgba(117,65,18,.34);background:linear-gradient(180deg,rgba(255,244,191,.88),rgba(238,198,102,.7))}
.lord-alliance-head{display:flex;align-items:center;gap:11px;margin-bottom:10px}
.lord-alliance-head>div{min-width:0}
.lord-alliance-head h3{margin:0;font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lord-alliance-head h3 small{color:#75563b;font-size:12px}
.lord-alliance-head p{margin:3px 0 0;color:#75563b;font-size:12px;font-weight:800}
.lord-alliance-head .house-color{flex:0 0 30px;width:30px;height:30px}
.lord-alliance-card .house-list{gap:7px;margin:0}
.lord-alliance-card .house-row{
  min-width:0;
  padding:9px 10px;
  border-radius:12px;
  grid-template-columns:28px minmax(0,1fr) auto auto;
  gap:10px;
  background:rgba(255,255,255,.64);
}
.lord-alliance-card .house-row.main-house{background:rgba(255,255,255,.64);border-color:rgba(124,76,28,.13)}
.house-rank{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:rgba(64,29,12,.1);
  color:#6b3d1b;
  font-size:12px;
  font-weight:1000;
}
.house-identity{min-width:0}
.house-identity b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.house-identity small{display:block;color:#75563b;font-size:12px;font-weight:800}
.house-trophies{min-width:72px;text-align:right;font-size:17px;line-height:1}
.house-trophies small{display:block;margin-top:3px;color:#75563b;font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.house-actions{display:flex;gap:6px;align-items:center}
.house-actions .btn-small{padding:7px 9px;white-space:nowrap}

@media(max-width:760px){
  .map-directory-modal{
    align-items:end;
    padding:0;
  }
  .event-modal.map-directory-modal .map-directory-panel{
    width:100%;
    max-width:none!important;
    height:92vh;
    height:92dvh;
    max-height:calc(100vh - env(safe-area-inset-top));
    max-height:calc(100dvh - env(safe-area-inset-top));
    padding:14px 12px calc(14px + env(safe-area-inset-bottom))!important;
    border-radius:22px 22px 0 0;
  }
  .map-directory-head{align-items:flex-start;gap:8px;margin-bottom:9px;padding-bottom:9px}
  .map-directory-head h2{font-size:21px}
  .map-directory-head p{font-size:12px}
  .map-directory-head .event-close{padding:8px 10px}
  .map-directory-scroll{padding-right:1px;scrollbar-gutter:auto}
  .road-city-grid{grid-template-columns:1fr;gap:10px}
  .road-city-card{padding:10px;border-radius:15px}
  .road-city-card h3{font-size:16px;margin-bottom:8px}
  .road-city-row{padding:9px;gap:8px}
  .road-city-main b{font-size:14px}
  .road-city-main small{font-size:11px}
  .owner-pill{max-width:112px;padding:4px 7px;font-size:11px}
  .lord-alliance-list{gap:10px}
  .lord-alliance-card{padding:10px;border-radius:15px}
  .lord-alliance-head{margin-bottom:8px}
  .lord-alliance-head h3{font-size:16px}
  .lord-alliance-head .house-color{flex-basis:26px;width:26px;height:26px}
  .lord-alliance-card .house-row{
    grid-template-columns:25px minmax(0,1fr) auto;
    gap:8px;
    padding:8px;
  }
  .house-rank{width:25px;height:25px}
  .house-identity b{font-size:14px}
  .house-identity small{font-size:10px}
  .house-trophies{min-width:58px;font-size:15px}
  .house-actions{grid-column:2/4;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .house-actions .btn-small{text-align:center;padding:6px 8px;font-size:11px}
}

@media(max-width:420px){
  .road-city-row{grid-template-columns:minmax(0,1fr) 94px}
  .owner-pill{max-width:94px;text-align:center}
  .map-directory-head p{max-width:230px}
}

.purchase-consent{display:flex;align-items:flex-start;gap:8px;margin:10px 0;font-size:.78rem;line-height:1.35;text-align:left}.purchase-consent input{margin-top:3px;flex:0 0 auto}.purchase-consent a{text-decoration:underline}.legal-messages{margin:14px 0}

/* v43.56: mobile tutorial/world-map usability pass */
.tutorial-home-action{
  background:linear-gradient(180deg,#efe5ff,#a56be1)!important;
  border-color:#6d3aa6!important;
  color:#2c133e!important;
}
.secure-account-action{
  background:linear-gradient(180deg,#dff3ff,#58a8df)!important;
  border-color:#2e6f9e!important;
  color:#10293e!important;
}
body[data-page="world"] #world-game,
body[data-page="world"] #world-game canvas{
  touch-action:none!important;
  overscroll-behavior:contain!important;
  -webkit-user-select:none;
  user-select:none;
}
body[data-page="world"] .world-hud{
  display:flex;
  align-items:flex-start;
  gap:8px;
  max-width:min(760px,calc(100vw - 100px));
}
body[data-page="world"] .world-info-toggle{
  flex:0 0 auto;
  border:2px solid #805026;
  border-radius:14px;
  padding:8px 10px;
  background:rgba(255,242,207,.96);
  color:#4d280f;
  font-weight:1000;
  box-shadow:0 4px 0 rgba(0,0,0,.18);
  cursor:pointer;
}
body[data-page="world"] .world-hud.info-collapsed .world-card{
  display:none!important;
}
body[data-page="world"] .map-controls{
  z-index:240!important;
}
body[data-page="world"] .map-directory-panel{
  width:min(920px,calc(100vw - 24px))!important;
  max-width:920px!important;
  max-height:calc(100dvh - 24px)!important;
  min-height:0!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body[data-page="world"] .houses-panel.map-directory-panel{
  max-width:760px!important;
}
body[data-page="world"] .map-directory-head{
  flex:0 0 auto;
}
body[data-page="world"] .map-directory-scroll{
  flex:1 1 auto;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
}
@media(max-width:760px){
  .guided-tutorial .tutorial-card{
    max-height:min(38dvh,310px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  body[data-page="world"] .world-hud{
    left:8px!important;
    top:8px!important;
    right:auto!important;
    max-width:calc(100vw - 80px)!important;
    gap:6px!important;
  }
  body[data-page="world"] .world-info-toggle{
    padding:6px 8px!important;
    border-radius:12px!important;
    font-size:12px!important;
  }
  body[data-page="world"] .world-card{
    max-width:min(78vw,390px)!important;
    max-height:44dvh!important;
    overflow:auto!important;
  }
  body[data-page="world"] .world-mini{
    position:absolute!important;
    left:8px!important;
    right:auto!important;
    bottom:8px!important;
    top:auto!important;
    width:132px!important;
    max-width:42vw!important;
    min-width:112px!important;
  }
  body[data-page="world"] .map-directory-modal{
    padding:8px!important;
  }
  body[data-page="world"] .map-directory-panel{
    width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:18px!important;
    padding:12px!important;
  }
  body[data-page="world"] .map-directory-head{
    align-items:flex-start!important;
    gap:8px!important;
  }
  body[data-page="world"] .map-directory-head p{
    margin:2px 0 0!important;
  }
}

/* v43.57: unified trophies, workforce visibility, dispatch shortcuts, and world directory polish */
.worker-cap-status{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(104,59,21,.18);
  color:#5f422d;
  font-size:12px;
  font-weight:900;
}
.worker-cap-status.cap-full{
  background:#ffe1d9;
  border-color:rgba(166,55,37,.28);
  color:#8a2d21;
}
.worker-cap-overview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:0 0 12px;
}
.worker-cap-chip{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:9px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.48);
  border:1px solid rgba(104,59,21,.14);
}
.worker-cap-chip img{
  width:34px;
  height:34px;
  flex:0 0 34px;
  object-fit:contain;
  image-rendering:pixelated;
}
.worker-cap-chip span{display:grid;min-width:0}
.worker-cap-chip b{font-size:13px}
.worker-cap-chip small{font-size:11px;color:#76583e;font-weight:800}
.worker-cap-warning{margin:0 0 12px!important}
.owned-place .action-row,.reinforcing-place .action-row{flex-wrap:wrap;justify-content:flex-end}

body[data-page="world"] .dispatch-hint{
  position:absolute;
  z-index:245;
  left:50%;
  top:12px;
  transform:translateX(-50%);
  width:min(620px,calc(100% - 180px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:2px solid rgba(72,48,22,.55);
  border-radius:15px;
  background:rgba(255,243,203,.97);
  box-shadow:0 7px 22px rgba(0,0,0,.2);
  color:#3d230f;
}
body[data-page="world"] .dispatch-hint[hidden]{display:none!important}
body[data-page="world"] .dispatch-hint>div{display:grid;gap:2px;min-width:0}
body[data-page="world"] .dispatch-hint b{font-size:14px}
body[data-page="world"] .dispatch-hint span{font-size:12px;font-weight:800;line-height:1.25}

body[data-page="world"] .map-directory-scroll{
  padding-bottom:28px!important;
  scroll-padding-bottom:28px;
}
@media(max-width:760px){
  .worker-cap-overview{grid-template-columns:1fr}
  .worker-cap-status{width:100%;justify-content:center;border-radius:12px}
  body[data-page="world"] .dispatch-hint{
    top:52px;
    left:8px;
    right:72px;
    transform:none;
    width:auto;
    padding:8px 9px;
    gap:8px;
  }
  body[data-page="world"] .dispatch-hint span{font-size:11px}
  body[data-page="world"] .dispatch-hint .btn-small{padding:6px 8px;font-size:11px}
  body[data-page="world"] .map-directory-scroll{
    padding-bottom:calc(64px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(64px + env(safe-area-inset-bottom));
  }
}

