/* Villaggio: presentation layer over the existing game. All rules and APIs are unchanged. */
.v-forge-portrait,.v-cw-crest,.v-pvp-banner,.account-village-art{display:none}
html body.village-ui{--text:#fff0d3;--sub:#c4cbb7;--card:#1e322f;--panel:#263e39;--panel-strong:#33493e;--line:#ae955c70;--gold-soft:#d9bb5b1f;padding:0;background:#0c191c;color:var(--text)}
html body.village-ui #app.card{position:relative;isolation:isolate;border-radius:0;padding:max(9px,env(safe-area-inset-top)) 12px max(6px,env(safe-area-inset-bottom));background:#10292e;box-shadow:0 0 80px #0006;overflow:hidden}
html body.village-ui #app::before,html body.village-ui #app::after{content:'';position:absolute;inset:0;z-index:-2;pointer-events:none}
html body.village-ui #app::before{background:url('./village/council-v2.webp') center/cover no-repeat}
html body.village-ui #app::after{z-index:-1;background:linear-gradient(#102532a6,#142a2d7d 35%,#14282ab3 68%,#101f29f0)}
html body.village-ui[data-village-view=home] #app::before{background-image:url('./village/village-autumn-v1.webp');background-position:center 48%}
html body.village-ui[data-village-view=home] #app::after{background:linear-gradient(#0a233a66,transparent 32%,transparent 55%,#102c24b0 77%,#0d201ee8)}
html body.village-ui[data-village-view=forge] #app::before{background-image:url('./village/forge-v2.webp')}
html body.village-ui[data-village-view=forge] #app::after{background:linear-gradient(#11203490,transparent 45%,#15282766 75%,#102023e8)}
html body.village-ui[data-village-view=multiplayer] #app::before,html body.village-ui[data-village-view=arena] #app::before,html body.village-ui[data-village-view=robbery] #app::before{background-image:url('./village/arena-v3.webp')}
html body.village-ui #view{overflow-x:hidden;scrollbar-color:#d4b26773 #13242a33;overscroll-behavior:contain}
html body.village-ui .bhead-title,html body.village-ui .hub-hello,html body.village-ui .account-heading h1{color:#fff1c7;text-shadow:0 2px 6px #071a22}
html body.village-ui .bcard,html body.village-ui .pv-card,html body.village-ui .ac-card,html body.village-ui .account-menu,html body.village-ui .account-loadout{background:linear-gradient(125deg,#33473beF,#172f2bf2);border:1px solid #b99b659e;box-shadow:inset 0 0 0 2px #10261c36,0 3px 12px #0003;border-radius:10px}
html body.village-ui .btn{border-radius:8px;min-height:42px;border-color:#ba9b61;color:#f8e9c5}
html body.village-ui .btn.primary{color:#2e240e;background:linear-gradient(#fff0b0,var(--gold) 32%,#d5aa4c);border-color:#f5dfa0;box-shadow:inset 0 0 0 2px #a3733033,inset 0 -3px 0 #92612a55,0 2px 0 #6b4c2e}
html body.village-ui .btn.ghost{background:linear-gradient(#52634a55,#1b343059);border-color:#c1a36a9c}
html body.village-ui .btn:disabled{opacity:.48}
html body.village-ui .tabbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));flex:0 0 auto;gap:3px;min-height:61px;padding:5px 2px 1px;margin-top:7px;border-top:2px solid #d4b471;background:linear-gradient(#254253ed,#102731f5);border-radius:0;box-shadow:0 -4px 12px #0d241c55}
html body.village-ui .tab{min-width:0;min-height:49px;border-radius:7px;gap:3px;padding:3px 0;color:#c6d1c4}
html body.village-ui .tab.active{background:linear-gradient(#9c7b3e66,#dab44824);box-shadow:inset 0 0 0 1px #e4c37e;color:#fff0b8}
html body.village-ui .tab .iconpill{padding:0;width:auto;height:auto;min-height:0;background:none!important;border:0;box-shadow:none}
html body.village-ui .tab .tabicon,html body.village-ui .tab svg{width:25px;height:25px}
html body.village-ui .tablabel{font-size:10px;line-height:1.2;font-weight:600}
html body.village-ui .subnav{margin-top:6px;background:#1d342eea;border:1px solid #a58e5b8c;border-radius:7px;padding:4px}
html body.village-ui .subitem{background:#35473799;color:#e8dfc1;border-color:#c5aa6b70;border-radius:5px;min-height:35px}
html body.village-ui .subitem.active{color:#ffe3a2;border-color:#e7cc89}
#village-hud{flex:0 0 auto;margin-bottom:10px}
body.kb-open #village-hud{display:none}
html body.village-ui.view-home #view{flex:1 1 auto;min-height:0;overflow-y:auto}
html body.village-ui #home{display:flex;flex-direction:column;min-height:100%;height:100%}
html body.village-ui #village-hud.cp-info,html body.village-ui #home .cp-info{flex:0 0 auto;padding:7px 8px;gap:7px;min-height:48px;background:linear-gradient(#1c4050b3,#153646c7);border:1px solid #cab1778c;border-radius:7px;margin-bottom:0;color:#fff0cc}
html body.village-ui #village-hud.cp-info{margin-bottom:10px}
html body.village-ui #home .cp-name{font-size:12px}html body.village-ui #home .cp-nick{min-width:0;flex:1}html body.village-ui #home .cp-i{font-size:10px;white-space:nowrap}
html body.village-ui .v-home-avatar{display:flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 34px;overflow:hidden;border:1px solid #e6c277;border-radius:50%;background:#183c4a}
.village-home{position:relative;display:flex;flex-direction:column;flex:1 0 340px;min-height:340px;margin-top:0;isolation:isolate}
.v-title{padding-top:16px;text-align:center;text-shadow:0 2px 7px #19342b}
.v-title small{font:400 8px var(--font-display,Georgia);color:#f4edce;letter-spacing:2px;text-transform:uppercase}
.v-title h1{font:500 27px var(--font-display,Georgia);line-height:1.1;color:#fff2d1;margin:4px 0 0}
.v-actions{position:absolute;top:78px;display:flex;flex-direction:column;gap:8px;z-index:2}.v-left{left:0}.v-right{right:0}
.v-action{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;width:59px;min-height:52px;border:1px solid #edcd85;border-radius:8px 8px 14px 14px;padding:6px 3px;background:linear-gradient(135deg,#815c31ef,#332b20f2 65%);color:#ffebbd;box-shadow:inset 0 0 0 2px #caab562b,0 3px 7px #0b221c77;text-shadow:0 1px 3px #000;cursor:pointer}
.v-action>svg{width:23px;height:23px;color:#f6d893}.v-action>span{font-size:9px;font-weight:600;line-height:1.2}
.v-action .prod-badge{top:2px;right:2px}.v-action.ms-btn{height:58px;width:59px;padding:5px 3px;gap:2px}.v-action .ms-svg{width:27px;height:27px}.v-action .dice-count{font-size:9px;position:static;line-height:1.2;color:#fff1ca;margin:0;background:none}.v-action .v-mission-label{font-size:8px}
.v-location{position:absolute;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:7px 10px;border:1px solid #966830;border-radius:5px;background:linear-gradient(#fff1b9,#d8b56a);box-shadow:inset 0 1px 0 #fff6cc,0 3px 0 #63441f,0 4px 10px #0006;color:#392a19;font:600 12px Georgia,serif;cursor:pointer;z-index:1;white-space:nowrap}
.v-location svg{width:16px;height:16px}.v-location::before{content:'';position:absolute;left:50%;top:-11px;width:1px;height:10px;background:#fff2b9;box-shadow:0 0 7px #ffd680}
.v-forge{left:23%;top:56%}.v-clan{left:75%;top:58%}.v-tower{left:69%;top:28%}.v-location .prod-badge{top:2px;right:2px}
html body.village-ui .v-campaign.cp-arena{position:relative;flex:0 0 auto;margin:0 auto 7px;margin-top:auto;width:min(78%,280px);min-height:0;max-width:100%;border:0;background:none;padding:0;box-shadow:none;overflow:visible}
html body.village-ui .v-campaign .cp-camp{display:flex;flex-direction:column;align-items:center;padding:0;background:none;border:0;box-shadow:none;cursor:pointer;min-height:0;overflow:visible}
html body.village-ui .v-campaign .cp-camp-title{font:600 10px Georgia,serif;color:#fff0c1;background:#204a61ed;border:1px solid #e3c77e;border-bottom:0;border-radius:15px 15px 0 0;padding:6px 21px 2px;margin:0;gap:5px}
html body.village-ui .v-campaign .cp-camp-title svg{width:13px;height:13px}
html body.village-ui .v-campaign .cp-camp-stage{font:600 19px Georgia,serif;background:#204a61ed;border-left:1px solid #e3c77e;border-right:1px solid #e3c77e;color:#ffedbe;padding:0 25px 5px;margin:0;line-height:1.1;min-width:105px;text-align:center}
html body.village-ui .v-campaign .cp-camp-cta{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;width:100%;border:1px solid #f6e2a5;border-radius:8px;color:#34250d;background:linear-gradient(#fff0b7,#ebc45a 27%,#d8a73e 80%,#edc365);box-shadow:inset 0 0 0 3px #aa772d40,inset 0 -3px 0 #96662955,0 3px 0 #65451d,0 2px 9px #0005;font:600 22px Georgia,serif;padding:8px 15px;line-height:1.1}
html body.village-ui .v-campaign .cp-camp-cta svg{width:19px;height:19px}
html body.village-ui .v-campaign .cp-camp-gate{font-size:10px;color:#ffe3b4;background:#483227ec;border:1px solid #dab275;border-radius:6px;padding:5px;margin:0 0 5px;max-height:60px;overflow-y:auto}
html body.village-ui.view-home #chatstrip:not(.hidden){flex:0 1 118px;min-height:86px;max-height:150px;margin:8px 0 0;padding:7px 9px;background:linear-gradient(#203a31ed,#132c2af0);border:1px solid #cfb5758c;border-radius:8px}
html body.village-ui .cs-head{gap:5px;padding-bottom:4px}.village-ui .cs-tab{font-size:10px;padding:6px 4px;border-radius:5px;min-height:30px}.village-ui .cs-tab.on{color:#fff1b8;border-color:#dbbd74;background:#a2874733}.village-ui .cs-row{font-size:11px;min-width:0}.village-ui .cs-text{color:#e6e9da}
html body.village-ui[data-village-view=forge] #fg-body>.bcard{background:none;border:0;box-shadow:none;padding:0;margin:0}
html body.village-ui[data-village-view=forge] .fg-eqgrid{position:relative;display:grid;grid-template-columns:62px minmax(0,1fr) 62px;grid-template-rows:repeat(4,62px);gap:9px;min-height:275px;margin:72px 0 12px;padding:0;isolation:isolate}
html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile{grid-column:1;position:relative;z-index:2;min-height:62px;width:62px;border-radius:8px;background:linear-gradient(#405365c9,#132d39e8);box-shadow:inset 0 0 0 2px #13223180,0 3px 7px #0005;padding:5px;overflow:hidden}
html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(1){grid-area:1/1}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(2){grid-area:1/3}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(3){grid-area:2/1}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(4){grid-area:4/3}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(5){grid-area:2/3}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(6){grid-area:3/3}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(7){grid-area:3/1}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile:nth-child(8){grid-area:4/1}
html body.village-ui[data-village-view=forge] .fg-tile .fg-tile-art{height:39px;max-height:100%}html body.village-ui[data-village-view=forge] .fg-tile-art>svg{max-width:44px;max-height:42px;width:auto;height:39px}
html body.village-ui[data-village-view=forge] .fg-tile .inv-tile-lv{font-size:9px}.village-ui .fg-eqgrid .inv-tile-skill{font-size:7px;line-height:1.15}
html body.village-ui .v-forge-portrait{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;position:absolute;inset:0 60px;z-index:0;pointer-events:none}
html body.village-ui .v-forge-portrait img{width:100%;height:calc(100% - 12px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 8px 9px #0005)}
html body.village-ui .v-forge-portrait small{font-size:8px;line-height:1.3;color:#e2d9ba;text-shadow:0 2px 4px #000;margin-top:3px}
html body.village-ui #fg-detail{background:#172f2dec;border:1px solid #b49d668c;border-radius:9px;padding:11px;color:var(--text)}
html body.village-ui #forgestrip{flex-shrink:0;margin-top:6px;background:linear-gradient(#57412df2,#292921f5);border:1px solid #d7b470;border-radius:9px;padding:9px;box-shadow:inset 0 0 0 2px #241a142e}
html body.village-ui #forgestrip .cp-forge{border:0;background:none;padding:0;margin:0;box-shadow:none}
html body.village-ui #forgestrip #fg-roll{background:linear-gradient(#509cc6,#2e79b5 35%,#20528b);color:#fff1ce;border-color:#e6cd89;text-shadow:0 1px 3px #143346;min-height:46px}
html body.village-ui #forgestrip .fgprog{border-color:#b7b992;background:#0b2236;color:#fff0c4}
html body.village-ui .account-identity{position:relative;overflow:hidden;padding:17px 14px 13px;border:1px solid #cbb277;background:linear-gradient(125deg,#1e4055e8,#1a373ec2);border-radius:11px;min-height:189px}
html body.village-ui .account-village-art{display:block;position:absolute;right:12px;top:10px;width:88px;height:132px;z-index:2;object-fit:contain;object-position:center top;cursor:pointer;filter:drop-shadow(0 5px 5px #0004)}
html body.village-ui .account-art-info{display:grid;place-items:center;position:absolute;right:4px;top:4px;z-index:3;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:#f1d58a;color:#1a1404;box-shadow:0 1px 4px #0006;cursor:pointer}
html body.village-ui .account-art-info svg{width:13px;height:13px;display:block;color:inherit}
html body.village-ui .account-tiles{position:relative;padding-right:99px;min-height:117px;align-items:center}
html body.village-ui .account-tile{background:#214551;border-color:#f1d58a;color:#fff0c6}html body.village-ui .account-tile-caption{color:#f1d58a}
html body.village-ui .account-identity-name{min-width:0}html body.village-ui .account-identity-name h2{font:500 20px/1.2 var(--font-display,Georgia);color:#fff0c6;overflow-wrap:anywhere}
html body.village-ui .account-avatar{width:42px;height:42px;background:#214551;border-color:#f1d58a}
html body.village-ui .account-power{grid-column:2;font-size:10px;align-items:flex-start;text-align:left}html body.village-ui .account-power>b{font-size:18px;color:#ffdf94}
html body.village-ui .account-clan{font-size:9px;line-height:1.5;min-width:0;max-width:100%;white-space:normal}
html body.village-ui .account-identity-actions{position:relative;z-index:1;margin-top:10px;gap:7px;flex-wrap:wrap}
html body.village-ui .account-inline-button,html body.village-ui .account-back,html body.village-ui .account-refresh{background:#294139e0;border-color:#bea366;color:#ffe8b8}
html body.village-ui .account-balance,html body.village-ui .account-progress{background:linear-gradient(#364b3cde,#1e3730ef);border:1px solid #b5a16c8c;color:var(--text);border-radius:8px}
html body.village-ui .account-section h2{color:#f7e3b2}.village-ui .account-menu-row{color:#f1dfb9;border-color:#abac8340}.village-ui .account-menu-row small{color:#bdcdb6}.village-ui .account-resource-name{color:#e2dfc9}
html body.village-ui .v-pvp-banner{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:133px;text-align:center;text-shadow:0 2px 6px #183b43;margin-bottom:12px;padding:12px 5px}
html body.village-ui .v-pvp-banner small{font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#f6e6b7}html body.village-ui .v-pvp-banner h1{font:500 27px var(--font-display,Georgia);color:#fff1c5;margin:9px 0}
html body.village-ui .pv-card{padding:14px;margin-bottom:11px}html body.village-ui .pv-ti b{font:500 23px var(--font-display,Georgia);color:#fff0c5}.village-ui .pv-ti i{color:#c6d0b5}.village-ui .pv-chip{background:#173039b3;color:#e2d9ba;border-color:#a99f6d66}
html body.village-ui #clan .cw-hero{background:linear-gradient(120deg,#243c40ec,#162d30e0);border-color:#c4a96f9c;border-radius:10px}
html body.village-ui #clan .cw-team{background:repeating-linear-gradient(90deg,transparent,#90bcec0b 4px,transparent 8px),linear-gradient(100deg,#153d64,#3970a5 50%,#194367);border-radius:5px 5px 23px 5px;align-items:center;text-align:center;text-shadow:0 1px 4px #071e37;padding:12px 8px}
html body.village-ui #clan .cw-team-enemy{background:repeating-linear-gradient(90deg,transparent,#f7b5ad0b 4px,transparent 8px),linear-gradient(100deg,#5d242c,#9a524b 50%,#63242d);border-radius:5px 5px 5px 23px}
html body.village-ui .v-cw-crest{display:flex;align-items:center;justify-content:center;height:39px;margin-bottom:6px;color:#f5d995}.v-cw-crest svg{width:30px;height:30px}
html body.village-ui #clan .cw-team>small,html body.village-ui #clan .cw-tag,html body.village-ui #clan .cw-team-link{color:#eadfc1}.village-ui #clan .cw-team-name{color:#fff0d1}.village-ui #clan .cw-team>b{color:#fff2d0;font-family:Georgia,serif}
html body.village-ui #clan .cw-day-score{border-color:#bda36977}.village-ui #clan .cw-tasks{background:linear-gradient(125deg,#eee0beeF,#dec59af2)!important;color:#483922}
html body.village-ui #clan .cw-tasks h3,html body.village-ui #clan .cw-task-row b,html body.village-ui #clan .cw-personal>b{color:#4a3219}.village-ui #clan .cw-tasks small,.village-ui #clan .cw-personal{color:#786344}.village-ui #clan .cw-task-row{background:#f5e9d156;border-color:#a0844e4d}.village-ui #clan .cw-task-row strong{color:#305939}
html body.village-ui #clan .cw-screen .ar-dock-row{background:#1c342eea;border-top-color:#d0b87e77}
html body.village-ui .battle-box,html body.village-ui .inv-piece-popup,html body.village-ui .account-popup-box{background:linear-gradient(135deg,#2e4339,#162e2c);color:var(--text);border:1px solid #d0b170;box-shadow:inset 0 0 0 2px #b19a5322,0 8px 40px #0007}
html body.village-ui input,html body.village-ui textarea,html body.village-ui select{color:var(--text);background-color:#173038;border-color:#bca7778c}
html body.village-ui :is(button,[role=button],a,input,textarea,select):focus-visible{outline:2px solid #9ad8ef;outline-offset:2px}
.village-style-dialog{width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #c8ac70;border-radius:12px;background:#1e3630;color:#f9eac7;box-shadow:0 8px 50px #0008}
.village-style-dialog[open]{display:flex;flex-direction:column}.village-style-dialog::backdrop{background:#06151ec4;backdrop-filter:blur(3px)}
.village-style-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 17px;border-bottom:1px solid #baa56e73}.village-style-dialog h2{font:500 21px Georgia,serif;margin:0}.village-style-dialog [data-close]{min-width:35px;min-height:35px;border:1px solid #bba46a;border-radius:50%;background:#203b34;color:#f1d9a1;font-size:23px}
.village-style-dialog>div{padding:15px 17px;overflow:auto;min-height:0}.village-style-dialog p{font-size:12px;line-height:1.6;color:#cbd2bb;margin:0 0 13px}.village-style-dialog label{display:block;border:1px solid #ab9b6b66;background:#17342e;padding:12px;margin-top:9px;border-radius:7px;font-size:13px}.village-style-dialog input{margin-right:8px}.village-style-dialog label small{display:block;margin:6px 0 0 25px;font-size:11px;color:#bdc9af}.village-style-dialog footer{padding:12px 17px 16px;flex-shrink:0}.village-style-dialog footer button{width:100%;min-height:43px}.village-style-dialog [data-error]{color:#edba9f;margin-bottom:0}
@media(max-width:350px){html body.village-ui #app.card{padding-left:9px;padding-right:9px}.v-title h1{font-size:24px}.v-action{width:51px;min-height:48px}.v-action.ms-btn{width:51px;height:56px}.v-action>span{font-size:8px}.v-actions{gap:7px}.v-title small{font-size:7px}.v-forge{left:25%}.v-clan{left:74%}.v-location{font-size:11px;padding:7px 8px}.village-home{flex-basis:340px;min-height:340px}html body.village-ui .v-campaign.cp-arena{width:75%}#village-hud{gap:4px}#village-hud .vh-profile{gap:4px}#village-hud>span{font-size:9px!important;padding:4px!important}#village-hud .vh-avatar{width:28px;height:28px;flex-basis:28px}#village-hud .vh-name{font-size:9px}html body.village-ui[data-village-view=forge] .fg-eqgrid{grid-template-columns:55px minmax(0,1fr) 55px;grid-template-rows:repeat(4,55px);gap:8px;min-height:244px}html body.village-ui[data-village-view=forge] .fg-eqgrid>.fg-tile{width:55px;min-height:55px}html body.village-ui .v-forge-portrait{inset:0 49px}.village-ui .account-identity-top{padding-right:80px;gap:7px}.village-ui .account-village-art{width:100px;right:-3px}.village-ui .account-identity-name h2{font-size:18px}}
@media(max-height:700px){.v-title{padding-top:9px}.v-title h1{font-size:23px}.v-actions{top:54px;gap:6px}.v-action{min-height:47px}.v-action>svg{width:21px;height:21px}.v-action.ms-btn{height:54px}.v-tower{top:23%}.v-forge{top:55%}.v-clan{top:57%}.village-home{flex-basis:320px;min-height:320px}.village-ui .tabbar{min-height:55px}.village-ui .tab{min-height:44px}.village-ui .tab svg{width:22px;height:22px}.village-ui .tablabel{font-size:9px}html body.village-ui.view-home #chatstrip:not(.hidden){flex-basis:92px;min-height:84px}.village-ui .v-campaign .cp-camp-cta{min-height:44px;font-size:21px}.village-ui .v-campaign .cp-camp-stage{font-size:17px}.village-ui .v-pvp-banner{min-height:104px}.village-ui .v-pvp-banner h1{font-size:24px}}
@media(max-height:480px){#village-hud{min-height:40px;padding-bottom:5px;margin-bottom:6px}.village-ui #app.card{padding-top:5px}.village-ui .tabbar{min-height:49px;margin-top:5px}.village-ui .tab{min-height:38px}.village-ui .tab svg{width:20px;height:20px}.village-ui .tablabel{font-size:8px}html body.village-ui.view-home #chatstrip:not(.hidden){flex-basis:80px;min-height:73px;margin-top:5px}.village-ui .cs-tab{padding:4px;min-height:26px;font-size:9px}.village-ui .cs-tab svg{display:none}.village-ui .cs-row{font-size:10px}.village-ui #home .cp-info{position:sticky;top:0;z-index:4;min-height:43px;background:#163549f5}.village-ui .v-campaign{padding-bottom:3px}.village-ui .v-pvp-banner{min-height:87px}.village-ui .v-pvp-banner h1{font-size:23px}.village-style-dialog header{padding:10px 13px}.village-style-dialog h2{font-size:19px}.village-style-dialog footer{padding:10px 13px}}
@media(prefers-reduced-motion:reduce){html body.village-ui *,html body.village-ui *::before,html body.village-ui *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html body.village-ui.view-home #view{scroll-padding-top:55px;scroll-padding-bottom:8px}.village-home button,.village-home [role=button]{scroll-margin-top:5px;scroll-margin-bottom:8px}

html body.village-ui #clan .cw-team-name{font:600 16px/1.3 var(--font-display,Georgia);color:#fff0d1}

/* 352 — Gli altri luoghi del villaggio, sopra dati e controlli del gioco. */
html body.village-ui[data-village-view=pets] #app::before{background-image:url('./village/pets-v352.webp')}
html body.village-ui[data-village-view=auras] #app::before{background-image:url('./village/auras-v352.webp')}
html body.village-ui[data-village-view=skills] #app::before,html body.village-ui[data-village-view=help] #app::before{background-image:url('./village/skills-v352.webp')}
html body.village-ui[data-village-view=edifici] #app::before{background-image:url('./village/technology-v352.webp')}
html body.village-ui[data-village-view=tower] #app::before{background-image:url('./village/tower-v352.webp')}
html body.village-ui[data-village-view=robbery] #app::before,html body.village-ui[data-village-view=fire] #app::before{background-image:url('./village/robbery-v352.webp')}
html body.village-ui[data-village-view=achievements] #app::before,html body.village-ui[data-village-view=rankings] #app::before,html body.village-ui[data-village-view=admin] #app::before{background-image:url('./village/rewards-v352.webp')}
html body.village-ui[data-village-view=pets] #app::after{background:linear-gradient(#102a3299,#173f2933 28%,#11352575 65%,#122a28f0)}
html body.village-ui[data-village-view=auras] #app::after{background:linear-gradient(#14243a99,#102d333d 30%,#17273d99 68%,#111f2df0)}
html body.village-ui[data-village-view=skills] #app::after,html body.village-ui[data-village-view=edifici] #app::after{background:linear-gradient(#112a36b3,#132c3940 28%,#192c3099 65%,#101f29f0)}
html body.village-ui .v-section-banner{position:relative;display:flex;flex-direction:column;justify-content:flex-end;min-height:105px;flex-shrink:0;padding:16px 14px 13px;margin:0 0 13px;border:1px solid #d2b87aa1;border-radius:9px;background-size:cover;background-position:center 36%;box-shadow:inset 0 0 0 2px #7e744422,0 4px 12px #0003;color:#fff0c8;text-shadow:0 2px 5px #0e1d27;overflow:hidden}
html body.village-ui .v-section-banner::before{content:'';position:absolute;inset:0;z-index:0;background:linear-gradient(90deg,#0b2639d1,#112c38a6 58%,#193a4433)}
html body.village-ui .v-section-banner>*{position:relative;z-index:1}
html body.village-ui .v-section-banner>span{font-size:8px;text-transform:uppercase;letter-spacing:1.8px;color:#f6dc9f}
html body.village-ui .v-section-banner h1{font:500 25px/1.2 var(--font-display,Georgia);margin:5px 0 6px;color:#fff0cb;overflow-wrap:anywhere}
html body.village-ui .v-section-banner p{font-size:10px;line-height:1.5;margin:0;color:#e1e8d1;max-width:90%}
html body.village-ui .v-section-pets{background-image:url('./village/pets-v352.webp')}
html body.village-ui .v-section-auras{background-image:url('./village/auras-v352.webp')}
html body.village-ui .v-section-skills{background-image:url('./village/skills-v352.webp')}
html body.village-ui .v-section-technology{background-image:url('./village/technology-v352.webp')}
html body.village-ui .v-section-tower{background-image:url('./village/tower-v352.webp');background-position:center 30%}
html body.village-ui .v-section-rewards,html body.village-ui .v-section-rankings{background-image:url('./village/rewards-v352.webp')}
html body.village-ui :is(.pets-saldi,.au-saldi){padding:8px 10px;margin:0 0 9px;border:1px solid #baac768c;border-radius:7px;background:linear-gradient(#234234e8,#142f32ee);color:#fff1ca;gap:10px;font-size:12px;flex-shrink:0}
html body.village-ui :is(.pets-saldi,.au-saldi)>span{display:inline-flex;align-items:center;gap:5px}
html body.village-ui :is(#pets,#auras,#skills) .inv-grid{gap:8px;padding:7px;background:#142d2cba;border:1px solid #c3aa6a6e;border-radius:10px}
html body.village-ui :is(#pets,#auras,#skills) .inv-tile{background:linear-gradient(135deg,#355266e8,#142e3eee);box-shadow:inset 0 0 0 2px #081c273d,0 2px 5px #0005;border-radius:8px}
html body.village-ui :is(#pets,#auras,#skills) .inv-tile.eq{background:linear-gradient(135deg,#586c48f0,#293e31ef);box-shadow:inset 0 0 0 2px #ebd58b40,0 0 9px #eddc7b26}
html body.village-ui :is(#pets,#auras,#skills) .inv-tile-eq{background:#142e2eeb;color:#f2e3a8;font-size:7px;letter-spacing:.03em}
html body.village-ui :is(#pets,#auras,#skills) .inv-tile-lv{background:#142a31a6;border-radius:3px;padding:1px 3px;color:#fff1c9;text-shadow:0 1px 2px #000}
html body.village-ui :is(#pets,#auras,#skills) .inv-tile-lock{background:#102c35bf;border:1px solid #c5b17d73;color:#e4d5a8;border-radius:4px;min-width:24px;min-height:24px}
html body.village-ui :is(#pets,#auras,#skills) :is(.bld-d-sect,.cn-sec){color:#f8e7b9;font:500 16px/1.3 var(--font-display,Georgia);margin:13px 0 9px;text-shadow:0 1px 4px #092330}
html body.village-ui :is(#pets-dock,#au-dock,#sk-dock){position:relative;flex:0 0 auto;padding:9px 8px;margin-top:7px;border:1px solid #d5b87b;border-radius:9px;background:linear-gradient(120deg,#4a4b34f2,#253c32f5);box-shadow:inset 0 0 0 2px #11251d40,0 -3px 12px #11282266}
html body.village-ui :is(#pets,#auras,#skills) .au-bar{height:auto;min-height:23px;border:1px solid #b6b789;border-radius:6px;background:#0e2936;overflow:hidden;line-height:1.4}
html body.village-ui :is(#pets,#auras,#skills) .au-bar>span{font-size:9px;line-height:1.5;white-space:normal;padding:3px 5px;position:relative;display:block;color:#f4edcc}
html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions){display:grid;grid-template-columns:minmax(44px,.65fr) minmax(0,2fr) minmax(48px,.65fr);gap:7px;margin-top:8px;min-width:0}
html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions)>.btn{width:100%;max-width:100%;min-width:0;min-height:45px;padding:7px 4px;font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;display:flex;align-items:center;justify-content:center;gap:4px}
html body.village-ui #pets #pets-egg,html body.village-ui #auras #au-evoke,html body.village-ui #skills #sk-summon{background:linear-gradient(#56a0bd,#2f738b 38%,#244b65);color:#fff0c7;border:1px solid #e5cb88;box-shadow:inset 0 0 0 2px #132b3d44,0 2px 0 #785c32;white-space:normal;text-overflow:clip;overflow:visible}
html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions)>.btn svg{width:15px;height:15px;flex:0 0 15px}
html body.village-ui #pets #pets-eggs{background:#17322dd1;border:1px solid #b2a17380;border-radius:6px}
html body.village-ui #pets .eggslot{background:linear-gradient(#35523ddb,#1c352d);border-color:#c1ae748c;color:#f2e4ba;border-radius:6px}
html body.village-ui #pets .pets-mult-help{color:#ded8bd;font-size:9px;line-height:1.4;margin-top:7px}
html body.village-ui #auras .au-eq{border:1px solid var(--c,#c9af71);background:radial-gradient(ellipse at 16% 50%,#95bddc24,transparent 65%),linear-gradient(#1c3945e8,#132e36eb);border-radius:10px;padding:14px 11px;color:#fae9c4}
html body.village-ui #auras .au-eq.empty{min-height:82px;color:#d8e1cb;justify-content:center;text-align:center;font-size:12px}
html body.village-ui #auras .au-hint{background:#293c39d1;border:1px solid #baa16c80;border-radius:7px;color:#d7dfc7;padding:10px;font-size:11px;line-height:1.5}
html body.village-ui #edifici .bsummary{background:#1b3944e8;border:1px solid #bbab738c;border-radius:8px;padding:10px}
html body.village-ui #edifici .bld-grid{gap:10px;padding:0 0 4px}
html body.village-ui #edifici .bld-tile{position:relative;min-height:148px;padding:15px 10px;border:1px solid #d4b979b3;border-radius:10px;background:radial-gradient(ellipse at 50% 0,#f4d5871c,transparent 65%),linear-gradient(135deg,#3c5146ed,#193333f0);box-shadow:inset 0 0 0 3px #b59e5b18,0 4px 10px #0004;color:#f1e5bf}
html body.village-ui #edifici .bld-tile-emoji{color:#efd69a;filter:drop-shadow(0 2px 3px #0006)}
html body.village-ui #edifici .bld-tile-name{font:500 17px/1.3 var(--font-display,Georgia);color:#fff0c8;overflow-wrap:anywhere}
html body.village-ui #edifici .bld-tile-lv,html body.village-ui #edifici .bld-tile-info{color:#c8d4b8;font-size:10px;line-height:1.5}
html body.village-ui #edifici > div > .bld-d-note,html body.village-ui #edifici #edifici-body > .bld-d-note{background:#12292cee;border:1px solid #b5a16d66;border-radius:8px;padding:7px 10px;color:#e6dcc0}
html body.village-ui #edifici .tt-tree{border:1px solid #bbaa7366;border-radius:9px;background:#142e33dc;overflow:clip}
html body.village-ui #edifici .tt-link{stroke:#a49b716e}html body.village-ui #edifici .tt-link.on{stroke:#ebcb85}
html body.village-ui #edifici .tt-disc{background:linear-gradient(#3d5663,#17353e);border-color:#bfa774;box-shadow:inset 0 0 0 3px #0b27334d,0 3px 7px #0004}
html body.village-ui #edifici .tt-node.owned .tt-disc{background:linear-gradient(#776b3f,#3e4a31);border-color:#e4ca85}
html body.village-ui #edifici .tt-node.locked .tt-disc{background:#263b3b;border-color:#8e9271}
html body.village-ui #edifici .tt-lv{color:#fff0cb;background:#173039cc;border-radius:5px;padding:3px 5px}
html body.village-ui #edifici :is(.bld-back,.tt-title){color:#f5e0ad}
html body.village-ui #tower :is(.tw-hero,.tw-att){background:linear-gradient(115deg,#354a40ed,#1b3232ed);border:1px solid #c2aa73a1;box-shadow:inset 0 0 0 2px #19312633,0 3px 10px #0003;border-radius:9px}
html body.village-ui #tower .tw-hero{padding:18px 12px;margin:12px 0}.village-ui #tower .tw-foe b{color:#f3e5bd}
html body.village-ui #tower .tw-tab{padding:10px 3px;min-height:66px;border-radius:7px;background:#1f3d3bea;border-color:#b5a57288;color:#f4e8c4}
html body.village-ui #tower .tw-tab.on{border-color:#f0d397;background:linear-gradient(#5c6344,#334b35)}
html body.village-ui #tower .tw-cell{background:#15323bcc;border-color:#b5a3726e;color:#d7dfc5}
html body.village-ui #tower .tw-cell.done{background:#3f6444db;color:#f2e7be}html body.village-ui #tower .tw-cell.cur{background:#e2c375;color:#372b15;border-color:#f6e6b0}
html body.village-ui #tower .tw-go{min-height:47px;font-size:12px;padding:10px 8px;white-space:normal}
html body.village-ui #robbery :is(.rb-tile,.rb-victim,.rb-rev,.rb-hunt){border:1px solid #c5ac779c;border-radius:9px;background:linear-gradient(130deg,#354a3fed,#18352ff0);color:#f0e1ba;box-shadow:inset 0 0 0 2px #0e2a2233,0 4px 10px #0003}
html body.village-ui #robbery .rb-hunt{padding:18px 12px}.village-ui #robbery .rb-hunt-t{font:500 22px/1.3 var(--font-display,Georgia);color:#f6e5b8}
html body.village-ui #robbery>.bhead{background:linear-gradient(90deg,#112d35e8,#17372cb3),url('./village/robbery-v352.webp') center 38%/cover;padding:12px 10px;border:1px solid #c9af75a1;border-radius:8px;min-height:82px}
html body.village-ui #robbery :is(.rb-stats,.rb-bottom){background:#19362eeb;border-color:#b8a47188}
html body.village-ui #arena .ar-crest-head{background:linear-gradient(100deg,#112d3aeb,#163b42c2),url('./village/arena-v3.webp') center 40%/cover;border:1px solid #cfb57c9c;border-radius:10px;margin:3px 0 10px;padding:12px 10px 9px;box-shadow:inset 0 0 0 2px #d8c38815}
html body.village-ui #arena .ar-league-name{font-family:var(--font-display,Georgia);font-size:18px;color:#f5e3ba}
html body.village-ui #arena .ar-row,html body.village-ui #rankings .rk-row{background:linear-gradient(100deg,#2b4638eb,#19352ce8);border:1px solid #9d9c686b;border-radius:7px;color:#f3e4bd}
html body.village-ui #arena .ar-row.me,html body.village-ui #rankings .rk-row.me{background:linear-gradient(100deg,#6d6540,#334b35);border-color:#dec482}
html body.village-ui #arena .ar-dock{background:#18352feF;border:1px solid #c1a97296;border-radius:8px;padding:8px}
html body.village-ui #arena .ar-dock-row{display:grid;grid-template-columns:minmax(44px,.7fr) minmax(0,1.7fr) minmax(44px,.7fr);gap:7px;width:100%;min-width:0}
html body.village-ui #arena .ar-dock-row .btn{width:100%;min-width:0;max-width:100%;padding:8px 4px;min-height:43px;white-space:normal;font-size:11px}
html body.village-ui #rankings :is(.chip,.ar-lbtn){min-height:39px;color:#e9dfbe;background:#244437de;border-color:#c1ae7880;border-radius:7px}
html body.village-ui #rankings .chip.active{background:linear-gradient(#6f6a43,#3d5337);border-color:#e7cf8c;color:#fff0c2}
html body.village-ui #achievements .ach-tabs{gap:7px;background:#19352ef0;border:1px solid #baaa718c;border-radius:8px;padding:5px}
html body.village-ui #achievements .ach-tab{color:#e1d8b7;background:none;border-radius:5px;min-height:43px;padding:8px 4px;font-size:11px;line-height:1.4;white-space:normal}
html body.village-ui #achievements .ach-tab.on{background:linear-gradient(#73613deb,#3c5036);color:#ffe9ae;border-color:#e7c780}
html body.village-ui #achievements .ach-row{position:relative;padding:15px 13px;border:1px solid #baa36c9e;background:linear-gradient(120deg,#f0e3c7f5,#dfc9a6f5);color:#48371f;border-radius:9px;box-shadow:inset 0 0 0 2px #b49a6833,0 3px 7px #0003}
html body.village-ui #achievements .ach-row.ach-ready{border-color:#f2d390;box-shadow:inset 0 0 0 2px #b49a6833,0 0 10px #e8d27f22}
html body.village-ui #achievements .ach-title{color:#4d351c;font:600 16px/1.3 var(--font-display,Georgia)}
html body.village-ui #achievements :is(.ach-row .ach-note,.ach-row .ach-progress-text,.ach-row .ach-category-label){color:#705b3b}
html body.village-ui #achievements .ach-reward{background:#65532b1a;border:1px solid #9d805652;color:#4e3a1a;border-radius:5px;padding:5px 7px}
html body.village-ui #achievements :is(.ach-overview,.ach-actions,.ach-pass-summary){border-color:#bfa9728c;background:#18382fe8;color:#efe3bc;border-radius:7px;padding:10px}
html body.village-ui #achievements .ach-bar{background:#8a794b44;border:1px solid #a7956455;height:8px}
html body.village-ui #achievements .ach-bar i{background:linear-gradient(#8db270,#476e44)}
html body.village-ui #achievements :is(input,select){min-height:42px;border-color:#c0ac7580;border-radius:7px;background:#183a3a;color:#efe3be}
html body.village-ui :is(.ms-box,.bonus-box,.prod-box){border-color:#cfb276;background:linear-gradient(130deg,#2c4438,#15312c)}
html body.village-ui .ms-box .ms-head{background:linear-gradient(100deg,#102c3eeb,#1a3546a1),url('./village/skills-v352.webp') center 45%/cover;border-bottom:1px solid #c5ac79;padding:13px 11px;min-height:55px;color:#f6e4b7}
html body.village-ui .ms-box :is(.ms-row,.ms-live,.ms-team,.ms-slot){background:#214237d9;color:#efe3bc;border-color:#b8a27080;border-radius:7px}
html body.village-ui .ms-box .ms-tab{color:#dfdac1;background:#1b382f;border-color:#9d966479;min-height:39px}
html body.village-ui .ms-box .ms-tab.on{color:#ffedb9;background:#635f38;border-color:#e4ce8b}
html body.village-ui .ms-chip{border-radius:5px;background:#e7d6911a;border-color:#d5ba7566;color:#f2dfb2;padding:3px 5px}
html body.village-ui .bonus-box>.fg-swap-title,html body.village-ui .prod-box>.fg-swap-title{background:linear-gradient(95deg,#142e35dd,#1d3a3399),url('./village/rewards-v352.webp') center 45%/cover;border:1px solid #cbb37d80;border-radius:7px;padding:16px 11px;min-height:65px;color:#fff0c5;font:500 23px/1.3 var(--font-display,Georgia)}
html body.village-ui .bonus-cell{border:1px solid #baa16d8c;border-radius:9px;background:linear-gradient(#3a5140d9,#203b32e6);padding:9px 5px;color:#f4e4ba}
html body.village-ui .support-center{background:linear-gradient(120deg,#1e3b34fa,#142a2cfc);border:1px solid #b5a16d8c;border-radius:10px;color:#f1e3bb;box-shadow:0 6px 18px #0005}html body.village-ui :is(.support-card,.support-ticket-row,.help-chapter){background:linear-gradient(120deg,#34493ced,#1a352ef0);border:1px solid #b5a16d8c;border-radius:8px;color:#f1e3bb}
html body.village-ui :is(.support-ticket-row,.support-ticket-history) small{color:#bdccb1}
html body.village-ui .dm-head,html body.village-ui .cn-chat-bar{background:#17332ff0;border-color:#b5a47166}html body.village-ui #gc-scroll,html body.village-ui #cn-chat-scroll{background:#10262af2;border-color:#b5a47166}html body.village-ui .cn-chat-bar textarea,html body.village-ui #clan .cn-chat-bar textarea{background:#10262af2!important;border-color:#b5a47180;color:#f0e3bf}html body.village-ui .chat-row.them .chat-m{background:#24443eef;border-color:#b5a4715c;color:#f4e8c8}html body.village-ui .chat-day span,html body.village-ui .chat-sys span{background:#17332fe6;border-color:#b5a47166;color:#d8c99b}html body.village-ui .dm-name b,html body.village-ui .dm-ct-top b{font-family:var(--font-display,Georgia);font-weight:600;color:#fff0c8}

html body.village-ui #chat :is(.chat-switch,.csw-tab){border-color:#c8ae7873;color:#eddfb9;background:#224036d9}
html body.village-ui :is(#help,#admin)>.bhead{border-bottom:1px solid #d2b97c80;background:linear-gradient(110deg,#16313fdb,#1e3d2c90);padding:12px;border-radius:8px;min-height:74px}
html body.village-ui #admin :is(.ad-card,.admin-card,.ad-player){border:1px solid #bda56c80;background:#1b3830ed;color:#f0e5c7;border-radius:7px}
html body.village-ui .battle-popup.inv-piece-popup{background:#06161dc7;border:0;box-shadow:none}
html body.village-ui .v-ui-popup>.battle-box{max-height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-top:18px;padding-right:16px}
html body.village-ui .v-ui-popup .fg-swap-title{padding-right:28px;line-height:1.4;color:#f7e4b9}
html body.village-ui .v-overlay-close{position:fixed;z-index:3;display:flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;min-height:42px;background:#18382ff5;border:1px solid #dbbd7b;border-radius:50%;color:#ffe6ad;font:400 26px/1 system-ui;box-shadow:0 2px 8px #0005;padding:0;cursor:pointer}
@media(max-width:350px){html body.village-ui .v-section-banner{padding:13px 11px;min-height:94px;margin-bottom:10px}.village-ui .v-section-banner h1{font-size:22px!important}.village-ui .v-section-banner p{font-size:9px!important;max-width:96%}html body.village-ui :is(#pets,#auras,#skills) .inv-grid{gap:6px;padding:6px}html body.village-ui #edifici .bld-tile{min-height:135px;padding:13px 8px}html body.village-ui #edifici .bld-tile-name{font-size:15px}html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions){gap:5px;grid-template-columns:minmax(42px,.6fr) minmax(0,2fr) minmax(46px,.65fr)}html body.village-ui #achievements .ach-tab{font-size:10px}html body.village-ui #arena .ar-dock-row .btn{font-size:10px}html body.village-ui #arena .ar-dock-row .btn svg{width:14px;height:14px}}
@media(max-height:700px){html body.village-ui .v-section-banner{min-height:84px;padding:12px 11px;margin-bottom:10px}.village-ui .v-section-banner h1{font-size:22px!important}.village-ui .v-section-banner p{font-size:9px!important}html body.village-ui #arena .ar-crest-head{padding:8px 8px 6px;margin-bottom:8px}html body.village-ui :is(#pets-dock,#au-dock,#sk-dock){padding:7px;margin-top:5px}html body.village-ui :is(#pets,#auras,#skills) :is(.pets-saldi,.au-saldi){padding:6px 9px;margin-bottom:6px}}
@media(max-height:480px){html body.village-ui .v-section-banner{min-height:67px;padding:9px 10px;margin-bottom:8px}.village-ui .v-section-banner h1{font-size:19px!important;margin:3px 0!important}.village-ui .v-section-banner>span{font-size:7px!important}.village-ui .v-section-banner p{font-size:8px!important}html body.village-ui[data-village-view=pets] #village-hud,html body.village-ui[data-village-view=auras] #village-hud,html body.village-ui[data-village-view=skills] #village-hud{display:none}html body.village-ui :is(#pets-dock,#au-dock,#sk-dock){padding:5px 6px;margin-top:4px}html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions){margin-top:5px;gap:5px}html body.village-ui :is(#pets,#auras,#skills) :is(.pets-actions,.au-actions)>.btn{min-height:39px;padding:6px 3px;font-size:10px}html body.village-ui #pets .pets-mult-help{font-size:8px;line-height:1.3;margin-top:4px}html body.village-ui #pets #pets-eggs{margin-bottom:4px;padding:2px}html body.village-ui #pets #pets-eggs .eggslot{min-height:35px;padding:2px}html body.village-ui #pets #pets-eggs .es-timer{font-size:8px}html body.village-ui :is(#pets,#auras,#skills) .au-bar{min-height:18px}html body.village-ui :is(#pets,#auras,#skills) .au-bar>span{font-size:8px;padding:2px 3px}html body.village-ui #arena .ar-crest-head{padding:5px;margin-bottom:5px}html body.village-ui #arena .ar-crest{width:43px;height:49px}html body.village-ui #arena .ar-league-name{font-size:14px}html body.village-ui #arena .ar-season{font-size:9px}.village-ui #arena .ar-mystats{font-size:9px}.village-ui #arena .ar-dock-row .btn{min-height:38px!important}html body.village-ui .v-ui-popup .battle-box{padding-top:13px}html body.village-ui .v-overlay-close{width:38px;height:38px;min-width:38px;min-height:38px;font-size:24px}}
html body.village-ui :is(#pets,#auras,#skills) :is(.fg-none,.rb-empty){padding:10px;border:1px solid #b8a47270;border-radius:7px;background:#17332fee;color:#e3dfc8;font-size:11px;line-height:1.5}
html body.village-ui #edifici .bsummary{gap:6px}
html body.village-ui #tower .tw-hint{padding:6px 8px;border-radius:5px;background:#142f2edb;color:#dedec3;line-height:1.5}
html body.village-ui #achievements .ach-row .ach-link{color:#245365;font-weight:600}

/* 353 — Standalone loot art fills its own square instead of an avatar crop. */
html body.village-ui .v-item-art{object-fit:contain;filter:drop-shadow(0 2px 2px #091c2770);flex-shrink:0;vertical-align:middle}
html body.village-ui .fg-swap-art>.v-item-art{width:94px;height:94px;max-width:100%;max-height:100%}
html body.village-ui .fg-cat-art>.v-item-art{width:43px;height:43px}
html body.village-ui[data-village-view=forge] .fg-tile-art>.v-item-art{width:44px;height:44px;max-width:44px;max-height:44px}

/* 354 — Dialog structure from the approved test bot: fixed header/footer,
   centered item, readable comparison, and a scrollable content area. */
html body.village-ui .v-forge-overlay{padding:18px 14px;background:#041011bd}
html body.village-ui .v-forge-overlay>.v-forge-dialog{display:flex;flex-direction:column;width:min(420px,calc(100vw - 28px));max-width:420px;max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);min-height:0;overflow:hidden;padding:0;border:1px solid #c3a05a;border-radius:15px;background:linear-gradient(145deg,#263c3a,#142726);box-shadow:0 10px 60px #000a;text-align:left;color:#f5eacb}
html body.village-ui .v-forge-dialog .vf-dialog-head{flex:0 0 auto;padding:19px 60px 12px 18px;border-bottom:1px solid #a58c5b55;min-width:0}
html body.village-ui .v-forge-dialog .vf-dialog-head small{display:block;font:400 8px/1.6 system-ui;letter-spacing:2px;color:#c8af74}
html body.village-ui .v-forge-dialog .vf-dialog-head h2{font:500 23px/1.25 Georgia,serif;margin:5px 0 0;color:#fff0cf;overflow-wrap:anywhere;text-transform:none;letter-spacing:normal}
html body.village-ui .v-forge-dialog .vf-dialog-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:17px 18px;color:#d7e1d2;font:400 13px/1.7 system-ui;-webkit-overflow-scrolling:touch}
html body.village-ui .v-forge-dialog .vf-dialog-foot{padding:12px 18px 18px;flex:0 0 auto;border-top:1px solid #a58c5b55}
html body.village-ui .v-forge-dialog .vf-dialog-foot .fg-swap-actions{margin:0;display:block;padding:0}
html body.village-ui .v-forge-dialog .vf-dialog-foot .btn{width:100%;font-size:13px;min-height:43px;margin:0;color:#36220b;border:1px solid #fff1b7;border-radius:9px;background:linear-gradient(#fff0b4 0%,#eec858 20%,#e3ac36 70%,#eec95c);box-shadow:inset 0 0 0 3px #8f672344,inset 0 -4px 0 #9b6e2b55,0 3px 0 #65451d;font-weight:750}
html body.village-ui .v-forge-overlay>.v-overlay-close{width:36px;height:36px;min-width:36px;min-height:36px;border-radius:50%;border:1px solid #c7ac6a99;background:#28423c;color:#f4dfad;font-size:24px;box-shadow:none}
html body.village-ui .vf-managed-item{text-align:center}
html body.village-ui .vf-item-art{display:grid;place-items:center;width:112px;height:112px;margin:0 auto 12px;border:3px solid var(--vf-rarity,#a6b9cc);border-radius:12px;background:radial-gradient(ellipse at 40% 20%,#aec8cf2b,transparent 66%),linear-gradient(145deg,#354d61e6,#122633);box-shadow:inset 0 0 0 3px #0a182733,0 3px 8px #0005}
html body.village-ui .vf-item-art>.v-item-art{width:112px;height:112px;max-width:100%;max-height:100%}
html body.village-ui .vf-rarity{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px}
html body.village-ui .vf-managed-item h3{font:500 18px/1.3 Georgia,serif;color:#f7dfaf;margin:7px 0 10px}
html body.village-ui .vf-comparison{margin:14px 0 13px;border:1px solid #a4b4a454;background:#142b2e88;border-radius:8px;padding:12px;text-align:left}
html body.village-ui .vf-comparison table{width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}
html body.village-ui .vf-comparison caption{text-align:left;font-size:10px;color:#c2cdb6;padding-bottom:7px}
html body.village-ui .vf-comparison th,html body.village-ui .vf-comparison td{padding:7px 3px;overflow-wrap:anywhere;vertical-align:middle}
html body.village-ui .vf-comparison thead th{font-size:9px;color:#c2cdb6;font-weight:400;text-align:right;line-height:1.5}
html body.village-ui .vf-comparison thead th:first-child{width:43%;text-align:left}
html body.village-ui .vf-comparison tbody th{font-size:10px;color:#dce4d1;font-weight:400;line-height:1.5}
html body.village-ui .vf-comparison tbody th .ic{width:12px;height:12px;vertical-align:middle}
html body.village-ui .vf-comparison td{font-size:15px;color:#f5e6bd;text-align:right;line-height:1.4}
html body.village-ui .vf-comparison tr+tr{border-top:1px solid #a4b4a422}
html body.village-ui .vf-comparison .arr-up{color:#b4e6a6}.village-ui .vf-comparison .arr-down{color:#efb09e}
html body.village-ui .vf-current{font-size:10px;line-height:1.5;color:#b9c9b5;margin:7px 0 0;padding-top:7px;border-top:1px solid #a4b4a42e;overflow-wrap:anywhere}
html body.village-ui .vf-item-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:12px}
html body.village-ui .vf-item-actions .btn{flex:1;min-width:110px;min-height:43px;font-size:12px;padding:9px 8px;margin:0;white-space:normal}
html body.village-ui .vf-item-actions #fg-sw-equip{color:#fff0c6;background:linear-gradient(#509cc6,#2e79b5 35%,#20528b);border:1px solid #e6cd89;box-shadow:inset 0 0 0 2px #102c3744,0 2px 0 #65451d}
html body.village-ui .vf-item-actions #fg-sw-sell{color:#f0d3a2;background:linear-gradient(#69563b66,#3f342f77);border:1px solid #ad935e99;box-shadow:none}
html body.village-ui .vf-item-note{font-size:10px;line-height:1.5;margin:12px 0 2px;color:#bbc9b3}
html body.village-ui .v-forge-dialog .fg-auto-top{display:none}
html body.village-ui .v-forge-dialog .fg-auto-foot{position:static;background:none;padding:0;margin:10px 0 0}
html body.village-ui .v-forge-dialog .fg-auto-row{border-radius:7px;background:#1a322da6;padding:9px 7px;margin:6px 0}
html body.village-ui .v-forge-dialog .fg-slotbox,html body.village-ui .v-forge-dialog .fg-cat-list{border-color:#a4b4a454;border-radius:8px;background:#142b2e88}
html body.village-ui .v-forge-dialog .fg-cat-row{min-height:42px;background:#203b34;border-radius:7px;color:#eadfc3}
html body.village-ui .v-forge-dialog .fg-cat-name{color:#efe4c7;overflow-wrap:anywhere}
html body.village-ui .v-forge-dialog .fg-cat-piece{gap:7px;padding:8px 5px}
html body.village-ui .v-forge-dialog .fg-cat-skill{color:#d8e1ce}
html body.village-ui .v-forge-dialog .tn-desc,html body.village-ui .v-forge-dialog .binfo{font-size:12px;line-height:1.65;color:#c2cfbb}
@media(max-height:520px){html body.village-ui .v-forge-dialog .vf-dialog-head{padding-top:12px;padding-bottom:9px}html body.village-ui .v-forge-dialog .vf-dialog-head h2{font-size:18px}html body.village-ui .v-forge-dialog .vf-dialog-body{padding-top:10px;padding-bottom:12px}html body.village-ui .v-forge-dialog .vf-dialog-foot{padding-top:9px;padding-bottom:12px}html body.village-ui .vf-item-art{width:72px;height:72px;margin-bottom:8px}html body.village-ui .vf-managed-item h3{font-size:16px}html body.village-ui .vf-comparison{padding:8px;margin:10px 0}html body.village-ui .vf-comparison th,html body.village-ui .vf-comparison td{padding-top:5px;padding-bottom:5px}html body.village-ui .vf-item-actions .btn{min-height:38px}html body.village-ui .v-forge-dialog .vf-dialog-foot .btn{min-height:36px}}
/* The reference dialog opens without scaling its fixed header or close control. */
html body.village-ui .v-forge-overlay,html body.village-ui .v-forge-overlay>*{animation:none}

/* 355 — Equipment and candidate are presented in the same left/right order as their stats. */
html body.village-ui .vf-item-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start;margin-bottom:15px}
html body.village-ui .vf-item-column{min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}
html body.village-ui .vf-pair-label{font:600 10px/1.5 system-ui;color:#e4d4ad;margin-bottom:10px;min-height:15px}
html body.village-ui .vf-item-column .vf-item-art{width:96px;height:96px;max-width:100%;margin:0 auto 9px;flex:0 0 auto}
html body.village-ui .vf-item-column .vf-item-art>.v-item-art{width:96px;height:96px}
html body.village-ui .vf-item-column h3{font:500 15px/1.35 Georgia,serif;overflow-wrap:anywhere;margin:0 0 6px;color:#f7dfaf}
html body.village-ui .vf-item-column .vf-rarity{font-size:9px;letter-spacing:.8px;line-height:1.5}
html body.village-ui .vf-item-column>small{font:400 10px/1.5 system-ui;color:#bcccb8;margin-top:3px;overflow-wrap:anywhere}
html body.village-ui .vf-empty-item{border-style:dashed;background:#19323599;box-shadow:none;color:#9baeaa}
html body.village-ui .vf-empty-item>.ic{width:38px;height:38px;opacity:.55}
@media(max-height:520px){html body.village-ui .vf-item-pair{gap:10px;margin-bottom:10px}html body.village-ui .vf-pair-label{margin-bottom:6px}html body.village-ui .vf-item-column .vf-item-art{width:64px;height:64px;margin-bottom:6px}html body.village-ui .vf-item-column h3{font-size:13px;margin-bottom:4px}html body.village-ui .vf-item-column>small{font-size:9px}html body.village-ui .vf-item-column .vf-rarity{font-size:8px}}

/* 356 — Photos are accessible controls; details only describe the selected piece. */
html body.village-ui .vf-item-photo{position:relative;appearance:none;padding:0;cursor:pointer;color:inherit;touch-action:manipulation}
html body.village-ui .vf-item-photo:focus-visible{outline:3px solid #93d6ff;outline-offset:3px}
html body.village-ui .vf-item-photo:active{filter:brightness(1.15)}
html body.village-ui .vf-photo-info{position:absolute;right:4px;bottom:4px;display:grid;place-items:center;width:18px;height:18px;background:#142c36ed;border:1px solid #c3ae79;border-radius:50%;color:#f6dfab;pointer-events:none}
html body.village-ui .vf-photo-info>.ic{width:12px;height:12px}
html body.village-ui .vf-piece-detail{text-align:center}
html body.village-ui .vf-detail-meta{font-size:12px;line-height:1.7;color:#e5dec2;margin:0 0 12px}
html body.village-ui .vf-detail-description{font-size:12px;line-height:1.65;color:#bacbb6;margin:12px 0}
html body.village-ui .vf-detail-stats{margin:14px 0;border:1px solid #a4b4a454;border-radius:8px;background:#142b2e88;padding:4px 12px;text-align:left;font-variant-numeric:tabular-nums}
html body.village-ui .vf-detail-stats>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0}
html body.village-ui .vf-detail-stats>div+div{border-top:1px solid #a4b4a42e}
html body.village-ui .vf-detail-stats dt{font-size:12px;color:#c8d3bd;line-height:1.5}
html body.village-ui .vf-detail-stats dd{font-size:18px;color:#f7e7ba;line-height:1.5;margin:0;overflow-wrap:anywhere}
html body.village-ui .vf-detail-stats .ic{width:15px;height:15px;vertical-align:middle}
html body.village-ui .vf-detail-abilities{text-align:left;margin:16px 0}
html body.village-ui .vf-detail-abilities h3{font:500 18px/1.4 Georgia,serif;color:#f7dfaf;margin:0 0 8px}
html body.village-ui .vf-detail-abilities ul{margin:0;padding:0;list-style:none}
html body.village-ui .vf-detail-abilities li{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #a4b4a42e;padding:9px 0;font-size:12px;line-height:1.5;color:#d7e1ce}
html body.village-ui .vf-detail-abilities li .ic{width:14px;height:14px;vertical-align:middle}
html body.village-ui .vf-detail-abilities strong{white-space:nowrap;color:#f7e7ba;font-size:14px}
html body.village-ui .vf-detail-abilities p{font-size:12px;color:#bacbb6;margin:0}
/* 357 — The former Aura slot is the single equipped horse. Pets keep their own slots. */
html body.village-ui[data-village-view=auras] #app::before{background-image:url('./village/pets-v352.webp')}
html body.village-ui .v-section-auras{background-image:url('./village/pets-v352.webp')}
html body.village-ui #auras .inv-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html body.village-ui #auras .au-tile{height:auto;min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:10px 7px 30px;overflow:hidden;gap:3px}
html body.village-ui #auras .au-tile>.inv-tile-art{position:static;width:100%;height:86px;flex:0 0 auto;display:flex;align-items:center;justify-content:center}
html body.village-ui #auras .mount-tile-name{font:500 13px/1.35 Georgia,serif;color:#f5e7c0;overflow-wrap:anywhere;max-width:100%}
html body.village-ui #auras .mount-tile-rarity{font:400 9px/1.4 system-ui;color:#c3d0b9}
html body.village-ui #auras .au-tile .inv-tile-eq{top:5px;bottom:auto;right:5px;left:auto;font-size:6px;padding:2px 3px}
html body.village-ui #auras .au-tile .inv-tile-skill{white-space:normal;line-height:1.3;font-size:8px;padding:3px;max-width:100%;overflow-wrap:anywhere}
html body.village-ui #auras .au-eq{gap:10px}
html body.village-ui #auras .au-eq-t{flex:1;min-width:0;overflow-wrap:anywhere}
html body.village-ui #auras .au-eq-t .au-ab{font-size:10px;line-height:1.4}

/* v244.345: il personaggio della Forgia è toccabile: apre/chiude il riepilogo attrezzatura */
html body.village-ui .v-forge-portrait{pointer-events:auto;cursor:pointer}

/* The painting stays registered to the interface; only its local details move. */
html body.village-ui[data-village-view=home] #app::before{animation:none;transform:none;will-change:auto}
#village-scenery{position:absolute;inset:0;z-index:-2;overflow:hidden;pointer-events:none;contain:paint}
#village-scenery .v-scenery-svg{position:absolute;display:block;max-width:none;overflow:hidden;pointer-events:none}
.v-flame{transform-box:fill-box;transform-origin:50% 100%;animation:vForgeFlame 1.2s ease-in-out infinite alternate}
.v-flame-b{animation-duration:.83s;animation-delay:-.4s}
@keyframes vForgeFlame{0%{transform:skewX(-5deg) scaleY(.88);opacity:.65}45%{transform:skewX(3deg) scaleY(1.05);opacity:1}100%{transform:skewX(-2deg) scaleY(.95);opacity:.8}}
.v-forge-glow{animation:vForgeGlow 1.7s ease-in-out infinite alternate;mix-blend-mode:screen}
@keyframes vForgeGlow{0%,100%{opacity:.45}30%{opacity:.9}65%{opacity:.6}}
.v-forge-ember{opacity:0;animation:vForgeEmber 2.8s ease-out var(--ember-delay) infinite}
@keyframes vForgeEmber{0%{opacity:0;transform:translate(0,0)}20%{opacity:.8}100%{opacity:0;transform:translate(var(--ember-drift),-48px)}}
.v-water-foam{transform-box:fill-box;transform-origin:center;animation:vWaterFoam 2.3s ease-in-out infinite alternate}
@keyframes vWaterFoam{from{transform:scaleX(.85);opacity:.12}to{transform:scaleX(1.15);opacity:.35}}
#village-scenery.is-paused *,body[data-app-hidden=true] #village-scenery *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){#village-scenery .v-scenery-effects{display:none}}

/* v244.354: popup Forgia compatto su schermi più bassi (iPad/mini app): il confronto entra senza scorrere */
@media(max-height:860px){html body.village-ui .v-forge-dialog .vf-dialog-head{padding-top:11px;padding-bottom:8px}html body.village-ui .v-forge-dialog .vf-dialog-head h2{font-size:19px}html body.village-ui .v-forge-dialog .vf-dialog-body{padding-top:11px;padding-bottom:10px}html body.village-ui .v-forge-dialog .vf-item-art,html body.village-ui .v-forge-dialog .vf-item-art>.v-item-art{width:76px;height:76px}html body.village-ui .v-forge-dialog .vf-item-art{margin-bottom:6px}html body.village-ui .v-forge-dialog .vf-managed-item h3{font-size:16px;margin:4px 0 6px}html body.village-ui .v-forge-dialog .vf-comparison{margin:8px 0;padding:8px 10px}html body.village-ui .v-forge-dialog .vf-comparison th,html body.village-ui .v-forge-dialog .vf-comparison td{padding:4px 3px}html body.village-ui .v-forge-dialog .vf-item-actions{margin-top:8px}html body.village-ui .v-forge-dialog .vf-item-note{display:none}}

html body.village-ui .v-forge-dialog .vf-dialog-foot .vf-item-actions{margin:0;gap:8px;flex-wrap:nowrap}
html body.village-ui .v-forge-dialog .vf-dialog-foot .vf-item-actions .btn{width:auto;flex:1 1 0;min-width:0}
html body.village-ui .v-forge-dialog .vf-dialog-foot #fg-sw-stopauto{width:100%;margin:8px 0 0;min-height:38px;color:#f0d3a2;background:linear-gradient(#69563b66,#3f342f77);border:1px solid #ad935e99;box-shadow:none}
@media(max-height:860px){html body.village-ui .v-forge-dialog .vf-dialog-foot{padding:8px 14px 12px}html body.village-ui .v-forge-dialog .vf-dialog-foot .btn{min-height:40px}}

/* Home ambience: only the painted backdrop moves; controls and chat stay fixed. */
html body.village-ui[data-village-view=home] #app::before{transform-origin:50% 48%;animation:vHomeBreeze 32s ease-in-out infinite alternate;will-change:transform}
@keyframes vHomeBreeze{from{transform:scale(1.018) translate3d(-.15%,0,0)}to{transform:scale(1.03) translate3d(.15%,-.2%,0)}}
.v-home-atmosphere{position:absolute;inset:65px 65px 90px;overflow:hidden;pointer-events:none;z-index:-1}
.v-home-atmosphere i{position:absolute;left:var(--x);top:var(--y);width:3px;height:3px;border-radius:50%;background:#ffeab3;box-shadow:0 0 7px 2px #ffdb8155;opacity:0;animation:vHomeMote var(--duration) ease-in-out var(--delay) infinite}
.v-home-atmosphere i:nth-child(1){--x:13%;--y:44%;--duration:11s;--delay:-3s}
.v-home-atmosphere i:nth-child(2){--x:68%;--y:28%;--duration:14s;--delay:-8s}
.v-home-atmosphere i:nth-child(3){--x:43%;--y:65%;--duration:13s;--delay:-5s}
.v-home-atmosphere i:nth-child(4){--x:87%;--y:52%;--duration:16s;--delay:-11s}
.v-home-atmosphere i:nth-child(5){--x:30%;--y:12%;--duration:15s;--delay:-7s}
@keyframes vHomeMote{0%,100%{opacity:0;transform:translate3d(0,6px,0)}35%,65%{opacity:.55}90%{opacity:0;transform:translate3d(7px,-18px,0)}}
body[data-app-hidden=true] #app::before,body[data-app-hidden=true] .v-home-atmosphere i{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){html body.village-ui[data-village-view=home] #app::before{animation:none;transform:none;will-change:auto}.v-home-atmosphere{display:none}}
