/* Experimental modern skin. Classic mode keeps the original styles. */
.graphics-theme-control { display: inline-block; white-space: nowrap; }
.graphics-theme-control select { font: inherit; color: #463621; background: #f5edd7; border: 1px solid #a78d65; border-radius: 3px; padding: 2px 4px; }
html.theme-modern body { color: #42372a; }
html.theme-modern body:not(.village1):not(.village2) #contentOuterContainer .contentContainer { background-color: #faf7ed; box-shadow: 0 3px 14px rgba(39, 28, 16, .35); }
html.theme-modern #content h1.titleInHeader { color: #5e4a35; text-shadow: 0 1px #fff8e6; }
html.theme-modern #content table { border-collapse: collapse; }
html.theme-modern #content table th { background-color: #d8c7a8; color: #49392a; }
html.theme-modern #content table td { border-color: #e3d8c3; }
html.theme-modern #content table tbody tr:nth-child(even) td { background-color: rgba(240, 232, 211, .45); }
html.theme-modern #content a { color: #718a36; }
html.theme-modern #content input[type=text], html.theme-modern #content input[type=number], html.theme-modern #content textarea, html.theme-modern #content select { border: 1px solid #bbad92; border-radius: 3px; background-color: #fffdf7; color: #42372a; }
html.theme-modern #content input[type=text]:focus, html.theme-modern #content textarea:focus { outline: 2px solid #9daf65; outline-offset: 1px; }
html.theme-modern #content button, html.theme-modern #content input[type=submit] { cursor: pointer; }
html.theme-modern #content .subNavi .active .content { filter: sepia(.2) saturate(1.2); }

/* Modern resource landscape; the original resource map and hit areas remain in place. */
html.theme-modern body.village1 { background-color: #657c34; background-image: none; }
html.theme-modern body.village1 #wrapper { background-image: url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg); background-position: center 65px; background-repeat: no-repeat; }

html.theme-modern body.village2 { background-color: #657c34; background-image: none; }
html.theme-modern body.village2 #wrapper { background-image: url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg); background-position: center 65px; background-repeat: no-repeat; }

/* Modern resource fields use the same 18 clickable areas as the classic map. */
html.theme-modern body.village1 #village_map.f1 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField1.png); }
html.theme-modern body.village1 #village_map.f2 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField2.png); }
html.theme-modern body.village1 #village_map.f3 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField3.png); }
html.theme-modern body.village1 #village_map.f4 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField4.png); }
html.theme-modern body.village1 #village_map.f5 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField5.png); }
html.theme-modern body.village1 #village_map.f6 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField6.png); }
html.theme-modern body.village1 #village_map.f7 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField7.png); }
html.theme-modern body.village1 #village_map.f8 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField8.png); }
html.theme-modern body.village1 #village_map.f9 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField9.png); }
html.theme-modern body.village1 #village_map.f10 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField10.png); }
html.theme-modern body.village1 #village_map.f11 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField11.png); }
html.theme-modern body.village1 #village_map.f12 { --modern-resource-field: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/resourceField12.png); }
html.theme-modern body.village1 #village_map.tribe-1 { --modern-village-center: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/tribeSpecificCenter/villageCenter_vid1.png); }
html.theme-modern body.village1 #village_map.tribe-2 { --modern-village-center: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/tribeSpecificCenter/villageCenter_vid2.png); }
html.theme-modern body.village1 #village_map.tribe-3 { --modern-village-center: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/tribeSpecificCenter/villageCenter_vid3.png); }
html.theme-modern body.village1 #village_map.tribe-0 { --modern-village-center: url(../gpack/modern-reference/img_ltr/themes/default/background/resourceFields/tribeSpecificCenter/villageCenter_vid3.png); }
html.theme-modern body.village1 #village_map:is(.tribe-0,.tribe-1,.tribe-2,.tribe-3):is(.f1,.f2,.f3,.f4,.f5,.f6,.f7,.f8,.f9,.f10,.f11,.f12) { background-image: none; }
html.theme-modern body.village1 #village_map:is(.tribe-0,.tribe-1,.tribe-2,.tribe-3):is(.f1,.f2,.f3,.f4,.f5,.f6,.f7,.f8,.f9,.f10,.f11,.f12)::before { content: ''; position: absolute; width: 473px; height: 304px; top: 52px; left: -6px; background-image: var(--modern-village-center), var(--modern-resource-field); background-repeat: no-repeat; pointer-events: none; }
html.theme-modern[dir=rtl] body.village1 #village_map:is(.tribe-0,.tribe-1,.tribe-2,.tribe-3)::before { left: 17px; transform: scaleX(-1); }

/* Modern village building sprites, scoped to the selected tribe. */
html.theme-modern body.village2 #village_map.tribe-1 img.building.g10 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g10.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g11 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g11.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g13 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g13.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g14 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g14.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g15 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g15.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g17 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g17.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g18 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g18.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g19 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g19.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g20 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g20.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g21 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g21.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g22 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g22.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g23 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g23.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g24 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g24.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g25 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g25.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g26 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g26.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g27 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g27.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g28 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g28.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g29 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g29.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g30 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g30.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g34 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g34.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g37 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g37.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g38 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g38.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g39 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g39.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g41 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g41.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g46 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g46.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g5 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g5.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g6 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g6.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g7 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g7.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g8 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g8.png); }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g9 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g9.png); }
html.theme-modern[dir=rtl] body.village2 #village_map.tribe-1 img.building:is(.g10,.g11,.g13,.g14,.g15,.g17,.g18,.g19,.g20,.g21,.g22,.g23,.g24,.g25,.g26,.g27,.g28,.g29,.g30,.g34,.g37,.g38,.g39,.g41,.g46,.g5,.g6,.g7,.g8,.g9) { transform: scaleX(-1); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g10 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g10.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g11 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g11.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g13 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g13.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g14 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g14.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g15 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g15.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g17 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g17.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g18 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g18.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g19 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g19.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g20 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g20.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g21 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g21.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g22 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g22.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g23 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g23.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g24 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g24.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g25 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g25.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g26 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g26.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g27 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g27.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g28 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g28.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g29 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g29.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g30 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g30.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g34 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g34.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g35 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g35.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g37 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g37.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g38 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g38.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g39 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g39.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g46 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g46.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g5 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g5.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g6 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g6.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g7 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g7.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g8 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g8.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g9 { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g9.png); }
html.theme-modern[dir=rtl] body.village2 #village_map.tribe-2 img.building:is(.g10,.g11,.g13,.g14,.g15,.g17,.g18,.g19,.g20,.g21,.g22,.g23,.g24,.g25,.g26,.g27,.g28,.g29,.g30,.g34,.g35,.g37,.g38,.g39,.g46,.g5,.g6,.g7,.g8,.g9) { transform: scaleX(-1); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g10 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g10.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g11 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g11.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g13 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g13.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g14 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g14.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g15 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g15.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g17 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g17.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g18 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g18.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g19 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g19.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g20 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g20.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g21 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g21.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g22 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g22.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g23 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g23.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g24 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g24.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g25 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g25.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g26 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g26.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g27 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g27.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g28 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g28.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g29 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g29.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g30 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g30.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g34 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g34.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g36 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g36.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g37 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g37.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g38 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g38.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g39 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g39.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g46 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g46.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g5 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g5.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g6 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g6.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g7 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g7.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g8 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g8.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g9 { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g9.png); }
html.theme-modern[dir=rtl] body.village2 #village_map.tribe-3 img.building:is(.g10,.g11,.g13,.g14,.g15,.g17,.g18,.g19,.g20,.g21,.g22,.g23,.g24,.g25,.g26,.g27,.g28,.g29,.g30,.g34,.g36,.g37,.g38,.g39,.g46,.g5,.g6,.g7,.g8,.g9) { transform: scaleX(-1); }

/* The modern page has a continuous dark top bar and round navigation buttons. */
html.theme-modern body.village1 #wrapper, html.theme-modern body.village2 #wrapper {
    background-image: linear-gradient(#927363, #5b4439), url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg);
    background-size: 100% 42px, auto;
    background-position: center top, center 42px;
    background-repeat: no-repeat;
}
html.theme-modern body.village2 #wrapper {
    background-image: linear-gradient(#927363, #5b4439), url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg);
}
html.theme-modern #navigation li > a {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 66px;
    height: 66px;
    border: 3px solid #8c7057;
    border-radius: 50%;
    background: linear-gradient(#cbb198, #7b6050);
    box-shadow: inset 0 0 0 2px #d8c6a7, 0 2px 3px rgba(0,0,0,.45);
}
html.theme-modern #navigation li > a.current, html.theme-modern #navigation li > a:hover, html.theme-modern #navigation li > a:focus-visible {
    border-color: #c5a45d;
    box-shadow: inset 0 0 0 2px #edd7a2, 0 0 0 2px #d29338, 0 2px 4px rgba(0,0,0,.45);
}
html.theme-modern #navigation li > a::after {
    content: '';
    position: absolute;
    width: 62px;
    height: 62px;
    top: -1px;
    left: -1px;
    background: url(../gpack/modern-reference/img_ltr/hud/topBar/navigation/navigation.png) no-repeat 0 0;
    pointer-events: none;
}
html.theme-modern #navigation #n1 > a::after { background-position: 0 0; }
html.theme-modern #navigation #n2 > a::after { background-position: 0 var(--navy); }
html.theme-modern #navigation #n3 > a::after { background-position: 0 var(--navy); }
html.theme-modern #navigation #n4 > a::after { background-position: 0 var(--navy); }
html.theme-modern #navigation #n5 > a::after { background-position: 0 var(--navy); }
html.theme-modern #navigation #n6 > a::after { background-position: 0 var(--navy); }

/* Shared modern HUD: keep the existing links and resource update scripts intact. */
html.theme-modern #navigation { isolation: isolate; }
html.theme-modern #navigation::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -8px;
    right: -8px;
    top: -7px;
    height: 73px;
    border: 2px solid #715344;
    border-radius: 18px;
    background: linear-gradient(#b79a80, #806452 53%, #60483b);
    box-shadow: inset 0 0 0 2px #d9c5a5, 0 2px 4px rgba(0,0,0,.45);
    pointer-events: none;
}
html.theme-modern #res { isolation: isolate; }
html.theme-modern #res::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -4px -6px -4px -6px;
    border: 2px solid #6f5140;
    border-radius: 5px;
    background: linear-gradient(#c9b395, #a78b6d);
    box-shadow: inset 0 0 0 1px #ead9b9, 0 2px 3px rgba(0,0,0,.35);
    pointer-events: none;
}
html.theme-modern #res li {
    border-radius: 2px;
    background: rgba(250, 239, 211, .8);
    box-shadow: inset 0 0 0 1px rgba(111, 81, 64, .5);
}
html.theme-modern #res li p .value { color: #322820; font-weight: bold; text-shadow: 0 1px rgba(255,255,255,.6); }
html.theme-modern #res li .bar-bg { background: #796455; box-shadow: inset 0 0 1px #38291f; }
html.theme-modern #res li .bar { box-shadow: inset 0 1px rgba(255,255,255,.25); }
html.theme-modern #plusLink {
    border-radius: 6px;
    background: linear-gradient(#b59b82, #765948);
    box-shadow: 0 1px 3px rgba(0,0,0,.45), inset 0 0 0 2px #e2cdaa, inset 0 0 0 4px #765948;
}
html.theme-modern #plusLink #gs p a { color: #fff5df; font-weight: bold; text-shadow: 0 1px 2px #342116; }

/* Building screens use the modern village landscape and framed content panel. */
html.theme-modern body:is(.build,.plus) { background: #657c34; }
html.theme-modern body:is(.build,.plus) #wrapper {
    background: linear-gradient(#927363, #5b4439) center top / 100% 42px no-repeat,
                url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg) center 42px / auto no-repeat;
}
html.theme-modern body:is(.build,.plus) #contentOuterContainer {
    background: #b49d86;
    border: 2px solid #6c5447;
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 3px #e5d6bd, 0 3px 8px rgba(25,18,11,.55);
    padding: 7px;
}
html.theme-modern body:is(.build,.plus) #contentOuterContainer .contentTitle {
    width: auto;
    height: 39px;
    background: #927e6a url(../gpack/modern-reference/img_ltr/hud/content/header.jpg) center center / cover no-repeat;
    border: 1px solid #8a7560;
    box-sizing: border-box;
}
html.theme-modern body:is(.build,.plus) #contentOuterContainer .contentContainer {
    width: auto;
    background: #fff;
    box-shadow: none;
}
html.theme-modern body:is(.build,.plus) #contentOuterContainer .contentFooter { width: auto; height: 7px; background: none; }
html.theme-modern body:is(.build,.plus) #content h1.titleInHeader {
    color: #fff8ed;
    text-shadow: 0 1px 2px #49372a;
}
html.theme-modern body:is(.build,.plus) #content h1.titleInHeader .level { color: #f5a13b; }
html.theme-modern body:is(.build,.plus) #build[class*=gid] .build_desc { line-height: 1.8; }
html.theme-modern body:is(.build,.plus) #build[class*=gid] .build_logo {
    float: none;
    display: block;
    width: 100%;
    height: 160px;
    margin-bottom: 15px;
    overflow: hidden;
    background: #a8bb78 url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/background1.jpg) center center / cover no-repeat;
}
html.theme-modern body.build #build.gid15 .build_logo img.building {
    display: block;
    float: none;
    width: 290px;
    height: 160px;
    margin: 0 auto;
    background: url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/buildingIllustrations/gaul/g15.png) center center no-repeat;
}
html.theme-modern body.build #build.gid15 #build_value { margin-top: 16px; }
html.theme-modern body.build #build.gid15 #contract {
    clear: both;
    float: none;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #c4d2aa;
    border-radius: 3px;
    background: #f8faf3;
}

/* Resource village: independent three-column layout, preserving the original game controls. */
html.theme-modern body.village1 #mid.modern-village-page { min-height: 660px; }
html.theme-modern body.village1 .modern-village-layout {
    display: grid;
    direction: ltr;
    grid-template-columns: 205px 500px 205px;
    gap: 25px;
    align-items: start;
    width: 960px;
    margin: 0 auto;
    padding-top: 32px;
}
html.theme-modern[dir=rtl] body.village1 .modern-village-layout > * { direction: rtl; }
html.theme-modern[dir=ltr] body.village1 .modern-village-layout > * { direction: ltr; }
html.theme-modern body.village1 #content.modern-village-main {
    float: none;
    position: relative;
    box-sizing: border-box;
    width: 500px;
    min-height: 430px;
    margin: 0;
    padding: 0;
    background: none;
}
html.theme-modern body.village1 #content.modern-village-main #village_map { float: none; margin: 0; }
html.theme-modern body.village1 #map_details.modern-village-details {
    position: static;
    float: none;
    width: 205px;
    margin: 0;
    padding-top: 140px;
}
html.theme-modern body.village1 .modern-village-details .boxes {
    position: relative;
    float: none;
    box-sizing: border-box;
    width: 205px;
    height: auto;
    min-height: 0;
    margin: 0 0 10px;
    padding: 8px;
    background: rgba(255,255,250,.92);
    border: 1px solid #a7a48e;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
html.theme-modern body.village1 .modern-village-details .boxes > div:not(.boxes-contents) { display: none; }
html.theme-modern body.village1 .modern-village-details .boxes .boxes-contents { position: static; width: auto; padding: 0; background: none; }
html.theme-modern body.village1 .modern-village-details .boxes table { width: 100%; }
html.theme-modern body.village1 .modern-village-sidebar #side_info { position: static; float: none; width: 196px; margin: 0 auto; }
html.theme-modern body.village1 .modern-village-sidebar #villageName {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    float: none;
    margin: 12px auto 0;
}
html.theme-modern body.village1 .modern-village-main .buildingList { margin: 12px auto 0; }
@media (max-width: 980px) {
    html.theme-modern body.village1 .modern-village-layout { margin-left: 0; margin-right: 0; }
}
html.theme-modern body.village1 #content.modern-village-main #village_map { position: relative; width: 500px; height: 370px; }
html.theme-modern body.village1 #content.modern-village-main #resfeld { position: absolute; top: 0; left: 0; display: block; width: 500px; height: 370px; z-index: 3; }
html.theme-modern body.village1 #content.modern-village-main #village_map .level { position: absolute; z-index: 2; width: 24px; height: 23px; text-align: center; }
html.theme-modern body.village1 .modern-village-sidebar .sideInfoPlayer {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    border: 2px solid #8f765c;
    border-radius: 5px;
    background: #eee0c2;
    box-shadow: inset 0 0 0 2px #f8efd9, 0 2px 4px rgba(0,0,0,.3);
}
html.theme-modern body.village1 .modern-village-details { grid-column: 1; grid-row: 1; }
html.theme-modern body.village1 .modern-village-main { grid-column: 2; grid-row: 1; }
html.theme-modern body.village1 .modern-village-sidebar { grid-column: 3; grid-row: 1; }

/* The shared village sidebar now owns its panels instead of using fixed page coordinates. */
html.theme-modern body:is(.village1,.village2) #staticElements { background: none; pointer-events: none; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageName {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    float: none;
    margin: 0 auto 10px;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #sideInfoCountdown {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    float: none;
    margin: 12px auto 0;
}
html.theme-modern body.village2 #mid.modern-village-page { min-height: 660px; }
html.theme-modern body.village2 .modern-village-layout {
    display: grid;
    direction: ltr;
    grid-template-columns: 196px 628px 196px;
    grid-template-rows: auto;
    align-items: start;
    gap: 16px;
    position: relative;
    width: 1052px;
    margin-left: -31px;
    padding-top: 28px;
}
html.theme-modern[dir=rtl] body.village2 .modern-village-layout > * { direction: rtl; }
html.theme-modern[dir=ltr] body.village2 .modern-village-layout > * { direction: ltr; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    float: none;
    width: 628px;
    margin: 0;
}
html.theme-modern body.village2 .modern-village-sidebar { grid-column: 3; grid-row: 1; }
html.theme-modern body.village2 .modern-village-sidebar #side_info { position: static; float: none; width: 196px; margin: 0 auto; }
html.theme-modern body.village2 .modern-village-sidebar .sideInfoPlayer {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    border: 2px solid #8f765c;
    border-radius: 5px;
    background: #eee0c2;
    box-shadow: inset 0 0 0 2px #f8efd9, 0 2px 4px rgba(0,0,0,.3);
}
html.theme-modern body:is(.village1,.village2) #staticElements { background: none !important; }

/* One shared top bar for the hero, navigation, currencies and resources. */
html.theme-modern #staticElements { background: none !important; pointer-events: none; }
html.theme-modern #mtop { position: relative; }
html.theme-modern #navigation { left: -55px !important; top: 8px !important; z-index: 5; }
html.theme-modern .modern-header-hero {
    position: absolute;
    left: 80px;
    top: 1px;
    z-index: 10;
    width: 110px;
    height: 110px;
    direction: ltr;
    border-radius: 50%;
    background: linear-gradient(145deg, #d8c5a3, #795b43);
    box-shadow: 0 2px 4px rgba(0,0,0,.5), inset 0 0 0 3px #5c4434, inset 0 0 0 6px #c0a57c;
}
html.theme-modern .modern-hero-portrait {
    position: absolute;
    display: block;
    left: 10px;
    top: 10px;
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-radius: 50%;
    background: #e9d9ae url(../gpack/modern-reference/img_ltr/hud/topBar/hero/frame/heroFrame.png) center / 90px 90px no-repeat;
    box-shadow: inset 0 0 0 3px #a08252;
}
html.theme-modern .modern-hero-portrait img {
    display: block;
    width: 90px;
    height: 103px;
    margin: 0;
    object-fit: cover;
    object-position: center top;
}
html.theme-modern .modern-hero-shortcut {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 27px;
    height: 27px;
    border: 2px solid #d5c39b;
    border-radius: 50%;
    background: linear-gradient(#8fa95c, #435e26);
    color: #fff8dc !important;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 1px 3px #34281f;
}
html.theme-modern .modern-hero-shortcut:hover, html.theme-modern .modern-hero-shortcut:focus-visible { filter: brightness(1.3); }
html.theme-modern .modern-hero-adventure { right: -3px; top: 12px; }
html.theme-modern .modern-hero-auction { right: -3px; top: 43px; }
html.theme-modern #plusLink { left: 710px !important; right: auto !important; top: 7px !important; z-index: 6; }
html.theme-modern #res { left: 205px !important; right: auto !important; top: 80px !important; z-index: 4; }
html.theme-modern #stime { left: -130px !important; right: auto !important; top: 5px !important; z-index: 6; }
@media (max-width: 1250px) {
    html.theme-modern #stime { left: 30px !important; top: 115px !important; }
}

/* Village sidebar panels flow naturally even with several villages or an active quest. */
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageName {
    box-sizing: border-box;
    width: 196px;
    height: auto;
    min-height: 62px;
    padding: 9px 11px;
    border: 2px solid #806956;
    border-radius: 5px;
    background: #eee2c8;
    box-shadow: inset 0 0 0 2px #f9f1de, 0 2px 4px rgba(0,0,0,.3);
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageName .clickable {
    position: static;
    width: auto;
    height: auto;
    padding: 2px 0;
    text-align: center;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar .sideInfoPlayer {
    position: relative;
    left: auto !important;
    right: auto !important;
    box-sizing: border-box;
    width: 196px !important;
    height: auto;
    min-height: 46px;
    margin: 0 auto 10px;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList.listing {
    position: relative;
    left: auto !important;
    right: auto !important;
    float: none;
    box-sizing: border-box;
    width: 196px !important;
    height: auto !important;
    margin: 0 auto 10px;
    padding: 8px 10px;
    border: 2px solid #806956;
    border-radius: 5px;
    background: #eee2c8;
    box-shadow: inset 0 0 0 2px #f9f1de, 0 2px 4px rgba(0,0,0,.3);
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .head {
    width: auto;
    height: auto;
    min-height: 0;
    background: none;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .head:empty { display: none; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .head a {
    position: static;
    width: auto;
    height: auto;
    padding: 1px 0 6px;
    background: none;
    font-weight: bold;
    color: #5b4a38;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .list {
    position: static;
    width: auto;
    height: auto;
    margin: 0 !important;
    padding: 0;
    background: none;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .list ul { position: static; width: auto; margin: 0; padding: 0; list-style: none; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .list li { width: auto; height: auto; margin: 0; padding: 0; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .list li a { display: block; box-sizing: border-box; width: 100%; height: auto; margin: 0; padding: 3px 5px; color: #443526; overflow-wrap: anywhere; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .list li a.active { background: #d3c09e; font-weight: bold; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageList .foot { display: none; }

/* Four-column village layout matching the original modern sidebar placement. */
html.theme-modern body.village1 .modern-village-layout {
    grid-template-columns: 300px 500px 185px 300px;
    gap: 20px;
    width: 1345px;
    margin-left: -177.5px;
    margin-right: 0;
}
/* The RTL containing block otherwise anchors the oversized grid to its right edge. */
html.theme-modern[dir=rtl] body.village1 .modern-village-layout {
    margin-right: calc((100% - 1345px) / 2);
}
html.theme-modern body.village1 .modern-info-sidebar { grid-column: 1; grid-row: 1; }
html.theme-modern body.village1 .modern-village-main { grid-column: 2; grid-row: 1; }
html.theme-modern body.village1 #map_details.modern-village-details { grid-column: 3; grid-row: 1; width: 185px; }
html.theme-modern body.village1 .modern-village-details .boxes { width: 185px; }
html.theme-modern body.village1 .modern-village-sidebar { grid-column: 4; grid-row: 1; }
html.theme-modern body.village2 .modern-village-layout {
    grid-template-columns: 300px 628px 300px;
    gap: 20px;
    width: 1268px;
    margin-left: -139px;
    margin-right: 0;
}
html.theme-modern body.village2 .modern-info-sidebar { grid-column: 1; grid-row: 1; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main { grid-column: 2; grid-row: 1; }
html.theme-modern body.village2 .modern-village-sidebar { grid-column: 3; grid-row: 1; }
html.theme-modern[dir=rtl] body:is(.village1,.village2) .modern-info-sidebar { direction: rtl; }
html.theme-modern[dir=ltr] body:is(.village1,.village2) .modern-info-sidebar { direction: ltr; }
html.theme-modern .modern-side-card {
    box-sizing: border-box;
    width: 300px;
    margin: 0 0 14px;
    padding: 3px 4px;
    border: 20px solid transparent;
    border-image: url(../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png) 38 53 fill / 20px 25px stretch;
    color: #44382c;
    font-size: 12px;
}
html.theme-modern .modern-side-card h2 {
    margin: 0 0 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid #c7b69a;
    color: #645044;
    font-size: 14px;
    font-weight: bold;
}
html.theme-modern .modern-side-card a { color: #536d2e; }
html.theme-modern .modern-info-line { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
html.theme-modern .modern-links-card a { display: block; padding: 3px 0; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info { width: 300px; }
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #villageName,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar .sideInfoPlayer,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList.listing {
    width: 300px !important;
    height: auto !important;
    border: 20px solid transparent;
    border-image: url(../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png) 38 53 fill / 20px 25px stretch;
    padding: 4px 5px;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* Reset the old village-list artwork and fixed heights inside modern cards. */
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList.listing {
    overflow: visible !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList > .head,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList > .list {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    overflow: visible !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList > .head:empty,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList > .foot {
    display: none !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList > .head a {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    padding: 0 0 6px !important;
    background: none !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList .list ul,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList .list li {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar #side_info #villageList .list li a {
    position: static !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto !important;
    padding: 4px 6px !important;
    overflow: visible !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar .sideInfoPlayer .signLink,
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar .sideInfoPlayer .signLink .wrap {
    position: static !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: 20px !important;
    padding: 0 !important;
    background: none !important;
}
html.theme-modern body:is(.village1,.village2,.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) .modern-village-sidebar .sideInfoPlayer .nationBig {
    position: static !important;
    vertical-align: middle;
    margin-inline-start: 8px;
}

/* Expanded modern top bar, using the existing game destinations. */
html.theme-modern #navigation { position:absolute !important; left:220px !important; top:6px !important; display:flex !important; flex-direction:row !important; direction:ltr !important; gap:3px; width:480px !important; height:66px !important; margin:0 !important; padding:0 !important; }
html.theme-modern #navigation li { position:relative; flex:0 0 66px; float:none !important; width:66px !important; height:66px !important; margin:0 !important; }
html.theme-modern #navigation #n7 > a::after { background-position:0 var(--navy); }
html.theme-modern #navigation::before { right:-6px; }
html.theme-modern #plusLink { width:156px !important; left:710px !important; top:7px !important; }
html.theme-modern #plusLink #gs { width:100% !important; }
html.theme-modern #plusLink #gs p.gold, html.theme-modern #plusLink #gs p.silver { width:auto !important; margin:0 !important; }
html.theme-modern .modern-header-shop { position:absolute; display:block; left:876px; top:2px; width:78px; height:78px; z-index:6; background:url(../gpack/modern-reference/img_ltr/hud/topBar/shop.png) no-repeat 0 0; }
html.theme-modern .modern-header-shop:hover, html.theme-modern .modern-header-shop:focus-visible { background-position:0 -78px; }
html.theme-modern .modern-header-invite { position:absolute; left:944px; top:1px; z-index:7; display:flex; align-items:center; justify-content:center; width:25px; height:25px; border:2px solid #ddcea7; border-radius:50%; background:linear-gradient(#a4b96d,#3a5a24); box-shadow:0 1px 3px #35291e; color:#fff !important; font:bold 22px/1 Arial; text-decoration:none; }
html.theme-modern .modern-header-tools { position:absolute; top:5px; left:calc(50% + 540px); display:flex; direction:ltr; gap:4px; z-index:10; white-space:nowrap; }
html.theme-modern .modern-header-tools a { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:27px; height:27px; border:2px solid #c6b399; border-radius:50%; background:linear-gradient(#f2ead6,#99826d); box-shadow:0 1px 2px #36271f; color:#49382b !important; font:bold 19px/1 Arial; text-decoration:none; }
html.theme-modern .modern-header-tools a:hover, html.theme-modern .modern-header-tools a:focus-visible, html.theme-modern .modern-header-invite:hover { filter:brightness(1.15); }
@media(max-width:1250px) { html.theme-modern .modern-header-tools { left:auto; right:2px; top:112px; } }

/* Shared layout for the main in-game content screens. */
html.theme-modern body:is(.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) { background:#657c34; }
html.theme-modern body:is(.statistics,.messages,.reports,.spieler,.alliance,.plus,.build,.hero_inventory,.hero_adventure,.hero_auction,.hero,.village3,.a2b,.warsim,.support,.cropfinder,.map) #wrapper { background:linear-gradient(#927363,#5b4439) center top / 100% 42px no-repeat, url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg) center 42px / auto no-repeat; min-height:100vh; }
html.theme-modern body.build #wrapper { background:linear-gradient(#927363,#5b4439) center top / 100% 42px no-repeat, url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg) center 42px / auto no-repeat; }
html.theme-modern .modern-inner-page { position:relative !important; min-height:650px; }
html.theme-modern .modern-inner-page > .modern-info-sidebar { position:absolute; top:32px; left:calc(50% - 722px); width:300px; direction:ltr; }
html.theme-modern[dir=rtl] .modern-inner-page > .modern-info-sidebar { direction:rtl; }
html.theme-modern .modern-inner-page > .modern-village-sidebar { position:absolute; top:32px; left:calc(50% + 408px); width:300px; }
html.theme-modern .modern-inner-page > .modern-village-sidebar #villageName { position:relative !important; inset:auto !important; float:none !important; margin:0 0 12px !important; box-sizing:border-box; }
html.theme-modern .modern-inner-page > .modern-village-sidebar #side_info { position:relative !important; inset:auto !important; float:none !important; margin:0 !important; }
html.theme-modern .modern-inner-page > #contentOuterContainer { float:none !important; position:relative; box-sizing:border-box; width:605px; margin:32px auto 0 !important; padding:7px; background:#b49d86; border:2px solid #6c5447; border-radius:6px; box-shadow:inset 0 0 0 3px #e5d6bd,0 3px 8px rgba(25,18,11,.55); }
html.theme-modern .modern-inner-page > #contentOuterContainer .contentTitle { box-sizing:border-box; width:auto; height:39px; border:1px solid #8a7560; background:#927e6a url(../gpack/modern-reference/img_ltr/hud/content/header.jpg) center / cover no-repeat; }
html.theme-modern .modern-inner-page > #contentOuterContainer .contentContainer { width:auto; background:#fff; box-shadow:none; }
html.theme-modern .modern-inner-page > #contentOuterContainer .contentFooter { width:auto; height:7px; background:none; }
html.theme-modern .modern-inner-page > #contentOuterContainer #content { box-sizing:border-box; width:auto; }
html.theme-modern .modern-inner-page #content h1.titleInHeader { color:#fff8ed; text-shadow:0 1px 2px #49372a; }
html.theme-modern .modern-inner-page #content h1.titleInHeader .level { color:#f5a13b; }
html.theme-modern .modern-inner-page .contentNavi { background:#705444; border-bottom:2px solid #b99562; }
html.theme-modern .modern-inner-page .contentNavi .container { background:linear-gradient(#826652,#5f4539); }
html.theme-modern .modern-inner-page .contentNavi .container.active { background:linear-gradient(#b09667,#786046); }
html.theme-modern .modern-inner-page .contentNavi .container .content a { color:#f5e7cf; }
html.theme-modern .modern-inner-page .contentNavi .container .background-start, html.theme-modern .modern-inner-page .contentNavi .container .background-end { background:none; }
@media(max-width:1250px) { html.theme-modern .modern-inner-page > .modern-info-sidebar { left:-100px; } html.theme-modern .modern-inner-page > .modern-village-sidebar { left:auto; right:-100px; } }

/* Keep primary and secondary tabs readable on their different backgrounds. */
html.theme-modern .modern-inner-page .contentNavi.subNavi { box-sizing:border-box; width:100%; }
html.theme-modern .modern-inner-page .contentNavi.subNavi .container .tabItem { color:#f8eedb !important; }
html.theme-modern .modern-inner-page .contentNavi.tabNavi { background:transparent; border-bottom:1px solid #c9c7c1; }
html.theme-modern .modern-inner-page .contentNavi.tabNavi .container { background:#e6e3dd; }
html.theme-modern .modern-inner-page .contentNavi.tabNavi .container.active { background:#8eaa36; }
html.theme-modern .modern-inner-page .contentNavi.tabNavi .container .tabItem { color:#514d48 !important; }
html.theme-modern .modern-inner-page .contentNavi.tabNavi .container.active .tabItem { color:#fff !important; }

/* Preserve the map viewport's original room inside the modern frame. */
html.theme-modern body.map .modern-inner-page > #contentOuterContainer { width:620px; }
html.theme-modern body.map .modern-inner-page > #contentOuterContainer #content.map { overflow:visible; }

/* Hero adventures: reference adventure list layout. */
html.theme-modern body.hero_adventure #heroAdventure { padding:10px; background:transparent; }
html.theme-modern body.hero_adventure #heroAdventure .heroState { display:grid; grid-template-columns:24px 1fr; align-items:center; column-gap:6px; margin:0; color:#5e463a; font:400 13px/16px Arial, Helvetica, Verdana, sans-serif; }
html.theme-modern body.hero_adventure #heroAdventure .heroState i.statusHome_medium { display:block; width:24px; height:21px; background:url(../gpack/modern-reference/img_ltr/global/measure/statusHome_medium.png) center no-repeat; }
html.theme-modern body.hero_adventure #heroAdventure .heroState a { color:#6b4f2f; font-weight:bold; text-decoration:none; }
html.theme-modern body.hero_adventure #heroAdventure .heroState a:hover { text-decoration:underline; }
html.theme-modern body.hero_adventure table.adventureList { width:100%; margin:15px 0 0; border-collapse:collapse; background:transparent; color:#5e463a; font:400 13px/16px Arial, Helvetica, Verdana, sans-serif; }
html.theme-modern body.hero_adventure table.adventureList thead th { height:26px; padding:0 5px 0 10px; border:0; background:transparent; color:#5e463a; font:700 13px/16px Arial, Helvetica, Verdana, sans-serif; text-align:center; }
html.theme-modern body.hero_adventure table.adventureList tbody td { height:44px; padding:0 5px 0 0; border:0; background:transparent; background-image:linear-gradient(#c0c0c0,#c0c0c0 1px,rgba(192,192,192,0) 1px); color:#5e463a; text-align:center; vertical-align:middle; }
html.theme-modern body.hero_adventure table.adventureList tbody td.place { padding:0; }
html.theme-modern body.hero_adventure table.adventureList td.place img { display:block; width:67px; height:41px; margin:0 auto; background-position:center; background-repeat:no-repeat; background-size:cover; }
html.theme-modern body.hero_adventure table.adventureList td.place img.forest { background-image:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/place/forest_small.jpg); }
html.theme-modern body.hero_adventure table.adventureList td.place img.grassland { background-image:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/place/grassland_small.jpg); }
html.theme-modern body.hero_adventure table.adventureList td.place img.hill { background-image:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/place/hill_small.jpg); }
html.theme-modern body.hero_adventure table.adventureList td.place img.lake { background-image:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/place/lake_small.jpg); }
html.theme-modern body.hero_adventure table.adventureList td.place img.natar_village { background-image:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/place/natar_village_small.jpg); }
html.theme-modern body.hero_adventure table.adventureList td.distance { white-space:nowrap; }
html.theme-modern body.hero_adventure table.adventureList td .cellWrapper { display:inline-grid; grid-auto-flow:column; align-items:center; column-gap:10px; }
html.theme-modern body.hero_adventure table.adventureList td .iconWrapper { display:block; width:22px; height:22px; }
html.theme-modern body.hero_adventure table.adventureList i.clock_medium { display:inline-block; width:22px; height:22px; background:url(../gpack/modern-reference/img_ltr/global/measure/clock_medium.png) center no-repeat; }
html.theme-modern body.hero_adventure table.adventureList i.difficulty_normal { display:inline-block; width:28px; height:24px; background:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/difficulty/difficulty_normal.png) center no-repeat; }
html.theme-modern body.hero_adventure table.adventureList i.difficulty_hard { display:inline-block; width:28px; height:24px; background:url(../gpack/modern-reference/img_ltr/views/HeroAdventure/difficulty/difficulty_hard.png) center no-repeat; }
html.theme-modern body.hero_adventure table.adventureList td.button { padding:0 0 0 6px; }
html.theme-modern body.hero_adventure a.textButtonV2.buttonFramed.rectangle.withText.green { display:inline-block; box-sizing:border-box; min-width:101px; padding:2px; border:1px solid #34220d; border-radius:3px; background:linear-gradient(#cba467,#f3e2ae 13%,#efbf7b 32%,#aa8050 48%,#835e35 72%,#ad8a54 93%,#d7b672); text-decoration:none; vertical-align:middle; }
html.theme-modern body.hero_adventure a.textButtonV2.buttonFramed.rectangle.withText.green > div { border-radius:2px; background:linear-gradient(#5d8137,#466428); box-shadow:inset 0 0 0 1px #2f4a1c; }
html.theme-modern body.hero_adventure a.textButtonV2.buttonFramed.rectangle.withText.green > div > div { padding:6px 12px; color:#fff9eb !important; font:700 13px/16px Arial, Helvetica, Verdana, sans-serif; text-align:center; text-shadow:0 1px 1px #29401a; }
html.theme-modern body.hero_adventure a.textButtonV2.buttonFramed.rectangle.withText.green:hover > div, html.theme-modern body.hero_adventure a.textButtonV2.buttonFramed.rectangle.withText.green:focus-visible > div { background:linear-gradient(#6f9444,#547629); }
html.theme-modern body.hero_adventure table.adventureList td.none { height:auto; padding:18px; background-image:none; }

/* Troop movements sit above production, as a separate compact HUD panel. */
html.theme-modern body.village1 #map_details.modern-village-details { position:relative; padding-top:20px; }
html.theme-modern body.village1 .modern-village-details > .movements { position:relative; width:185px; min-height:120px; }
html.theme-modern body.village1 .modern-village-details .movements .movements { position:static; width:auto; }
html.theme-modern body.village1 .modern-village-details .movements .boxes { box-sizing:border-box; width:185px; min-height:0; padding:6px 7px; border:1px solid #b9b8a8; border-radius:6px; background:rgba(255,255,251,.94); box-shadow:0 2px 4px rgba(0,0,0,.25); }
html.theme-modern body.village1 .modern-village-details #movements { width:100%; border:0; border-collapse:collapse; background:transparent; }
html.theme-modern body.village1 .modern-village-details #movements th { padding:0 0 4px; border:0; background:transparent; color:#444; text-align:start; font-size:12px; font-weight:normal; }
html.theme-modern body.village1 .modern-village-details #movements td { padding:2px 0; border:0; background:transparent; color:#333; vertical-align:middle; }
html.theme-modern body.village1 .modern-village-details #movements td.typ { width:27px; white-space:nowrap; }
html.theme-modern body.village1 .modern-village-details #movements .mov { display:inline; font-weight:bold; }
html.theme-modern body.village1 .modern-village-details #movements .dur_r { display:block; color:#625e58; font-size:11px; line-height:1.3; }
html.theme-modern body.village1 .modern-village-details #movements .d1, html.theme-modern body.village1 .modern-village-details #movements .d2 { color:#228b22; }
html.theme-modern body.village1 .modern-village-details #movements .a3 { color:#b500a3; }
html.theme-modern body.village1 .modern-village-details #movements .a1 { color:#a3261b; }
html.theme-modern body.village1 .modern-village-details #movements .a2 { color:#c69b00; }
html.theme-modern body.build .gid16 .rally-tabs { display:flex; flex-wrap:wrap; margin:0 0 24px; padding:0; border:1px solid #80624b; background:#6c4d3d; }
html.theme-modern body.build .gid16 .rally-tabs .container { float:none; flex:1 1 auto; margin:0; border-inline-end:1px solid #9e8068; background:#6c4d3d; text-align:center; }
html.theme-modern body.build .gid16 .rally-tabs .container.active { background:#aa8867; }
html.theme-modern body.build .gid16 .rally-tabs .container .content { padding:0; }
html.theme-modern body.build .gid16 .rally-tabs .container a { display:block; padding:8px 6px; color:#fff; text-decoration:none; }
html.theme-modern body.build .gid16 .rally-tabs .container .tabItem { color:#fff !important; font-size:11px; }
html.theme-modern body.build .gid16 .troop_details { width:100%; table-layout:fixed; border-collapse:collapse; margin:10px 0 18px; background:#fff; }
html.theme-modern body.build .gid16 .troop_details th, html.theme-modern body.build .gid16 .troop_details td { padding:4px 2px; border:1px solid #ccc; text-align:center; overflow-wrap:anywhere; }
html.theme-modern body.build .gid16 .troop_details th:first-child, html.theme-modern body.build .gid16 .troop_details td.role { width:98px; }
html.theme-modern body.build .gid16 .troop_details .infos { background:#e8e8e8; }
html.theme-
/* Village center rebuilt on the reference 1280x720 stage. */
html.theme-modern body.village2 { background:#54643a; }
html.theme-modern body.village2 #wrapper { background:linear-gradient(#927363,#5b4439) center top / 100% 42px no-repeat, url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg) center 0 no-repeat !important; }
html.theme-modern body.village2 #mid.modern-village-page { position:relative; min-height:760px; }
html.theme-modern body.village2 .modern-village-sidebar :is(#side_info,#villageName,.sideInfoPlayer,.questMaster,#villageList,#villageList.listing) { width:300px !important; box-sizing:border-box; margin-left:0 !important; margin-right:0 !important; }
html.theme-modern body.village2 .modern-village-sidebar #side_info > div:not(#villageList):not(.sideInfoPlayer) { box-sizing:border-box; width:300px !important; margin-left:0 !important; margin-right:0 !important; }
html.theme-modern body.village2 .modern-village-layout { display:block; position:static; width:auto; margin:0; padding:0; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main { position:absolute !important; left:50% !important; top:-116px !important; width:1280px !important; height:720px; margin:0 0 0 -640px !important; padding:0 !important; background:none !important; border:0 !important; box-shadow:none !important; z-index:1; pointer-events:none; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main > .contentTitle, html.theme-modern body.village2 #contentOuterContainer.modern-village-main > .contentFooter { display:none; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .contentContainer { position:static; width:auto; height:auto; margin:0; padding:0; background:none !important; box-shadow:none !important; }
html.theme-modern body.village2 #content.village2 { position:relative !important; left:0; top:0; width:1280px !important; height:720px !important; margin:0 !important; padding:0 !important; background:none !important; box-shadow:none !important; pointer-events:none; }
html.theme-modern body.village2 #village_map.modern-village-center { position:absolute !important; left:0; top:0; width:1280px !important; height:720px !important; margin:0 !important; background:none !important; transform:none !important; direction:ltr; pointer-events:none; }
html.theme-modern body.village2 #village_map .buildingSlot { position:absolute; pointer-events:none; }
html.theme-modern body.village2 #village_map .buildingSlot > img { position:absolute; left:0; top:0; width:100%; height:100%; margin:0; background-repeat:no-repeat; background-position:0 0; z-index:0; pointer-events:none; transform:none !important; }
html.theme-modern body.village2 #village_map .buildingSlot > img.iso { background:none !important; }
html.theme-modern body.village2 #village_map .buildingShape { position:absolute; left:0; top:0; z-index:1; overflow:visible; pointer-events:none; }
html.theme-modern body.village2 #village_map .buildingShape a, html.theme-modern body.village2 #village_map .buildingShape path { pointer-events:visiblePainted; cursor:pointer; }
html.theme-modern body.village2 #village_map .buildingShape path { fill:transparent; stroke:transparent; stroke-width:3px; transition:fill .12s, stroke .12s; }
html.theme-modern body.village2 #village_map .buildingSlot:not(.a40).g0 .buildingShape path { fill:rgba(101,115,13,.57); }
html.theme-modern body.village2 #village_map .buildingShape a:hover path, html.theme-modern body.village2 #village_map .buildingShape a:focus path { fill:rgba(255,255,255,.18); stroke:#fff8c9; }
@media (hover:hover) {
 html.theme-modern body.village2 #village_map .buildingSlot:not(.g0) .buildingShape a:hover path { fill:transparent !important; stroke:transparent !important; }
 html.theme-modern body.village2 #village_map .buildingSlot:not(.g0):has(.buildingShape a:hover, a.level:hover) > img { filter:brightness(1.22); }
 html.theme-modern body.village2 #village_map:has(.buildingSlot.a40 .buildingShape a:hover) .buildingSlot.a40 > img { filter:brightness(1.22); }
 html.theme-modern body.village1 #village_map .resource-hover { position:absolute; z-index:2; width:56px; height:56px; border-radius:50%; pointer-events:none; }
 html.theme-modern body.village1 #village_map .resource-hover.is-hovered { backdrop-filter:brightness(1.18); -webkit-backdrop-filter:brightness(1.18); }
}
html.theme-modern body.village2 #village_map .buildingSlot:not(.a40).g0 .buildingShape a:hover path { fill:rgba(160,180,58,.7); }
html.theme-modern body.village2 #village_map .buildingSlot.a40.g0 .buildingShape a:hover path { fill:rgba(255,255,255,.08); stroke:rgba(255,248,201,.65); }
html.theme-modern body.village2 #village_map .buildingSlot.a40 { left:261px; top:137px; width:794px; height:540px; }
html.theme-modern body.village2 #village_map .buildingSlot.a40.bottom { z-index:42; }
html.theme-modern body.village2 #village_map .buildingSlot.a40.top { z-index:0; }
html.theme-modern body.village2 #village_map .buildingSlot.a40 .buildingShape a:hover path { fill:rgba(255,255,255,.12); }
html.theme-modern body.village2 #village_map a.level { position:absolute; z-index:3; box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:28px; height:28px; border:1px solid #988b42; border-radius:50%; background:linear-gradient(to top,#988b42,#fdf15f); box-shadow:inset 0 0 2px #fff; text-decoration:none; pointer-events:auto; }
html.theme-modern body.village2 #village_map a.level .labelLayer { display:block; width:18px; height:18px; border-radius:50%; background:#fff; color:#333; font:11px/18px Verdana,sans-serif; text-align:center; }
html.theme-modern body.village2 #village_map a.level.good { border-color:#4d8128; background:linear-gradient(to top,#4d8128,#a9df61); }
html.theme-modern body.village2 #village_map a.level.maxLevel { border-color:#2c5f9f; background:linear-gradient(to top,#2c5f9f,#79b9f0); }
html.theme-modern body.village2 #village_map a.level.underConstruction { border-color:#c46d16; background:linear-gradient(to top,#d06d14,#ffc153); }
html.theme-modern body.village2 #village_map a.level.wallLevel { left:625px; top:602px; z-index:45; }
html.theme-modern body.village2 #village_map .buildingSlot.wonder { left:540px; top:250px; z-index:30; pointer-events:auto; }
html.theme-modern body.village2 #village_map .buildingSlot.underConstruction > img { opacity:.72; filter:sepia(.35); }
html.theme-modern body.village2 .modern-info-sidebar { position:absolute; left:calc(50% - 715px); top:14px; z-index:5; width:300px; }
html.theme-modern body.village2 .modern-village-sidebar { position:absolute; left:calc(50% + 415px); top:14px; z-index:5; width:300px; }
html.theme-modern body.village2 .modern-village-sidebar #side_info, html.theme-modern body.village2 .modern-village-sidebar #villageName, html.theme-modern body.village2 .modern-info-sidebar .modern-side-card { width:300px !important; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .buildingList { position:absolute !important; left:442px !important; top:647px !important; width:397px !important; margin:0 !important; z-index:50; pointer-events:auto; box-sizing:border-box; padding:6px 8px; border:1px solid #bbb6a3; border-radius:4px; background:rgba(255,255,251,.96); box-shadow:0 2px 5px rgba(0,0,0,.3); }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .buildingList > div:not(.boxes-contents) { display:none; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .buildingList .boxes-contents { position:static; padding:0; background:none; }
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .buildingList table { width:100%; background:transparent; }
html.theme-modern body.village2 #footer { position:relative; z-index:6; margin-top:0; }
html.theme-modern[dir=rtl] body.village2 #village_map .buildingSlot > img { transform:none !important; }
html.theme-modern[dir=rtl] body.village2 #village_map .buildingShape { transform:none; }
html.theme-modern body.village2 #village_map img.g31Top.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g31Top.png); }
html.theme-modern body.village2 #village_map img.g31Bottom.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g31Bottom.png); }
html.theme-modern body.village2 #village_map img.g32Top.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g32Top.png); }
html.theme-modern body.village2 #village_map img.g32Bottom.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g32Bottom.png); }
html.theme-modern body.village2 #village_map img.g33Top.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g33Top.png); }
html.theme-modern body.village2 #village_map img.g33Bottom.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g33Bottom.png); }
html.theme-modern body.village2 #village_map img.building.g10.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g10.png); }
html.theme-modern body.village2 #village_map img.building.g11.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g11.png); }
html.theme-modern body.village2 #village_map img.building.g13.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g13.png); }
html.theme-modern body.village2 #village_map img.building.g14.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g14.png); }
html.theme-modern body.village2 #village_map img.building.g15.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g15.png); }
html.theme-modern body.village2 #village_map img.building.g16.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g16.png); }
html.theme-modern body.village2 #village_map img.building.g17.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g17.png); }
html.theme-modern body.village2 #village_map img.building.g18.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g18.png); }
html.theme-modern body.village2 #village_map img.building.g19.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g19.png); }
html.theme-modern body.village2 #village_map img.building.g20.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g20.png); }
html.theme-modern body.village2 #village_map img.building.g21.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g21.png); }
html.theme-modern body.village2 #village_map img.building.g22.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g22.png); }
html.theme-modern body.village2 #village_map img.building.g23.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g23.png); }
html.theme-modern body.village2 #village_map img.building.g24.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g24.png); }
html.theme-modern body.village2 #village_map img.building.g25.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g25.png); }
html.theme-modern body.village2 #village_map img.building.g26.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g26.png); }
html.theme-modern body.village2 #village_map img.building.g27.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g27.png); }
html.theme-modern body.village2 #village_map img.building.g28.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g28.png); }
html.theme-modern body.village2 #village_map img.building.g29.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g29.png); }
html.theme-modern body.village2 #village_map img.building.g30.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g30.png); }
html.theme-modern body.village2 #village_map img.building.g34.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g34.png); }
html.theme-modern body.village2 #village_map img.building.g37.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g37.png); }
html.theme-modern body.village2 #village_map img.building.g38.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g38.png); }
html.theme-modern body.village2 #village_map img.building.g39.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g39.png); }
html.theme-modern body.village2 #village_map img.building.g41.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g41.png); }
html.theme-modern body.village2 #village_map img.building.g46.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g46.png); }
html.theme-modern body.village2 #village_map img.building.g49.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g49.png); }
html.theme-modern body.village2 #village_map img.building.g5.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g5.png); }
html.theme-modern body.village2 #village_map img.building.g6.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g6.png); }
html.theme-modern body.village2 #village_map img.building.g7.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g7.png); }
html.theme-modern body.village2 #village_map img.building.g8.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g8.png); }
html.theme-modern body.village2 #village_map img.building.g9.roman { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g9.png); }
html.theme-modern body.village2 #village_map img.building.g10.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g10.png); }
html.theme-modern body.village2 #village_map img.building.g11.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g11.png); }
html.theme-modern body.village2 #village_map img.building.g13.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g13.png); }
html.theme-modern body.village2 #village_map img.building.g14.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g14.png); }
html.theme-modern body.village2 #village_map img.building.g15.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g15.png); }
html.theme-modern body.village2 #village_map img.building.g16.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g16.png); }
html.theme-modern body.village2 #village_map img.building.g17.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g17.png); }
html.theme-modern body.village2 #village_map img.building.g18.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g18.png); }
html.theme-modern body.village2 #village_map img.building.g19.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g19.png); }
html.theme-modern body.village2 #village_map img.building.g20.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g20.png); }
html.theme-modern body.village2 #village_map img.building.g21.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g21.png); }
html.theme-modern body.village2 #village_map img.building.g22.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g22.png); }
html.theme-modern body.village2 #village_map img.building.g23.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g23.png); }
html.theme-modern body.village2 #village_map img.building.g24.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g24.png); }
html.theme-modern body.village2 #village_map img.building.g25.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g25.png); }
html.theme-modern body.village2 #village_map img.building.g26.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g26.png); }
html.theme-modern body.village2 #village_map img.building.g27.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g27.png); }
html.theme-modern body.village2 #village_map img.building.g28.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g28.png); }
html.theme-modern body.village2 #village_map img.building.g29.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g29.png); }
html.theme-modern body.village2 #village_map img.building.g30.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g30.png); }
html.theme-modern body.village2 #village_map img.building.g34.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g34.png); }
html.theme-modern body.village2 #village_map img.building.g35.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g35.png); }
html.theme-modern body.village2 #village_map img.building.g37.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g37.png); }
html.theme-modern body.village2 #village_map img.building.g38.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g38.png); }
html.theme-modern body.village2 #village_map img.building.g39.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g39.png); }
html.theme-modern body.village2 #village_map img.building.g46.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g46.png); }
html.theme-modern body.village2 #village_map img.building.g49.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g49.png); }
html.theme-modern body.village2 #village_map img.building.g5.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g5.png); }
html.theme-modern body.village2 #village_map img.building.g6.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g6.png); }
html.theme-modern body.village2 #village_map img.building.g7.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g7.png); }
html.theme-modern body.village2 #village_map img.building.g8.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g8.png); }
html.theme-modern body.village2 #village_map img.building.g9.teuton { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g9.png); }
html.theme-modern body.village2 #village_map img.building.g10.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g10.png); }
html.theme-modern body.village2 #village_map img.building.g11.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g11.png); }
html.theme-modern body.village2 #village_map img.building.g13.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g13.png); }
html.theme-modern body.village2 #village_map img.building.g14.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g14.png); }
html.theme-modern body.village2 #village_map img.building.g15.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g15.png); }
html.theme-modern body.village2 #village_map img.building.g16.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g16.png); }
html.theme-modern body.village2 #village_map img.building.g17.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g17.png); }
html.theme-modern body.village2 #village_map img.building.g18.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g18.png); }
html.theme-modern body.village2 #village_map img.building.g19.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g19.png); }
html.theme-modern body.village2 #village_map img.building.g20.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g20.png); }
html.theme-modern body.village2 #village_map img.building.g21.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g21.png); }
html.theme-modern body.village2 #village_map img.building.g22.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g22.png); }
html.theme-modern body.village2 #village_map img.building.g23.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g23.png); }
html.theme-modern body.village2 #village_map img.building.g24.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g24.png); }
html.theme-modern body.village2 #village_map img.building.g25.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g25.png); }
html.theme-modern body.village2 #village_map img.building.g26.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g26.png); }
html.theme-modern body.village2 #village_map img.building.g27.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g27.png); }
html.theme-modern body.village2 #village_map img.building.g28.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g28.png); }
html.theme-modern body.village2 #village_map img.building.g29.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g29.png); }
html.theme-modern body.village2 #village_map img.building.g30.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g30.png); }
html.theme-modern body.village2 #village_map img.building.g34.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g34.png); }
html.theme-modern body.village2 #village_map img.building.g36.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g36.png); }
html.theme-modern body.village2 #village_map img.building.g37.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g37.png); }
html.theme-modern body.village2 #village_map img.building.g38.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g38.png); }
html.theme-modern body.village2 #village_map img.building.g39.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g39.png); }
html.theme-modern body.village2 #village_map img.building.g46.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g46.png); }
html.theme-modern body.village2 #village_map img.building.g49.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g49.png); }
html.theme-modern body.village2 #village_map img.building.g5.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g5.png); }
html.theme-modern body.village2 #village_map img.building.g6.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g6.png); }
html.theme-modern body.village2 #village_map img.building.g7.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g7.png); }
html.theme-modern body.village2 #village_map img.building.g8.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g8.png); }
html.theme-modern body.village2 #village_map img.building.g9.gaul { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g9.png); }
html.theme-modern body.village2 .modern-village-layout .modern-village-sidebar #side_info #villageList.listing, html.theme-modern body.village2 .modern-village-layout .modern-village-sidebar #side_info #sideInfoCountdown { width:300px !important; margin:0 0 10px !important; box-sizing:border-box; }

/* Header refinement: reference-style round tool buttons and navigation. */
html.theme-modern .modern-header-tools { gap:4px; top:4px; }
html.theme-modern .modern-header-tools a, html.theme-modern .modern-header-invite {
    width:30px; height:30px; border:1px solid #34220d; border-radius:50%;
    background:linear-gradient(#cba467 5%,#f3e2ae 13%,#efbf7b 32%,#aa8050 48%,#835e35 72%,#ad8a54 93%,#d7b672 100%);
    box-shadow:0 2px 2px rgba(0,0,0,.35); color:#fff9eb !important;
}
html.theme-modern .modern-header-tools a svg, html.theme-modern .modern-header-invite svg { width:16px; height:16px; display:block; }
html.theme-modern .modern-header-tools a svg path.o { fill:#fff9eb; stroke:#263a11; stroke-width:1.2px; paint-order:stroke; }
html.theme-modern .modern-header-invite { width:30px; height:30px; }
html.theme-modern .modern-header-invite svg path { fill:#fff9eb; stroke:#263a11; stroke-width:1.2px; paint-order:stroke; }
html.theme-modern .modern-hero-shortcut { width:28px; height:28px; border:1px solid #1f3a0c; background:linear-gradient(#a9cf5f,#4f7d1c 55%,#3b6012); color:#fff9eb !important; }
html.theme-modern .modern-hero-shortcut svg { display:block; width:16px; height:16px; filter:drop-shadow(0 1px 0 #1f3a0c); }
html.theme-modern #navigation li > a { border:1px solid #553420; box-shadow:inset 0 1px 0 #ddcbb7, inset 0 -1px 0 #664f3d, 0 3px 3px rgba(0,0,0,.3); }
html.theme-modern #navigation li > a:hover { background:linear-gradient(#dbc1a8,#b49581); border-color:#553420; box-shadow:inset 0 1px 0 #ddcbb7, 0 3px 3px rgba(0,0,0,.3); }
html.theme-modern #navigation li > a.current { border-color:#553420; box-shadow:inset 0 1px 0 #ddcbb7, 0 0 0 2px #d29338, 0 3px 3px rgba(0,0,0,.3); }
html.theme-modern #navigation li > a:hover::after { background-position-y:calc(var(--navy, 0px) - 62px); }
html.theme-modern #navigation #n1 > a { --navy:0px; } html.theme-modern #navigation #n2 > a { --navy:-124px; }
html.theme-modern #navigation #n3 > a { --navy:-248px; } html.theme-modern #navigation #n4 > a { --navy:-372px; }
html.theme-modern #navigation #n5 > a { --navy:-496px; } html.theme-modern #navigation #n6 > a { --navy:-620px; }
html.theme-modern #navigation #n7 > a { --navy:-744px; }
/* Stock bar (warehouse + granary groups), copied from the original layout. */
html.theme-modern ul#res.stockBar { display:flex !important; direction:ltr; align-items:center; gap:4px; width:640px !important; height:36px !important; margin:0; padding:0; list-style:none; background:none !important; border:0 !important; box-shadow:none !important; }
html.theme-modern ul#res.stockBar::before { display:none !important; }
html.theme-modern ul#res.stockBar li { position:relative; float:none !important; box-sizing:border-box; margin:0 !important; padding:0 !important; height:28px !important; background-image:none !important; text-shadow:none; }
html.theme-modern ul#res.stockBar li.capacity { display:flex; align-items:center; gap:4px; width:auto; min-width:58px; height:36px !important; padding:0 6px !important; border:2px solid #6f5140; border-radius:18px 4px 4px 18px; background:linear-gradient(#8a6b57,#5e4538) !important; box-shadow:inset 0 1px #b99d85; color:#fff9eb; font-weight:bold; font-size:12px; }
html.theme-modern ul#res.stockBar li.granary { margin-left:14px !important; border-radius:18px 4px 4px 18px; }
html.theme-modern ul#res.stockBar li.capacity img { width:auto; height:23px; }
html.theme-modern ul#res.stockBar li.stockBarButton { display:grid; grid-template-columns:30px 1fr; align-items:center; width:104px; border:2px solid #968879; border-top-color:#f4e8d3; border-bottom-color:#695b52; background:#e3d4bc !important; border-radius:3px; overflow:hidden; box-shadow:none !important; }
html.theme-modern ul#res.stockBar li.stockBarButton:hover { background:#fff3df !important; }
html.theme-modern ul#res.stockBar li.stockBarButton .resIcon { width:auto; height:19px; max-width:26px; justify-self:center; }
html.theme-modern ul#res.stockBar li.stockBarButton .value { display:block; text-align:center; direction:ltr; font-size:12px; font-weight:bold; color:#322820; white-space:nowrap; text-shadow:0 1px rgba(255,255,255,.6); }
html.theme-modern ul#res.stockBar li.stockBarButton .bar-bg { position:absolute; left:2px; right:2px; bottom:1px; height:4px; background:#796455; box-shadow:inset 0 0 1px #38291f; }
html.theme-modern ul#res.stockBar li.stockBarButton .bar { height:100%; }
html.theme-modern ul#res.stockBar li.resource5 { grid-template-columns:30px 1fr; width:112px; }
html.theme-modern ul#res.stockBar li.stockBarButton p { display:contents; }

/* ===== Top bar v21: copy of the original Travian header layout ===== */
html.theme-modern #navigation { display:block !important; position:absolute !important; left:247px !important; top:4px !important; width:498px !important; height:66px !important; gap:0 !important; direction:ltr !important; }
html.theme-modern #navigation::before { display:none !important; }
html.theme-modern #navigation li { position:absolute !important; top:8px; flex:none; width:58px !important; height:58px !important; margin:0 !important; }
html.theme-modern #navigation #n1 { left:0; top:0; width:66px !important; height:66px !important; }
html.theme-modern #navigation #n2 { left:69px; }
html.theme-modern #navigation #n3 { left:140px; }
html.theme-modern #navigation #n4 { left:201px; }
html.theme-modern #navigation #n5 { left:264px; }
html.theme-modern #navigation #n6 { left:327px; }
html.theme-modern #navigation #n7 { left:379px; }
html.theme-modern #navigation #n8 { left:439px; }
html.theme-modern #navigation li > a { position:absolute; inset:0; display:block; width:auto; height:auto; box-sizing:border-box; border-radius:50%; }
html.theme-modern #navigation li > a::after { left:-3px; top:-3px; width:62px; height:62px; }
html.theme-modern #navigation #n1 > a::after { left:1px; top:1px; }
html.theme-modern #navigation #n8 > a { --navy:-992px; }
html.theme-modern #navigation .indicator { position:absolute; z-index:6; top:-4px; right:-6px; width:27px; height:23px; box-sizing:border-box; padding-top:3px; background:url(../gpack/modern-reference/img_ltr/hud/topBar/navigation/indicator.png) no-repeat center / 27px 23px; color:#fff9eb; font:bold 10px/17px Arial,sans-serif; text-align:center; text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000,1px 1px #000,-1px -1px #000,1px -1px #000,-1px 1px #000; pointer-events:none; }
html.theme-modern #res, html.theme-modern ul#res.stockBar { left:247px !important; top:72px !important; }
html.theme-modern #stime { left:-150px !important; top:5px !important; }
html.theme-modern .modern-header-hero { left:121px; top:0; width:118px; height:118px; background:none; box-shadow:none; }
html.theme-modern .modern-header-hero .modern-hero-ring { position:absolute; inset:0; border-radius:50%; background:conic-gradient(#c0392b 0 var(--hp,100%), #3a2a20 var(--hp,100%) 100%); -webkit-mask:radial-gradient(circle, transparent 52px, #000 53px); mask:radial-gradient(circle, transparent 52px, #000 53px); opacity:.9; }
html.theme-modern .modern-header-hero .modern-hero-portrait { left:14px; top:14px; width:90px; height:90px; }
html.theme-modern .modern-hero-status { position:absolute; left:6px; top:6px; width:16px; height:16px; border-radius:50%; border:2px solid #fff9eb; box-shadow:0 1px 3px rgba(0,0,0,.6); background:#2aa82d; }
html.theme-modern .modern-hero-status.heroDead { background:#d01a1b; }
html.theme-modern .modern-hero-status.heroRunning { background:#f8db58; }
html.theme-modern .modern-hero-status.heroReviving { background:#ed7a14; }
html.theme-modern .modern-hero-status.heroReinforcing { background:#2a82a8; }
html.theme-modern .modern-hero-level { position:absolute; left:35px; top:85px; width:25px; height:25px; background:url(../gpack/modern-reference/img_ltr/hud/topBar/hero/frame/levelUp_medium.png) no-repeat center / 25px 25px; color:#fff9eb; font:bold 11px/25px Arial,sans-serif; text-align:center; font-style:normal; text-shadow:0 1px 1px #000; pointer-events:none; }
html.theme-modern .modern-hero-adventure { right:2px; top:14px; }
html.theme-modern .modern-hero-auction { right:-10px; top:42px; }
html.theme-modern .modern-hero-advcount { position:absolute; right:-6px; top:6px; min-width:14px; padding:0 3px; box-sizing:border-box; height:14px; border-radius:7px; background:#d01a1b; color:#fff; font:bold 10px/14px Arial,sans-serif; text-align:center; z-index:11; pointer-events:none; }
html.theme-modern #plusLink { position:absolute !important; left:747px !important; right:auto !important; top:0 !important; width:165px !important; height:66px !important; display:block !important; direction:ltr; }
html.theme-modern #plusLink #plus { position:absolute !important; top:0; width:80px; height:20px; margin:0; }
html.theme-modern #plusLink > div#plus:nth-of-type(2) { left:0; top:0; }
html.theme-modern #plusLink > div#plus:nth-of-type(3) { left:85px; top:0; }
html.theme-modern #plusLink > div#plus:nth-of-type(4) { left:85px; top:-24px; }
html.theme-modern #plusLink #gs { position:absolute !important; left:0; top:20px; width:165px !important; height:44px; margin:0; }
html.theme-modern #plusLink .currency { display:grid; grid-template-columns:40px 1fr 30px 1fr; grid-template-rows:44px; align-items:center; width:165px; height:44px; color:#fff9eb; font-weight:700; font-size:11px; }
html.theme-modern #plusLink .currency svg { width:22px; height:22px; justify-self:center; }
html.theme-modern #plusLink .currency .value, html.theme-modern #plusLink .currency .value a { color:#fff9eb !important; text-decoration:none; text-shadow:0 1px 2px #000; }
html.theme-modern #plusLink .currency .value { text-align:start; }
html.theme-modern .modern-header-shop { left:914px; top:10px; width:86px; height:86px; border-radius:50%; border:1px solid #34220d; box-sizing:border-box; background:url(../gpack/modern-reference/img_ltr/hud/topBar/shop.png) no-repeat 3px 3px / 78px auto; }
html.theme-modern .modern-header-shop:hover { background-position:3px -75px; }
html.theme-modern .modern-header-invite { left:1005px; top:11px; }
html.theme-modern .modern-header-invite svg.referAFriend { width:16px; height:16px; }
html.theme-modern .modern-header-invite svg path { fill:#fff9eb; stroke:none; }
html.theme-modern .modern-header-tools { gap:4px; }
.modern-clock-flags { display:flex; align-items:center; gap:10px; direction:ltr; }
html[dir=rtl] .modern-clock-flags, html.theme-modern .modern-clock-flags { justify-content:flex-start; }
/* v52: header/help/logout clean-up */
html.theme-modern #ingameManual, html.theme-modern #ingameManual img.question, html.theme-modern img.question { display:none !important; }
html.theme-modern #logoutContainer { display:none !important; }
html.theme-modern #navigation #n8 > a::after { background-position: 0 var(--navy); }

/* Header grid aligned to the original column layout (66 68 64 60 60 60 60 60, items end-aligned). */
html.theme-modern #navigation #n1, html.theme-modern #navigation #n2 { top:0; width:66px !important; height:66px !important; }
html.theme-modern #navigation #n1 { left:0; } html.theme-modern #navigation #n2 { left:68px; }
html.theme-modern #navigation #n2 > a::after { left:1px; top:1px; }
html.theme-modern #navigation #n3 { left:140px; } html.theme-modern #navigation #n4 { left:200px; }
html.theme-modern #navigation #n5 { left:260px; } html.theme-modern #navigation #n6 { left:320px; }
html.theme-modern #navigation #n7 { left:380px; } html.theme-modern #navigation #n8 { left:440px; }

/* ===== Top bar v24: recentred to the original 960px header, decorated background, SVG hero arcs, 665px stock bar ===== */
html.theme-modern #mtop::before { content:""; position:absolute; left:15px; top:0; width:960px; height:119px; z-index:0; pointer-events:none; border-style:solid; border-width:0 142px 119px 149px; border-image:url(../gpack/modern-reference/img_ltr/hud/topBar/headerBackground_referAFriend.png) 0 142 119 149 fill stretch; box-sizing:border-box; }
html.theme-modern #navigation { left:171px !important; z-index:2; }
html.theme-modern #res, html.theme-modern ul#res.stockBar { left:171px !important; top:72px !important; z-index:2; }
html.theme-modern .modern-header-hero { left:45px; z-index:3; }
html.theme-modern #plusLink { left:671px !important; z-index:3; }
html.theme-modern .modern-header-shop { left:838px; z-index:3; }
html.theme-modern .modern-header-invite { left:929px; z-index:3; }
html.theme-modern .modern-header-hero .modern-hero-ring { display:none !important; }
html.theme-modern .modern-hero-arcs { position:absolute; left:4px; top:4px; width:110px; height:110px; overflow:visible; pointer-events:none; z-index:1; }
html.theme-modern .modern-hero-arc-tooltips { position:absolute; left:4px; top:4px; width:110px; height:110px; overflow:visible; pointer-events:none; z-index:3; }
html.theme-modern .modern-hero-arc-tooltips path { fill:none; stroke:transparent; stroke-width:12px; pointer-events:stroke; }
html.theme-modern .modern-hero-arcs path.track { fill:#3b2c20; stroke:none; }



html.theme-modern .modern-header-hero .modern-hero-portrait { left:14px; top:14px; border-radius:50%; z-index:2; }
html.theme-modern .modern-header-hero .modern-hero-portrait::after { content:""; position:absolute; inset:0; background:url(../gpack/modern-reference/img_ltr/hud/topBar/hero/frame/heroFrame.png) no-repeat center / 90px 90px; pointer-events:none; }
html.theme-modern .modern-header-tools a[href*="discord"], html.theme-modern .modern-header-tools .discord { display:none !important; }
/* stock bar 665 = 376 + 5 + 284 */
html.theme-modern ul#res.stockBar { width:665px !important; height:36px !important; gap:0 !important; padding:0 3px !important; isolation:isolate; }
html.theme-modern ul#res.stockBar li.capacity { width:92px !important; min-width:92px; height:28px !important; padding:0 !important; border:0 !important; border-radius:0; background:none !important; box-shadow:none; display:grid; grid-template-columns:30px 1fr; align-items:center; font:700 11px Arial,sans-serif; color:#fff9eb; text-shadow:0 1px 1px #000; }
html.theme-modern ul#res.stockBar li.capacity img { height:22px; width:auto; justify-self:center; }
html.theme-modern ul#res.stockBar li.capacity .capValue { text-align:right; padding-right:6px; }
html.theme-modern ul#res.stockBar li.capacity::before { content:""; position:absolute; left:-3px; top:-3px; height:34px; z-index:-1; border-radius:4px; background:linear-gradient(180deg,#cba467 5%,#f3e2ae 13%,#efbf7b 32%,#aa8050 48%,#835e35 72%,#ad8a54 93%,#d7b672 100%); box-shadow:0 1px 2px rgba(0,0,0,.5); }
html.theme-modern ul#res.stockBar li.warehouse::before { width:376px; }
html.theme-modern ul#res.stockBar li.granary::before { width:284px; }
html.theme-modern ul#res.stockBar li.granary { margin-left:5px !important; }
html.theme-modern ul#res.stockBar li.stockBarButton { width:92px !important; grid-template-columns:30px 1fr 2px; border-radius:0; }
html.theme-modern ul#res.stockBar li.stockBarButton .value { text-align:right; font-size:11px; }
html.theme-modern ul#res.stockBar li.resource5 { width:92px !important; grid-template-columns:30px 1fr 2px; }
html.theme-modern ul#res.stockBar li.stockBarButton .bar-bg { left:30px; right:2px; bottom:1px; height:7px; background:#52372a; border:1px solid #52372a; box-sizing:border-box; box-shadow:none; }
/* dorf1 v25: sidebar boxes */
.modern-info-sidebar .modern-side-card{position:relative;z-index:0;background:none!important;border:0!important;box-shadow:none!important;padding:35px 25px 30px!important;margin:0 0 14px!important;box-sizing:border-box}
.modern-info-sidebar .modern-side-card::before{content:"";position:absolute;inset:0;z-index:-1;border-image:url(../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png) 38 53 fill / 38px 53px stretch}
.modern-info-sidebar .modern-side-card h2{font:700 16px/1.3 "Noto Serif",serif;letter-spacing:1.6px;text-transform:uppercase;color:#5e463a;margin:0 0 6px;padding:0 0 6px}
.modern-info-sidebar .modern-side-card a{display:block;color:#5e463a;font-size:12px;line-height:20px}
.sbx-buttons{position:absolute;top:-20px;right:25px;left:25px;display:flex;gap:5px;justify-content:flex-end;z-index:2}
.sbx-buttons.sbx-row{position:static;margin-top:8px;justify-content:center}
a.sbx-btn{position:relative;display:flex!important;align-items:center;justify-content:center;width:40px;height:40px;box-sizing:border-box;border-radius:50%;border:1px solid #34220d;background:linear-gradient(#cba467 5%,#f3e2ae 13%,#efbf7b 32%,#aa8050 48%,#835e35 72%,#ad8a54 93%,#d7b672 100%)}
a.sbx-btn::before{content:"";position:absolute;inset:2px;border-radius:50%;background:#546e39;border:1px solid #34220d;box-shadow:#63a90b 0 -2px 1px 1px inset,#578b11 2px -1px 1px 0 inset,#578b11 -2px -1px 1px 0 inset,#cfdcbe 0 2px 1px 1px inset}
a.sbx-btn svg{position:relative}
a.sbx-btn.sbx-grey::before{background:#777;box-shadow:#aaa 0 -2px 1px 1px inset,#cfcfcf 0 2px 1px 1px inset}
a.sbx-gold{display:inline-block!important;margin:6px 0;padding:2px 12px;border:1px solid #6b4a12;border-radius:4px;background:linear-gradient(#f3d27a,#c8962e);color:#3a2a08!important;font-weight:700}
.modern-info-line{display:flex;justify-content:space-between;font-size:12px;color:#5e463a}
.sbx-hint{font-size:11px;color:#666;margin:6px 0 0}
.sbx-toggle{display:block;width:100px;height:30px;margin:6px auto -30px;background:url(../gpack/modern-reference/img_ltr/hud/sidebar/toggle.png) no-repeat center}

/* dorf1 v26 */
html.theme-modern body.village1 #map_details.modern-village-details{padding-top:0!important;margin-top:0!important}
.villageInfobox{box-sizing:border-box;width:185px;padding:4px;border-radius:7px;background:rgba(255,255,255,.9);box-shadow:rgba(0,0,0,.5) 0 0 3px;font:13px/19px Arial,sans-serif;color:#333;margin:0 0 8px}
.villageInfobox table{width:100%;border-collapse:collapse;border:0!important;background:none!important}
.villageInfobox th{font:700 13px/19px Arial,sans-serif;text-align:start;border:0;background:none;padding:0 2px;color:#333}
.villageInfobox td{border:0!important;background:none!important;padding:0 2px;line-height:19px;height:19px;font-size:13px}
.villageInfobox td.ico{width:22px}
.villageInfobox td.ico div{width:18px;height:18px}
.villageInfobox td.num{text-align:end;white-space:nowrap}
.villageInfobox td.res{white-space:nowrap}
.villageInfobox td.un{max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.villageInfobox td.none{color:#777;font-size:12px}
.villageInfobox.production img.r1,.villageInfobox.production img.r2,.villageInfobox.production img.r3,.villageInfobox.production img.r4{width:18px;height:18px;background-size:contain;background-position:center;background-repeat:no-repeat;display:block}
.villageInfobox.production img.r1{background-image:url(../gpack/modern-reference/img_ltr/global/resources/lumber_tiny.png)}
.villageInfobox.production img.r2{background-image:url(../gpack/modern-reference/img_ltr/global/resources/clay_tiny.png)}
.villageInfobox.production img.r3{background-image:url(../gpack/modern-reference/img_ltr/global/resources/iron_tiny.png)}
.villageInfobox.production img.r4{background-image:url(../gpack/modern-reference/img_ltr/global/resources/crop_tiny.png)}
.productionBoost{text-align:center;margin-top:4px}
/* village list */
#sidebarBoxVillageList .boxTitle{font:700 16px/1.4 "Noto Serif",serif;letter-spacing:1.6px;text-transform:uppercase;color:#5e463a}
#sidebarBoxVillageList .boxTitle a{display:inline;font:inherit;color:inherit}
#sidebarBoxVillageList .boxTitle .slots{font-size:13px;letter-spacing:0;margin-inline-start:6px}
#sidebarBoxVillageList .barWrapper{width:100%;max-width:250px;height:9px;border-radius:2px;background:rgb(82,55,42);margin:4px 0 8px;overflow:hidden}
#sidebarBoxVillageList .barWrapper .bar{height:100%;background:linear-gradient(#f7c15a,#d98a1b)}
#sidebarBoxVillageList .groupsHeader{font-size:12px;color:#5e463a;border-bottom:1px solid rgba(94,70,58,.3);padding-bottom:3px;margin-bottom:3px}
#sidebarBoxVillageList .listEntry a{display:flex!important;justify-content:space-between;gap:6px;padding:1px 4px;font-size:13px;line-height:20px;color:#333;border-radius:3px;text-decoration:none}
#sidebarBoxVillageList .listEntry.active a,#sidebarBoxVillageList .listEntry a:hover{background:rgba(247,193,90,.45);font-weight:700}
#sidebarBoxVillageList .listEntry .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#sidebarBoxVillageList .listEntry .coordinatesGrid{color:#777;font-size:12px;white-space:nowrap}
#sidebarBoxVillageList .listEntry.attack a{color:#c00}
.modern-side-card.twWorldTimers .head,.modern-side-card.twWorldTimers .foot{display:none}
.modern-side-card.twWorldTimers .list{margin-top:0!important;font-size:12px;color:#5e463a}
/* field levels */
html.theme-modern body.village1 #content.modern-village-main #village_map div.level{width:26px;height:26px;box-sizing:border-box;border:1px solid #333;border-radius:50%;background:linear-gradient(to top,#606060,#c8c8c8)!important;box-shadow:#fff 0 0 2px inset;font:13px/23px Arial,sans-serif;color:#fff;padding:0!important;text-shadow:0 1px 1px #000}
html.theme-modern body.village1 #content.modern-village-main #village_map div.level.underConstruction{background:linear-gradient(to top,#d06d14,#ffc153)!important;border-color:#c46d16}
/* master builder strip */
html.theme-modern body.village1 .modern-village-main .buildingList{box-sizing:border-box;width:397px;max-width:100%;padding:7px;border-radius:7px;background:rgba(255,255,255,.9);box-shadow:rgba(0,0,0,.5) 0 0 3px;font:13px/1.4 Arial,sans-serif;color:#333}
.buildingList h5{font:400 13px/1.4 Arial,sans-serif;margin:0 0 4px}
.buildingList ul{list-style:none;margin:0;padding:0}
.buildingList li{display:flex;align-items:center;gap:6px;padding:2px 0}
.buildingList .lvl{font:700 12px Arial,sans-serif;color:#f88c1f}
.buildingList .buildStart,.buildingList .timer{font-size:11px;color:#6b6b6b}
/* plus.php v27: same framed panel as build pages, tabs and package cards. */
html.theme-modern body.plus #content h1.titleInHeader, html.theme-modern body.plus #content > h1 { color: #fff8ed; text-shadow: 0 1px 2px #49372a; }
html.theme-modern body.plus #contentOuterContainer .contentTitle { position: relative; }
html.theme-modern body.plus #content .contentNavi.subNavi { background: #6f5748; border-radius: 3px 3px 0 0; padding: 0 6px; margin: 0 0 14px; display: flex; flex-wrap: wrap; width: auto; height: auto; }
html.theme-modern body.plus #content .contentNavi.subNavi .container { float: none; background: none; height: auto; margin: 0; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content, html.theme-modern body.plus #content .contentNavi.subNavi .container a { color: #fff !important; font-weight: bold; padding: 8px 10px; display: block; background: none; text-decoration: none; }
html.theme-modern body.plus #content .contentNavi.subNavi .container.active { background: #a58b73; }
html.theme-modern body.plus #content .contentNavi.subNavi .container.active .content { color: #fff !important; }
html.theme-modern body.plus #content .contentNavi.subNavi .container:hover { background: #8a6f5a; }
html.theme-modern body.plus #content { color: #42372a; }
html.theme-modern body.plus #content a { color: #5f7a28; }
/* v28: stock bar fit + plus tabs */
html.theme-modern ul#res.stockBar li.stockBarButton { grid-template-columns:26px 1fr 2px !important; }
html.theme-modern ul#res.stockBar li.stockBarButton .value { font-size:10px !important; letter-spacing:-.2px; padding-right:2px; overflow:hidden; }
html.theme-modern ul#res.stockBar li.stockBarButton .resIcon { max-width:22px; }
html.theme-modern ul#res.stockBar li.stockBarButton .bar-bg { left:26px !important; }
html.theme-modern ul#res.stockBar li.capacity { font-size:10px !important; grid-template-columns:26px 1fr !important; }
body.plus #content .contentNavi.subNavi { justify-content:center; gap:2px; }
body.plus #content .contentNavi.subNavi .container { min-width:90px; text-align:center; border-radius:3px 3px 0 0; }
body.plus #content .contentNavi.subNavi .container.active { background:#7aa22f; }
body.plus #content { text-align:center; }
body.plus #content p, body.plus #content .contentNavi { text-align:center; }
/* v29: plus tabs single row */
body.plus #content .contentNavi.subNavi { flex-wrap:nowrap !important; justify-content:flex-start !important; padding:0 !important; gap:0 !important; }
body.plus #content .contentNavi.subNavi font { color:inherit !important; }
body.plus #content .contentNavi.subNavi .container { flex:1 1 auto; min-width:0 !important; padding:0 !important; margin:0 !important; }
body.plus #content .contentNavi.subNavi .container .content a { display:block; padding:10px 6px; color:#f6ecd8 !important; font-weight:bold; white-space:nowrap; font-size:11px; padding:10px 3px; text-decoration:none; }
body.plus #content .contentNavi.subNavi .container.active .content a { color:#fff !important; }
body.plus #content .contentNavi.subNavi .container:hover { background:#8a6b57; }

/* ---- Build page (gid15) rebuilt to match the live reference layout ---- */
html.theme-modern body.build .contentNavi.subNavi {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    margin: 0 0 10px;
    padding: 4px;
    border: 1px solid #34220d;
    border-radius: 4px;
    background: #6f5540 linear-gradient(#8a6d52, #614a37);
    box-shadow: inset 0 0 0 1px #9a7d5e;
}
html.theme-modern body.build .contentNavi.subNavi .content {
    display: flex;
    flex: 1 1 auto;
    height: 44px;
    margin: 0 2px;
}
html.theme-modern body.build .contentNavi.subNavi a.tabItem {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    border-radius: 3px;
    font: 700 13px/1 Verdana, Arial, sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,.45);
    text-decoration: none;
}
html.theme-modern body.build .contentNavi.subNavi a.tabItem.active { background: #85664a; color: #f2e1d0; box-shadow: inset 0 1px 0 #a98a6b; }
html.theme-modern body.build .contentNavi.subNavi a.tabItem.normal { background: #5f473b; color: #ecce8e; }
html.theme-modern body.build .contentNavi.subNavi a.tabItem.normal:hover { background: #70543f; color: #ffe2ab; }

html.theme-modern body.build #build.gid15 .build_desc,
html.theme-modern body.build #build.gid15 .build_logo { display: none; }

html.theme-modern body.build #build.gid15 .upgradeHeader {
    position: relative;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: 160px;
    padding: 20px 0 0 20px;
    background: #a8bb78 url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/background2.jpg) left top no-repeat;
}
html.theme-modern body.build #build.gid15 .upgradeHeader .buildingIllustrationLink {
    position: absolute;
    top: 0;
    right: 0;
    width: 241px;
    height: 160px;
}
html.theme-modern body.build #build.gid15 .buildingIllustration {
    display: block;
    width: 241px;
    height: 160px;
    background: center center no-repeat;
}
html.theme-modern body.build #build.gid15 .buildingIllustration.roman { background-image: url(modern-illustration-roman-g15.png); }
html.theme-modern body.build #build.gid15 .buildingIllustration.teuton { background-image: url(modern-illustration-teuton-g15.png); }
html.theme-modern body.build #build.gid15 .buildingIllustration.gaul { background-image: url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/buildingIllustrations/gaul/g15.png); }
html.theme-modern body.build #build[class*=gid] table#build_value { border-collapse: collapse; }
html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value th,
html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value td {
    padding: 2px 0;
    color: #f2f2f2;
    font: 400 13px/16px Verdana, Arial, sans-serif;
    text-align: left;
    text-shadow: 0 1px 1px rgba(0,0,0,.5);
}
html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value th { padding-right: 25px; font-weight: 400; }
html.theme-modern body.build #build[class*=gid] table#build_value .number { font-weight: 700; }

html.theme-modern body.build #build.gid15 .buildingDescription { margin-top: 8px; }
html.theme-modern body.build #build.gid15 .buildingDescription .headline {
    position: relative;
    box-sizing: border-box;
    height: 27px;
    margin: 0;
    padding: 0 0 0 10px;
    border: 1px solid #a1bc79;
    background: linear-gradient(to right, #cbe0ac, #f9fbf4);
    cursor: pointer;
}
html.theme-modern body.build #build.gid15 .buildingDescription .headline h4 {
    margin: 0;
    color: #4b5f2b;
    font: 700 14px/25px Verdana, Arial, sans-serif;
}
html.theme-modern body.build #build.gid15 .buildingDescription .openedClosedSwitch {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #b8cf95;
    border: 1px solid #86a35e;
    border-radius: 2px;
}
html.theme-modern body.build #build.gid15 .buildingDescription .description {
    padding: 20px 0;
    color: #333;
    font: 400 13px/16px Verdana, Arial, sans-serif;
}
html.theme-modern body.build #build.gid15 .buildingDescription.rearrangeBox .rearrangeButton { padding-bottom: 10px; }

html.theme-modern body.build #build[class*=gid] #contract,
html.theme-modern body.build #contract.contractWrapper {
    float: none;
    clear: both;
    box-sizing: border-box;
    width: auto;
    margin: 0 10px;
    padding: 10px 0;
    border: 0;
    border-radius: 0;
    background: none;
}
html.theme-modern .inlineIconList.resourceWrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
html.theme-modern .inlineIconList.resourceWrapper .inlineIcon.resource {
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    padding: 1px 4px;
    border: 1px solid #5e463a;
    border-radius: 4px;
    background: #f4efe4;
    color: #4b3a2a;
    font: 700 11px/16px Verdana, Arial, sans-serif;
}
html.theme-modern .inlineIconList.resourceWrapper .inlineIcon.resource.notEnough { background: #ffcec2; color: #8d2116; }
html.theme-modern .inlineIconList.resourceWrapper i { display: block; width: 26px; height: 19px; background-position: center; background-repeat: no-repeat; }
html.theme-modern i.r1Big { background-image: url(../gpack/modern-reference/img_ltr/global/resources/lumber_small.png); }
html.theme-modern i.r2Big { background-image: url(../gpack/modern-reference/img_ltr/global/resources/clay_small.png); }
html.theme-modern i.r3Big { background-image: url(../gpack/modern-reference/img_ltr/global/resources/iron_small.png); }
html.theme-modern i.r4Big { background-image: url(../gpack/modern-reference/img_ltr/global/resources/crop_small.png); }
html.theme-modern i.cropConsumptionBig { background-image: url(../gpack/modern-reference/img_ltr/global/resources/crop_small.png); filter: grayscale(.35); }
html.theme-modern i.clock_medium { background-image: url(../gpack/modern-reference/img_ltr/global/measure/clock_medium.png); }
html.theme-modern i.culturePoints_medium { width: 26px; height: 24px; background-image: url(../gpack/modern-reference/img_ltr/global/measure/culturePoints_medium.png); }
html.theme-modern i.population_medium { width: 26px; height: 24px; background-image: url(../gpack/modern-reference/img_ltr/global/measure/population_medium.png); }
html.theme-modern i.constructionTime_medium { width: 26px; height: 24px; background-image: url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/buildingBonus/constructionTime_medium.png); }
html.theme-modern .clocks.inlineIcon.duration { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: #4b3a2a; font: 700 11px/16px Verdana, Arial, sans-serif; }

html.theme-modern body.build #build[class*=gid] .upgradeBlocked { margin: 6px 0; }
html.theme-modern body.build #build[class*=gid] .errorMessage { color: #777; font: 400 12px/16px Verdana, Arial, sans-serif; }

html.theme-modern .textButtonV1 {
    cursor: pointer;
    border-radius: 5px;
    font: 700 11px/16px Verdana, Arial, sans-serif;
    text-decoration: none;
}
html.theme-modern button.textButtonV1.gold.exchange { margin-top: 6px; }
html.theme-modern button.textButtonV1.purple {
    height: 25px;
    padding: 4px 20px;
    border: 1px solid #665a6f;
    background: #7c7182;
    color: #f4eef7;
}
html.theme-modern button.textButtonV1[disabled] { opacity: .65; cursor: default; }

html.theme-modern body.build #build[class*=gid] .buildingBenefits { margin: 6px 10px 0; }
html.theme-modern body.build #build[class*=gid] .buildingBenefits .wrapper { display: flex; flex-wrap: wrap; gap: 20px; }
html.theme-modern body.build #build[class*=gid] .buildingBenefits .unit { display: flex; align-items: center; gap: 5px; color: #4b3a2a; font: 700 11px/16px Verdana, Arial, sans-serif; }
html.theme-modern body.build #build[class*=gid] .buildingBenefits .unit i { display: block; width: 26px; height: 24px; background-position: center; background-repeat: no-repeat; }
html.theme-modern body.build #build[class*=gid] .buildingBenefits .delta { color: #4a8a1e; font-weight: 700; }

html.theme-modern body.build #build[class*=gid] .upgradeButtonsContainer {
    display: flex;
    align-items: flex-start;
    margin: 10px 10px 0;
    padding: 10px 0;
}
html.theme-modern body.build #build[class*=gid] .upgradeButtonsContainer .section1 {
    width: 274px;
    padding-right: 15px;
    border-right: 1px dotted #c0c0c0;
}
html.theme-modern body.build #build[class*=gid] .upgradeButtonsContainer .section2 { padding-left: 15px; }
html.theme-modern body.build #build[class*=gid] .upgradeButtonsContainer .builderHint { display: block; color: #4b3a2a; font: 700 11px/16px Verdana, Arial, sans-serif; }
html.theme-modern body.build #build[class*=gid] button.build { margin: 4px 0; }

/* ---- plus.php tidy ---- */
html.theme-modern body.plus h1.titleInHeader,
html.theme-modern body.plus #content h1 { color: #fff8ed !important; text-shadow: 0 1px 2px #49372a; }
html.theme-modern body.build #build[class*=gid] table#build_value, html.theme-modern body.build #build[class*=gid] table#build_value tr, html.theme-modern body.build #build[class*=gid] table#build_value th, html.theme-modern body.build #build[class*=gid] table#build_value td { background: transparent !important; }
html.theme-modern body.build .contentNavi.subNavi a.tabItem.active, html.theme-modern body.build .contentNavi.subNavi a.tabItem.active:visited { color: #f2e1d0 !important; }
html.theme-modern body.build .contentNavi.subNavi a.tabItem.normal, html.theme-modern body.build .contentNavi.subNavi a.tabItem.normal:visited { color: #ecce8e !important; }
html.theme-modern body.build #build[class*=gid] .contractWrapper > .clocks { display: none; }
/* value table on ordinary building pages */
html.theme-modern body.build #build:not(.gid15) table#build_value { margin: 8px 0 4px; border-collapse: collapse; }
html.theme-modern body.build #build:not(.gid15) table#build_value th,
html.theme-modern body.build #build:not(.gid15) table#build_value td {
    padding: 2px 6px 2px 0; color: #4b3a2a; font: 400 13px/17px Verdana, Arial, sans-serif; text-align: left;
}
html.theme-modern body.build #build:not(.gid15) table#build_value th { font-weight: 400; }
html.theme-modern body.build #build:not(.gid15) table#build_value td b { font-weight: 700; color: #3f2d1c; }
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] th,
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] td,
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] td b { color: #c4741b !important; }

/* value table on ordinary building pages */
html.theme-modern body.build #build:not(.gid15) table#build_value { margin: 8px 0 4px; border-collapse: collapse; }
html.theme-modern body.build #build:not(.gid15) table#build_value th,
html.theme-modern body.build #build:not(.gid15) table#build_value td {
    padding: 2px 6px 2px 0; color: #4b3a2a; font: 400 13px/17px Verdana, Arial, sans-serif; text-align: left;
}
html.theme-modern body.build #build:not(.gid15) table#build_value th { font-weight: 400; }
html.theme-modern body.build #build:not(.gid15) table#build_value td b { font-weight: 700; color: #3f2d1c; }
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] th,
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] td,
html.theme-modern body.build #build:not(.gid15) table#build_value tr[style] td b { color: #c4741b !important; }

/* ---- v34: plus.php modern tabs + package cards ---- */
html.theme-modern body.plus #content .contentNavi.subNavi { box-sizing: border-box; width: 100% !important; margin: 0 0 14px; border-radius: 4px; background: #6f5540 linear-gradient(#8a6d52, #614a37) !important; border: 1px solid #34220d; }
html.theme-modern body.plus #content .contentNavi.subNavi .container { flex: 1 1 0; text-align: center; border-radius: 0; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a { padding: 10px 2px; font-size: 11px; color: #ecce8e !important; }
html.theme-modern body.plus #content .contentNavi.subNavi .container.active { background: rgba(0,0,0,.25) !important; box-shadow: inset 0 -3px 0 #f88c1f; }
html.theme-modern body.plus #content .contentNavi.subNavi .container.active .content a { color: #f2e1d0 !important; }
html.theme-modern body.plus #content .whatToDo { text-align: center; font: 700 13px/20px Verdana, Arial, sans-serif; color: #4b3a2a; margin: 6px 0 10px; }
html.theme-modern body.plus #content #products { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 4px 0 8px; }
html.theme-modern body.plus #content #products > br { display: none; }
html.theme-modern body.plus #content #products .whatToDo { flex: 0 0 100%; }
html.theme-modern body.plus #content #products .clear { display: none; }
html.theme-modern body.plus #content .productBackground { float: none !important; background: linear-gradient(#fffdf6, #f1e6cf) !important; width: 150px; height: auto; min-height: 214px; margin: 0; border: 1px solid #c9b48f; border-radius: 6px; box-shadow: 0 1px 3px rgba(60,40,10,.35); overflow: hidden; transition: transform .12s, box-shadow .12s; }
html.theme-modern body.plus #content .productBackground:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(60,40,10,.45); border-color: #f88c1f; }
html.theme-modern body.plus #content #products table.product { width: 100%; margin: 0; border-collapse: collapse; }
html.theme-modern body.plus #content #products table.product th { padding: 0; }
html.theme-modern body.plus #content #products table.product .boxes { background: linear-gradient(#ffa94a, #e8741a); border-radius: 0; margin: 0; }
html.theme-modern body.plus #content #products table.product .boxes > div:not(.boxes-contents) { display: none; }
html.theme-modern body.plus #content #products table.product th div.boxes-contents { padding: 7px 4px; color: #fff; font: 700 13px Verdana, Arial, sans-serif; text-align: center; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
html.theme-modern body.plus #content #products table.product td.pic { padding: 10px 0 6px; text-align: center; }
html.theme-modern body.plus #content #products table.product td.pic img { background: #fff; border: 1px solid #d9c9a8; border-radius: 6px; padding: 4px; box-sizing: content-box; }
html.theme-modern body.plus #content #products table.product td.units, html.theme-modern body.plus #content #products table.product td.price { padding: 3px 6px !important; text-align: center !important; font: 700 13px Tahoma, Arial, sans-serif; color: #4b3a2a; }
html.theme-modern body.plus #content #products table.product td.price { color: #5f7a28; padding-bottom: 12px !important; }
html.theme-modern body.plus #content .productBackground a.bookProduct, html.theme-modern body.plus #content .productBackground a.bookProduct img { width: 100%; height: 100%; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content { padding: 0 !important; margin: 0 !important; width: 100%; float: none; display: block; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a { padding: 10px 4px !important; display: block; overflow: hidden; text-overflow: ellipsis; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .background-start, html.theme-modern body.plus #content .contentNavi.subNavi .container .background-end { display: none !important; }
html.theme-modern body.plus #content .contentNavi.subNavi { overflow: visible; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a,
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a span { white-space: nowrap; font-size: 10px; letter-spacing: -.1px; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content { display: block; width: 100%; box-sizing: border-box; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a span.tabItem { display: inline; padding: 0 !important; margin: 0 !important; font-size: 11px !important; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content { padding: 0 !important; margin: 0 !important; width: 100% !important; }
html.theme-modern body.plus #content .contentNavi.subNavi .container .content a { width: 100% !important; box-sizing: border-box; text-align: center; }
html.theme-modern body.plus #content .contentNavi.subNavi { overflow: hidden; }

html.theme-modern body.statistics .modern-inner-page > #contentOuterContainer { background:#b49d86; border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body.statistics .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; border:1px solid #715a49; }
html.theme-modern body.statistics #content h1.titleInHeader { font:bold 22px Georgia,serif; text-shadow:0 1px 2px #4a3328; }
html.theme-modern body.statistics #content .contentNavi.subNavi { display:flex; height:auto; min-height:38px; padding:2px; margin:0 0 18px; border:2px solid #92724b; background:#4e392e; box-sizing:border-box; }
html.theme-modern body.statistics #content .contentNavi.subNavi .container { float:none; flex:1 1 auto; height:auto; margin:0; border-inline-end:1px solid #a48258; background:linear-gradient(#6e5040,#513a30); text-align:center; }
html.theme-modern body.statistics #content .contentNavi.subNavi .container:last-of-type { border-inline-end:0; }
html.theme-modern body.statistics #content .contentNavi.subNavi .container.active { background:linear-gradient(#977c60,#725742); }
html.theme-modern body.statistics #content .contentNavi.subNavi .container .content { display:block; float:none; width:auto; height:auto; padding:0; }
html.theme-modern body.statistics #content .contentNavi.subNavi .container a { display:block; padding:10px 4px; white-space:normal; text-decoration:none; }
html.theme-modern body.statistics #content .contentNavi.subNavi .container .tabItem { padding:0; color:#e9ce92 !important; font-weight:bold; }
html.theme-modern body.statistics #content .contentNavi.subNavi .background-start, html.theme-modern body.statistics #content .contentNavi.subNavi .background-end, html.theme-modern body.statistics #content .contentNavi.subNavi > .clear { display:none; }
html.theme-modern body.statistics #content h4.round { margin:12px 0; padding:5px 10px; color:#222; background:#dcece3; border-radius:4px; }
html.theme-modern body.statistics #content table.row_table_data { width:100%; border-collapse:collapse; background:#fbfaf5; }
html.theme-modern body.statistics #content table.row_table_data thead td, html.theme-modern body.statistics #content table.row_table_data thead th { padding:8px 6px; color:#665249; background:#fbfaf5; font-weight:bold; border-bottom:1px solid #c9c5bc; }
html.theme-modern body.statistics #content table.row_table_data tbody td { padding:10px 6px; color:#665249; background:#fbfaf5; border:0; border-bottom:1px solid #d1cec6; }
html.theme-modern body.statistics #content table.row_table_data tbody tr:hover td { background:#f0f3df; }
html.theme-modern body.statistics #content table.row_table_data a { color:#68962a; font-weight:bold; }
html.theme-modern body.statistics #content .top10Wrapper { box-sizing:border-box; width:calc((100% - 16px) / 2); min-width:0; }
html.theme-modern body.statistics #content .top10Wrapper h4.round { box-sizing:border-box; width:100%; margin:0 0 4px; padding:5px 10px; }
html.theme-modern body.statistics #content .top10Wrapper h4.spacer { margin-top:16px; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 { width:100%; table-layout:fixed; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 thead td { padding:5px 4px; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 tbody td { padding:6px 4px; overflow-wrap:anywhere; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 td:first-child { width:38px; text-align:start; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 td:last-child { width:30%; text-align:end; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 td.empty { width:auto; height:3px; padding:0; border:0; }
html.theme-modern body.statistics #content .top10Wrapper table.top10 tr.own td { background:#e7efce; }

/* ---- v36: ordinary building pages: themed illustration ---- */
html.theme-modern body.build #build[class*=gid]:not(.gid15) .build_logo { background: #a8bb78 url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/background2.jpg) center center / cover no-repeat; border: 1px solid #b9c79b; box-sizing: border-box; }
html.theme-modern body.build #build[class*=gid]:not(.gid15) .build_logo img.building { display:block; float:none; width:100%; height:160px; margin:0 auto; background-position:center center; }
html.theme-modern body.build #build.gid10 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g10.png); }
html.theme-modern body.build #build.gid11 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g11.png); }
html.theme-modern body.build #build.gid13 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g13.png); }
html.theme-modern body.build #build.gid14 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g14.png); }
html.theme-modern body.build #build.gid15 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g15.png); }
html.theme-modern body.build #build.gid16 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g16.png); }
html.theme-modern body.build #build.gid17 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g17.png); }
html.theme-modern body.build #build.gid18 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g18.png); }
html.theme-modern body.build #build.gid19 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g19.png); }
html.theme-modern body.build #build.gid20 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g20.png); }
html.theme-modern body.build #build.gid21 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g21.png); }
html.theme-modern body.build #build.gid22 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g22.png); }
html.theme-modern body.build #build.gid23 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g23.png); }
html.theme-modern body.build #build.gid24 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g24.png); }
html.theme-modern body.build #build.gid25 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g25.png); }
html.theme-modern body.build #build.gid26 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g26.png); }
html.theme-modern body.build #build.gid27 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g27.png); }
html.theme-modern body.build #build.gid28 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g28.png); }
html.theme-modern body.build #build.gid29 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g29.png); }
html.theme-modern body.build #build.gid30 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g30.png); }
html.theme-modern body.build #build.gid34 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g34.png); }
html.theme-modern body.build #build.gid36 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g36.png); }
html.theme-modern body.build #build.gid37 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g37.png); }
html.theme-modern body.build #build.gid38 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g38.png); }
html.theme-modern body.build #build.gid39 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g39.png); }
html.theme-modern body.build #build.gid46 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g46.png); }
html.theme-modern body.build #build.gid49 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g49.png); }
html.theme-modern body.build #build.gid5 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g5.png); }
html.theme-modern body.build #build.gid6 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g6.png); }
html.theme-modern body.build #build.gid7 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g7.png); }
html.theme-modern body.build #build.gid8 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g8.png); }
html.theme-modern body.build #build.gid9 .build_logo img.building { background-repeat:no-repeat; background-size:auto 150px; background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g9.png); }

html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .build_logo img.building { mix-blend-mode: multiply; background-size: auto 150px; }

html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .build_logo img.building { display: none; }
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .build_logo { background-image: url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/background1.jpg); }

html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .build_logo img.building { display: none !important; }

/* v37: real illustrated resource-field buildings (gid 1-4), matching the reference upgradeBuilding illustrations */
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .build_logo img.building { display: block !important; mix-blend-mode: normal !important; width: 100%; height: 160px; background-repeat: no-repeat; background-position: center center; background-size: auto 160px; }
html.theme-modern body.build #build.gid1 .build_logo img.building { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g1.png); }
html.theme-modern body.build #build.gid2 .build_logo img.building { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g2.png); }
html.theme-modern body.build #build.gid3 .build_logo img.building { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g3.png); }
html.theme-modern body.build #build.gid4 .build_logo img.building { background-image: url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g4.png); }
html.theme-modern body.build.tribe-building-art #build[class*=gid]:not(.gid15) .build_logo img.building { background-image:var(--tribe-building-image); }

/* v41: single world-timers card in right column */
html.theme-modern .modern-side-card.twWorldTimers{padding:14px 16px!important;text-align:center;line-height:1.7}
html.theme-modern .modern-side-card.twWorldTimers center{display:block}
html.theme-modern .modern-side-card.twWorldTimers b{color:#3a2a1f}
html.theme-modern #sideInfoCountdown{display:block!important}

/* v53: active village box (reference geometry) */
html.theme-modern #sidebarBoxActiveVillage{display:inline-block;position:relative;box-sizing:border-box;width:300px;height:140px;margin:0 0 14px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
html.theme-modern #sidebarBoxActiveVillage>div.header{position:relative;z-index:1;box-sizing:border-box;width:300px;height:44px;margin:0;padding:0;background:none;border:0}
html.theme-modern #sidebarBoxActiveVillage .quickLinks{display:grid!important;grid-template-columns:44px 44px 44px 44px 26px;column-gap:1px;justify-content:end;align-items:center;width:280px;height:44px;margin:0 10px -30px;padding:0}
html.theme-modern #sidebarBoxActiveVillage .quickLinkSlot{width:44px;height:44px;flex:none;display:grid;place-items:center;box-sizing:border-box}
html.theme-modern #sidebarBoxActiveVillage .quickLinkSlot .slot{width:40px;height:40px;box-sizing:border-box;display:grid;border:1px solid rgba(94,70,58,.2);border-radius:0;background:none;opacity:1}
html.theme-modern #sidebarBoxActiveVillage .quickLinkSlot:hover .slot{border-style:dashed;border-color:#b9a98f;opacity:.6}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton{display:grid;place-items:center;width:40px;height:40px;box-sizing:border-box;border-radius:0;border:1px solid #34220d;box-shadow:none;background:linear-gradient(#cba467 5%,#f3e2ae 13%,#efbf7b 32%,#aa8050 48%,#835e35 72%,#ad8a54 93%,#d7b672 100%)}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton svg.qlIcons{position:relative;display:block;width:22px;height:22px}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton svg.qlIcons svg{position:absolute;inset:0;width:100%;height:100%}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton svg.qlIcons svg.outline{fill:#aa6928;stroke:#aa6928;stroke-width:12;stroke-linejoin:round}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton svg.qlIcons svg.icon{fill:#fff9eb;stroke:none}
html.theme-modern #sidebarBoxActiveVillage a.layoutButton.disabled{filter:grayscale(1);opacity:.55;pointer-events:none}
html.theme-modern #sidebarBoxActiveVillage a.settings{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:0;border:1px solid #34220d;background:linear-gradient(#cba467,#ad8a54)}
html.theme-modern #sidebarBoxActiveVillage a.settings svg{width:13px;height:3px}
html.theme-modern #sidebarBoxActiveVillage>div.content{position:relative;z-index:0;box-sizing:border-box;display:grid;grid-template-columns:1fr 1fr;align-content:start;width:300px;margin:-30px 0 0;padding:35px 25px 30px;text-align:start;background:none!important;border:0!important}
html.theme-modern #sidebarBoxActiveVillage>div.content::before{content:"";position:absolute;inset:0;z-index:-1;border-image:url(../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png) 38 53 fill / 38px 53px stretch}
html.theme-modern #sidebarBoxActiveVillage .playerName{grid-column:1 / -1;font:700 12px/16px "Noto Serif",serif;color:#5e463a;margin:0 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.theme-modern #sidebarBoxActiveVillage #villageName{grid-column:1 / -1;position:static!important;width:auto!important;min-height:0!important;height:22px;margin:0 0 5px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;border-image:none!important}
html.theme-modern #sidebarBoxActiveVillage #villageName form{position:relative;display:block;height:22px;margin:0}
html.theme-modern #sidebarBoxActiveVillage input.villageInput{box-sizing:border-box;width:100%;max-width:100%;height:22px;line-height:20px;padding:0 18px 0 0;border:1px solid transparent;background:transparent;font:700 16px/20px "Noto Serif",serif;letter-spacing:1.6px;color:#5e463a;text-align:start;outline:0}
html.theme-modern #sidebarBoxActiveVillage input.villageInput:hover,html.theme-modern #sidebarBoxActiveVillage input.villageInput:focus{border-color:rgba(94,70,58,.45);background:#fffdf6}
html.theme-modern #sidebarBoxActiveVillage svg.rename{position:absolute;inset-inline-end:1px;top:4px;width:10px;height:14px;fill:#8a7560;cursor:pointer}
html.theme-modern #sidebarBoxActiveVillage .population{font-size:11px;line-height:15px;color:#666;margin:0}
html.theme-modern #sidebarBoxActiveVillage .loyalty{font-size:11px;line-height:15px;color:#666;text-align:end;margin:0}

/* v47 rally point */
html.theme-modern body.build .gid16 .rally-tabs { background:linear-gradient(#7a5a44,#4e3626); border:1px solid #2e1f13; border-radius:4px 4px 0 0; margin-bottom:14px; }
html.theme-modern body.build .gid16 .rally-tabs .container { background:none; border-inline-end:1px solid rgba(0,0,0,.35); }
html.theme-modern body.build .gid16 .rally-tabs .container.active { background:linear-gradient(#e9d7ae,#c9aa72); }
html.theme-modern body.build .gid16 .rally-tabs .container.active .tabItem { color:#3b2a18 !important; font-weight:bold; }
html.theme-modern body.build .gid16 .troop_details td { white-space:nowrap; overflow-wrap:normal; font-size:11px; padding:4px 1px; }
html.theme-modern body.build .gid16 .troop_details td.none { color:#aaa; }
html.theme-modern body.build .gid16 .troop_details thead td, html.theme-modern body.build .gid16 .troop_details thead td a { background:#f3ead4; font-weight:bold; text-align:start; padding-inline:6px; }
html.theme-modern body.build .gid16 .troop_details .infos th, html.theme-modern body.build .gid16 .troop_details .infos td { background:#f1efe8; }
html.theme-modern body.build .gid16 h4.spacer { margin:12px 0 4px; font-size:13px; color:#3b2a18; }
html.theme-modern body.build .gid16 .rally-tabs { height:auto !important; overflow:visible !important; flex-wrap:nowrap; }
html.theme-modern body.build .gid16 .rally-tabs .container { height:auto !important; flex:1 1 0; min-width:0; }
html.theme-modern body.build .gid16 .rally-tabs .container a { padding:9px 4px; line-height:16px; height:auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.theme-modern body.build .gid16 .rally-tabs .container .tabItem { display:inline; line-height:16px; }
html.theme-modern body.build .gid16 .rally-tabs .container a { padding:9px 2px; text-overflow:clip; }
html.theme-modern body.build .gid16 .rally-tabs .container .tabItem { font-size:10px; }


/* v53: questmaster card (reference geometry) */
html.theme-modern #sidebarBoxQuestmaster{display:inline-block;position:relative;box-sizing:border-box;width:300px;margin:10px 0 0;padding:0;background:none;border:0;box-shadow:none;overflow:visible}
html.theme-modern #sidebarBoxQuestmaster>.header{position:relative;z-index:1;display:grid;width:300px;height:122px;margin:0 0 -6px;padding:0}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton{position:relative;display:grid;justify-self:start;margin:0 0 0 70px;width:160px;height:122px;padding:0;border:0;background:none;cursor:pointer;outline:0}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton svg{display:block;width:160px;height:122px}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton .colorStop1{stop-color:#5d8137}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton .colorStop2{stop-color:#b9d890}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton .colorStop3{stop-color:#466428}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton .colorStop4{stop-color:#344a1d}
html.theme-modern #sidebarBoxQuestmaster #questmasterButton img.mentor{position:absolute;left:5px;top:4px;width:150px;height:118px;display:block}
html.theme-modern #sidebarBoxQuestmaster .bigSpeechBubble{position:absolute;left:-5px;top:50px;width:55px;height:44px;background:url(../gpack/modern-reference/img_ltr/legacy/components/speechBubble/speechBalloonLarge.png) no-repeat}
html.theme-modern #sidebarBoxQuestmaster .bigSpeechBubble img{position:absolute;left:6px;top:6px;width:30px;height:30px}
html.theme-modern #sidebarBoxQuestmaster>.content{position:relative;z-index:0;box-sizing:border-box;display:block;width:300px;padding:35px 25px 30px;background:none}
html.theme-modern #sidebarBoxQuestmaster>.content::before{content:"";position:absolute;inset:0;z-index:-1;border-image:url(../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png) 38 53 fill / 38px 53px stretch}
html.theme-modern #sidebarBoxQuestmaster a.progressiveTasksTitle{display:block;text-decoration:none}
html.theme-modern #sidebarBoxQuestmaster .boxTitle{box-sizing:border-box;width:250px;height:26px;padding:5px;font:700 16px/16px "Noto Serif",serif;letter-spacing:1.6px;text-transform:uppercase;color:#5e463a;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.theme-modern #sidebarBoxQuestmaster #anm,html.theme-modern #sidebarBoxQuestmaster #qge{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}
html.theme-modern #sidebarBoxQuestmaster #qge #qgei{width:1px;height:1px}
html.theme-modern[lang=fa] #sidebarBoxQuestmaster .boxTitle{letter-spacing:0;font-family:Vazirmatn,Tahoma,"Noto Serif",serif;font-size:15px}
html.theme-modern #sidebarBoxQuestmaster{position:relative;top:0 !important;left:0 !important;right:auto !important;bottom:auto !important;float:none}

html.theme-modern body.reports .modern-inner-page > #contentOuterContainer { background:#b49d86; border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body.reports .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; border:1px solid #715a49; }
html.theme-modern body.reports #content h1.titleInHeader { font:bold 22px Georgia,serif; text-shadow:0 1px 2px #4a3328; }
html.theme-modern body.reports #content .contentNavi.subNavi { display:flex; height:auto; min-height:38px; padding:2px; margin:0 0 18px; border:2px solid #92724b; background:#4e392e; box-sizing:border-box; }
html.theme-modern body.reports #content .contentNavi.subNavi .container { float:none; flex:1 1 auto; height:auto; margin:0; border-inline-end:1px solid #a48258; background:linear-gradient(#6e5040,#513a30); text-align:center; }
html.theme-modern body.reports #content .contentNavi.subNavi .container.active { background:linear-gradient(#d9ba7c,#ab874d); }
html.theme-modern body.reports #content .contentNavi.subNavi .container .content { display:block; float:none; width:auto; height:auto; padding:0; }
html.theme-modern body.reports #content .contentNavi.subNavi .container a { display:block; padding:10px 4px; text-decoration:none; }
html.theme-modern body.reports #content .contentNavi.subNavi .container .tabItem { padding:0; color:#e9ce92 !important; font-weight:bold; }
html.theme-modern body.reports #content .contentNavi.subNavi .container.active .tabItem { color:#4d382a !important; }
html.theme-modern body.reports #content .contentNavi.subNavi .background-start, html.theme-modern body.reports #content .contentNavi.subNavi .background-end, html.theme-modern body.reports #content .contentNavi.subNavi > .clear { display:none; }
html.theme-modern body.reports #content form[name=msg] { margin:0; }
html.theme-modern body.reports #content table#overview { width:100%; border-collapse:collapse; border:1px solid #c8c8c8; background:#fff; }
html.theme-modern body.reports #content table#overview th { padding:6px; color:#5e5148; background:#fafafa; border:1px solid #cecece; font-weight:normal; }
html.theme-modern body.reports #content table#overview td { padding:5px 6px; color:#5e5148; background:#fff; border:1px solid #d4d4d4; vertical-align:middle; }
html.theme-modern body.reports #content table#overview tbody tr:hover td { background:#f4f7e8; }
html.theme-modern body.reports #content table#overview td.sel { width:23px; text-align:center; }
html.theme-modern body.reports #content table#overview td.sub { width:auto; text-align:start; }
html.theme-modern body.reports #content table#overview td.dat, html.theme-modern body.reports #content table#overview th.sent { width:120px; white-space:nowrap; text-align:center; }
html.theme-modern body.reports #content table#overview td.sub a { color:#719a2c; font-weight:bold; }
html.theme-modern body.reports #content form[name=msg] .footer { margin:8px 0; min-height:22px; }
html.theme-modern body.reports #content form[name=msg] button { margin:4px 6px 4px 0; }
html.theme-modern body.reports #content #report_surround { width:100%; }
html.theme-modern body.reports #content #report_surround .theader th { background:#e4eee6; color:#5e5148; }
html.theme-modern body.reports #content #report_surround .report_content { background:#fff; }

@media (max-width:700px) {
    html.theme-modern, html.theme-modern body { min-width:0 !important; width:100% !important; }
    html.theme-modern body #wrapper, html.theme-modern body .bodyWrapper { min-width:0 !important; width:100% !important; }
    html.theme-modern body #header { width:100% !important; height:175px !important; }
    html.theme-modern #mtop { width:100% !important; zoom:1; }
    html.theme-modern #mtop::before { display:none; }
    html.theme-modern .modern-header-hero { left:8px !important; top:48px !important; }
    html.theme-modern #navigation { position:fixed !important; z-index:100 !important; left:0 !important; right:0 !important; top:auto !important; bottom:0 !important; display:flex !important; justify-content:space-around; width:100% !important; height:54px !important; overflow-x:auto; overflow-y:hidden; background:linear-gradient(#e7d7bd,#8b6f5c); box-shadow:0 -2px 4px #544234; }
    html.theme-modern #navigation li, html.theme-modern #navigation #n1, html.theme-modern #navigation #n2 { position:relative !important; left:auto !important; top:2px !important; flex:0 0 58px; width:58px !important; height:58px !important; zoom:.7; }
    html.theme-modern #navigation #n1 > a::after, html.theme-modern #navigation #n2 > a::after { left:-3px; top:-3px; }
    html.theme-modern .modern-header-shop, html.theme-modern .modern-header-invite { display:none; }
    html.theme-modern .modern-header-tools { position:absolute; top:52px !important; left:auto !important; right:5px !important; }
    html.theme-modern #res, html.theme-modern ul#res.stockBar { position:absolute !important; left:0 !important; top:0 !important; zoom:1; width:calc(100% - 68px) !important; height:42px !important; padding:3px !important; box-sizing:border-box; background:#765747 !important; }
    html.theme-modern ul#res.stockBar li.capacity, html.theme-modern ul#res.stockBar li.resource5 { display:none !important; }
    html.theme-modern ul#res.stockBar li.stockBarButton { flex:1 1 0; min-width:0; width:auto !important; height:34px !important; grid-template-columns:22px minmax(0,1fr) !important; }
    html.theme-modern ul#res.stockBar li.stockBarButton .value { font-size:10px !important; }
    html.theme-modern ul#res.stockBar li.stockBarButton .bar-bg { left:22px !important; }
    html.theme-modern #plusLink { left:auto !important; right:0 !important; top:0 !important; zoom:1; width:68px !important; height:42px !important; overflow:hidden; background:#765747; }
    html.theme-modern #plusLink #plus { display:none !important; }
    html.theme-modern #plusLink #gs { top:0 !important; left:0 !important; width:165px !important; zoom:.4; }
    html.theme-modern #stime { display:none !important; }
    html.theme-modern body #mid { box-sizing:border-box; width:100% !important; min-width:0 !important; }
    html.theme-modern body.village1 .modern-village-layout, html.theme-modern body.village2 .modern-village-layout { display:flex !important; flex-direction:column; align-items:center; gap:10px; width:100% !important; margin:0 !important; padding:0 !important; }
    html.theme-modern body.village1 .modern-village-main { order:0; width:500px !important; max-width:none; zoom:.7; margin:0 !important; }
    html.theme-modern body.village1 #map_details.modern-village-details, html.theme-modern body:is(.village1,.village2) .modern-village-sidebar, html.theme-modern body:is(.village1,.village2) .modern-info-sidebar { display:none !important; }
    html.theme-modern body.village2 #contentOuterContainer.modern-village-main { order:0; position:relative !important; left:auto !important; right:auto !important; top:auto !important; width:628px !important; max-width:none; margin:0 !important; overflow:hidden; zoom:.55; }
    html.theme-modern body.village2 #contentOuterContainer.modern-village-main > .contentContainer { direction:ltr; }
    html.theme-modern[dir=rtl] body.village2 #contentOuterContainer.modern-village-main .buildingList { direction:rtl; }
    html.theme-modern body.village2 #content.village2 { left:-326px !important; }
    html.theme-modern .modern-inner-page { display:flex; flex-direction:column; align-items:center; }
    html.theme-modern .modern-inner-page > #contentOuterContainer { order:0; width:calc(100% - 12px) !important; max-width:605px; margin:8px auto !important; }
    html.theme-modern body.map .modern-inner-page > #contentOuterContainer { overflow-x:auto; }
    html.theme-modern .modern-inner-page > .modern-village-sidebar, html.theme-modern .modern-inner-page > .modern-info-sidebar { display:none !important; }
    html.theme-modern .modern-inner-page #content { max-width:100%; overflow-x:auto; }
    html.theme-modern .modern-inner-page #content h1.titleInHeader { box-sizing:border-box; width:auto !important; max-width:calc(100% - 24px); }
    html.theme-modern .modern-inner-page .contentNavi.subNavi { overflow-x:auto; }
    html.theme-modern body #footer { box-sizing:border-box; width:100% !important; min-width:0; padding-bottom:75px; }
    html.theme-modern body #mfoot { box-sizing:border-box; width:100% !important; min-width:0 !important; padding:0 6px; }
}
@media (min-width:451px) and (max-width:700px) {
    html.theme-modern body.village1 .modern-village-main { zoom:.88; }
    html.theme-modern body.village2 #contentOuterContainer.modern-village-main { zoom:.7; }
    html.theme-modern #navigation li, html.theme-modern #navigation #n1, html.theme-modern #navigation #n2 { zoom:.85; }
    html.theme-modern #navigation { height:62px !important; }
}
@media (max-width:360px) {
    html.theme-modern body.village1 .modern-village-main { zoom:.62; }
    html.theme-modern body.village2 #contentOuterContainer.modern-village-main { zoom:.48; }
}

@media (max-width:700px) {
    html.theme-modern:has(body.village1), html.theme-modern:has(body.village2) { height:100%; overflow:hidden; }
    html.theme-modern body:is(.village1,.village2) { height:100%; overflow:hidden; }
    html.theme-modern body:is(.village1,.village2) #wrapper { height:100vh; height:100dvh; min-height:0 !important; overflow:hidden; }
    html.theme-modern body:is(.village1,.village2) #header { height:42px !important; }
    html.theme-modern body:is(.village1,.village2) #mid { min-height:0 !important; }
    html.theme-modern body:is(.village1,.village2) #footer { display:none !important; }
    html.theme-modern body.village1 #wrapper { background:linear-gradient(#927363,#5b4439) center top / 100% 42px no-repeat, url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg) center 42px / auto calc(100dvh - 42px) no-repeat !important; }
    html.theme-modern body.village1 .modern-village-layout { padding-top:clamp(85px, 16vh, 170px) !important; }
    html.theme-modern body.village1 .modern-village-main { zoom:var(--mobile-village-scale, .7); }
    html.theme-modern body.village2 #wrapper { background:linear-gradient(#927363,#5b4439) center top / 100% 42px no-repeat, url(../gpack/modern-reference/img_ltr/themes/default/background/bgBuildings.jpg) center 42px / auto var(--mobile-village-background-height, 830px) no-repeat !important; }
    html.theme-modern body.village2 #contentOuterContainer.modern-village-main { zoom:var(--mobile-village-scale, .55); }
}

.mobile-troops { display:none; }
#mobile-menu-item, #mobile-plus-item, .mobile-menu-panel { display:none; }
html.theme-modern body.village1 #content.modern-village-main #village_map div.level { display:flex; align-items:center; justify-content:center; width:28px; height:28px; border:1px solid #988b42; background:linear-gradient(to top,#988b42,#fdf15f) !important; }
html.theme-modern body.village1 #content.modern-village-main #village_map div.level .labelLayer { display:block; width:18px; height:18px; border-radius:50%; background:#fff; color:#333; font:11px/18px Verdana,sans-serif; text-align:center; text-shadow:none; }
html.theme-modern body.village1 #content.modern-village-main #village_map div.level.good { border-color:#4d8128; background:linear-gradient(to top,#4d8128,#a9df61) !important; }
html.theme-modern body.village1 #content.modern-village-main #village_map div.level.maxLevel { border-color:#2c5f9f; background:linear-gradient(to top,#2c5f9f,#79b9f0) !important; }
html.theme-modern body.village1 #content.modern-village-main #village_map div.level.underConstruction { border-color:#c46d16; background:linear-gradient(to top,#d06d14,#ffc153) !important; }
@media (max-width:700px) {
    html.theme-modern body:is(.village1,.village2) .mobile-troops { display:block; position:fixed; right:14px; bottom:120px; z-index:90; direction:ltr; }
    .mobile-troops-toggle { display:flex; align-items:center; justify-content:center; width:48px; height:48px; padding:4px; border:1px solid #553420; border-radius:50%; background:linear-gradient(#dbc1a8,#b49581); box-shadow:inset 0 0 0 3px #795f4d, 0 2px 4px #43392a; cursor:pointer; }
    .mobile-troops-toggle .troopIcon { width:33px; height:38px; overflow:visible; }
    .mobile-troops-toggle .outline { fill:#006900; stroke:#006900; stroke-width:3px; stroke-linejoin:round; }
    .mobile-troops-toggle .icon { fill:#6a9d19; }
    .mobile-troops-toggle:focus-visible { outline:2px solid #fff; outline-offset:3px; }
    .mobile-troops-panel { position:absolute; right:0; bottom:62px; box-sizing:border-box; min-width:70px; max-width:min(260px, 85vw); max-height:50vh; overflow:auto; padding:8px; border:1px solid #aaa89e; border-radius:5px; background:rgba(255,255,251,.96); box-shadow:0 2px 5px rgba(0,0,0,.45); color:#333; }
    .mobile-troops-panel[hidden] { display:none !important; }
    .mobile-troops-panel table { width:auto; border:0; border-collapse:collapse; background:transparent; }
    .mobile-troops-panel thead, .mobile-troops-panel td.un { display:none; }
    .mobile-troops-panel td { padding:2px 3px; border:0; background:transparent; vertical-align:middle; white-space:nowrap; }
    .mobile-troops-panel td.num { font:12px Arial,sans-serif; }
    .mobile-troops-panel td.none { direction:initial; white-space:normal; }
    html.theme-modern #navigation { overflow:hidden; gap:0; justify-content:space-around; }
    html.theme-modern #navigation #n7, html.theme-modern #navigation #n8 { display:none !important; }
    html.theme-modern #navigation #mobile-menu-item, html.theme-modern #navigation #mobile-plus-item { display:block; position:relative !important; left:auto !important; top:2px !important; flex:0 0 58px; width:58px !important; height:58px !important; zoom:.7; }
    html.theme-modern #navigation .mobile-menu-toggle { position:absolute; inset:0; width:100%; height:100%; padding:0; border:1px solid #553420; border-radius:50%; background:linear-gradient(#cbb198,#7b6050); box-shadow:inset 0 1px #ddcbb7, 0 3px 3px rgba(0,0,0,.3); color:#5d4a3c; font:bold 38px/1 Arial,sans-serif; cursor:pointer; }
    html.theme-modern #navigation #mobile-plus-item > a { background:linear-gradient(#cba467,#f3e2ae,#efbf7b,#aa8050,#835e35,#ad8a54,#d7b672); }
    html.theme-modern #navigation #mobile-plus-item > a::after { background:url(../gpack/modern-reference/img_ltr/hud/topBar/shop.png) no-repeat 0 0 / 62px 186px; }
    html.theme-modern .mobile-menu-panel:not([hidden]) { display:flex; position:fixed; z-index:110; right:8px; bottom:65px; flex-direction:column; min-width:150px; max-height:60vh; overflow:auto; padding:6px; border:1px solid #80664c; border-radius:5px; background:#f7efd9; box-shadow:0 2px 6px #44392b; }
    html.theme-modern .mobile-menu-panel a { padding:8px 12px; color:#49392a; text-decoration:none; }
    html.theme-modern .mobile-menu-panel a:hover { background:#dfcfac; }
}
@media (min-width:451px) and (max-width:700px) {
    html.theme-modern #navigation #mobile-menu-item, html.theme-modern #navigation #mobile-plus-item { zoom:.85; }
    html.theme-modern .mobile-menu-panel:not([hidden]) { bottom:73px; }
}
@media (max-width:360px) {
    html.theme-modern #navigation li, html.theme-modern #navigation #n1, html.theme-modern #navigation #n2, html.theme-modern #navigation #mobile-menu-item, html.theme-modern #navigation #mobile-plus-item { zoom:.6; }
}

@media (max-width:700px) {
    html.theme-modern body.village1 #map_details.modern-village-details { display:block !important; position:fixed !important; z-index:40; top:90px !important; right:6px !important; left:auto !important; width:min(185px, calc(100vw - 140px)) !important; max-height:35vh; overflow-y:auto; padding:0 !important; margin:0 !important; }
    html.theme-modern body.village1 #map_details > .production, html.theme-modern body.village1 #map_details > .units { display:none !important; }
    html.theme-modern body.village1 .modern-village-details > .movements { width:100%; min-height:0; }
    html.theme-modern body.village1 .modern-village-details .movements .boxes { width:100%; }
}

html.theme-modern body.build .modern-inner-page > #contentOuterContainer { border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body.build .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; }
html.theme-modern body.build .building-close { position:absolute; z-index:20; top:26px; right:47px; left:auto; width:28px; height:28px; border:1px solid #654b35; border-radius:50%; background:linear-gradient(#f8e4bd,#a38060); box-shadow:0 1px 3px #453023; color:#fff; font:bold 25px/25px Arial,sans-serif; text-align:center; text-decoration:none; text-shadow:0 1px 2px #543b2b; }
html.theme-modern body.build .building-close:hover { background:linear-gradient(#fff0ce,#b68c64); }
html.theme-modern body.build #build .resource-build-hero { position:relative; box-sizing:border-box; min-height:160px; overflow:hidden; background:#a8bb78 url(../gpack/modern-reference/img_ltr/legacy/views/buildings/upgradeBuilding/background1.jpg) center / cover no-repeat; }
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero .build_logo { position:absolute; top:0; inset-inline-end:0; float:none; width:48%; height:160px; margin:0; border:0; background:none; }
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value { position:relative; z-index:1; width:auto; max-width:55%; margin:0; padding:0; top:42px; margin-inline-start:12px; }
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value th,
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value td,
html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value td b { color:#fff; text-align:start; text-shadow:0 1px 2px #333; }
html.theme-modern body.build #build .resource-build-description { margin:8px 0; color:#333; }
html.theme-modern body.build #build .resource-build-description summary { padding:5px 10px; border:1px solid #a1bc79; background:linear-gradient(to right,#cbe0ac,#f9fbf4); color:#4b5f2b; font-weight:bold; cursor:pointer; }
html.theme-modern body.build #build .resource-build-description > div { padding:16px 4px; line-height:1.7; }
html.theme-modern body.build #build .upgradeBuilding { margin:8px 0; padding:8px 0; border:1px solid #c7c9bd; border-radius:4px; background:#fbfaf7; }
@media (max-width:700px) {
    html.theme-modern body.build #header { height:42px !important; }
    html.theme-modern body.build .modern-header-hero, html.theme-modern body.build .modern-header-tools { display:none !important; }
    html.theme-modern body.build #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.build .modern-inner-page > #contentOuterContainer { width:calc(100% - 8px) !important; margin:8px auto !important; }
    html.theme-modern body.build #content .contentNavi { max-width:100%; overflow-x:auto; }
    html.theme-modern body.build #build .upgradeButtonsContainer { flex-wrap:wrap; gap:8px; }
    html.theme-modern body.build #build .upgradeButtonsContainer .section1 { box-sizing:border-box; max-width:100%; }
    html.theme-modern body.build #build .upgradeButtonsContainer .section2 { padding-inline-start:0; }
    html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value { max-width:calc(100% - 20px); }
    html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value th,
    html.theme-modern body.build #build:is(.gid1,.gid2,.gid3,.gid4) .resource-build-hero #build_value td { font-size:11px; line-height:15px; white-space:normal; }
    html.theme-modern body.build #build.gid15 .upgradeHeader .buildingIllustrationLink { width:48%; }
    html.theme-modern body.build #build.gid15 .buildingIllustration { max-width:100%; background-size:contain; }
    html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value { position:relative; z-index:1; width:auto; max-width:100%; align-self:flex-start; }
    html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value tr { height:auto; }
    html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value th,
    html.theme-modern body.build #build.gid15 .upgradeHeader table#build_value td { padding:2px 4px; font-size:11px; line-height:15px; white-space:normal; }
}

html.theme-modern body.messages .modern-inner-page > #contentOuterContainer { border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body.messages .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; }
html.theme-modern body.messages .messages-close { position:absolute; z-index:20; top:26px; right:47px; left:auto; width:28px; height:28px; border:1px solid #654b35; border-radius:50%; background:linear-gradient(#f8e4bd,#a38060); box-shadow:0 1px 3px #453023; color:#fff; font:bold 25px/25px Arial,sans-serif; text-align:center; text-decoration:none; text-shadow:0 1px 2px #543b2b; }
html.theme-modern body.messages #content .contentNavi.subNavi { display:flex; width:100%; height:50px; min-height:50px; padding:4px; margin:0 0 18px; border:1px solid #34220d; background:#a58b6d linear-gradient(0deg,#caa065 0%,#876338 20%,#ba8f5b 54%,#f3ce8b 74%,#ecd9a5 92%); box-sizing:border-box; overflow-x:auto; }
html.theme-modern body.messages #content .contentNavi.subNavi .container { float:none; flex:1 0 auto; min-width:0; height:40px; margin:0; border-inline-end:1px solid #987752; background:#5f473b; box-shadow:inset 0 -10px 2px -5px rgba(0,0,0,.45),inset 0 20px 10px -5px rgba(0,0,0,.2); text-align:center; }
html.theme-modern body.messages #content .contentNavi.subNavi .container.active { background:#85664a; }
html.theme-modern body.messages #content .contentNavi.subNavi .container .content { display:block; float:none; width:auto; height:auto; padding:0; }
html.theme-modern body.messages #content .contentNavi.subNavi .container a { display:block; box-sizing:border-box; height:40px; padding:0 12px; line-height:40px; white-space:nowrap; text-decoration:none; }
html.theme-modern body.messages #content .contentNavi.subNavi .container .tabItem { padding:0; color:#eccd8e !important; font:700 13px/40px Arial,Helvetica,sans-serif; }
html.theme-modern body.messages #content .contentNavi.subNavi .container.active .tabItem { color:#f2e1d0 !important; }
html.theme-modern body.messages #content .contentNavi.subNavi .container:hover:not(.active) { background-color:#745849; }
html.theme-modern body.messages #content .contentNavi.subNavi .background-start, html.theme-modern body.messages #content .contentNavi.subNavi .background-end, html.theme-modern body.messages #content .contentNavi.subNavi > .clear { display:none; }
html.theme-modern body.messages #content table#overview { width:100%; border-collapse:collapse; border:1px solid #c8c8c8; background:#fff; }
html.theme-modern body.messages #content table#overview th, html.theme-modern body.messages #content table#overview td { padding:6px; color:#5e5148; background:#fff; border:1px solid #d4d4d4; vertical-align:middle; }
html.theme-modern body.messages #content table#overview th { background:#fafafa; font-weight:normal; }
html.theme-modern body.messages #content table#overview tbody tr:hover td { background:#f4f7e8; }
html.theme-modern body.messages #content table#overview td.sel { width:23px; text-align:center; }
html.theme-modern body.messages #content table#overview td.subject a { color:#719a2c; font-weight:bold; }
@media (max-width:700px) {
    html.theme-modern body.messages #header { height:42px !important; }
    html.theme-modern body.messages .modern-header-hero, html.theme-modern body.messages .modern-header-tools { display:none !important; }
    html.theme-modern body.messages #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.messages #content #overview { table-layout:fixed; font-size:11px; }
    html.theme-modern body.messages #content #overview col.msg-select-column { width:25px; }
    html.theme-modern body.messages #content #overview col.msg-sender-column { width:25%; }
    html.theme-modern body.messages #content #overview col.msg-date-column { width:25%; }
    html.theme-modern body.messages #content #overview th, html.theme-modern body.messages #content #overview td { padding:4px 2px; overflow-wrap:anywhere; }
    html.theme-modern body.messages #content #overview .sel { width:20px; }
    html.theme-modern body.messages #content #overview .send { width:25%; }
    html.theme-modern body.messages #content #overview .dat { width:24%; }
    html.theme-modern body.messages #write_content, html.theme-modern body.messages #write_content form, html.theme-modern body.messages #write_content .paper, html.theme-modern body.messages #write_content .paperContent, html.theme-modern body.messages #write_content #bbEditor, html.theme-modern body.messages #write_content .bbEditor { box-sizing:border-box; width:100% !important; min-width:0 !important; max-width:100%; }
    html.theme-modern body.messages #write_content .paper { height:auto; min-height:0; background:#fff; }
    html.theme-modern body.messages #write_content .layout { display:none; }
    html.theme-modern body.messages #write_content .paperContent { position:relative; inset:auto; height:auto; margin:0; padding:12px; }
    html.theme-modern body.messages #write_content .header.text { box-sizing:border-box; width:100%; float:none; }
    html.theme-modern body.messages #write_content input.text { box-sizing:border-box; max-width:100%; }
    html.theme-modern body.messages #write_content #recipient input.text { width:calc(100% - 65px); }
    html.theme-modern body.messages #write_content #subject input.text { width:100%; }
    html.theme-modern body.messages #write_content #message_toolbar { height:auto; min-height:28px; white-space:normal; }
    html.theme-modern body.messages #write_content textarea.messageEditor { box-sizing:border-box; width:100% !important; max-width:100%; }
}
@media (max-width:700px) {
    html.theme-modern body.reports #header { height:42px !important; }
    html.theme-modern body.reports .modern-header-hero, html.theme-modern body.reports .modern-header-tools { display:none !important; }
    html.theme-modern body.reports #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.reports #content table#overview { table-layout:fixed; font-size:11px; }
    html.theme-modern body.reports #content table#overview col.report-select-column { width:26px; }
    html.theme-modern body.reports #content table#overview col.report-date-column { width:27%; }
    html.theme-modern body.reports #content table#overview th, html.theme-modern body.reports #content table#overview td { padding:4px 3px; overflow-wrap:anywhere; }
    html.theme-modern body.reports #content table#overview td.dat, html.theme-modern body.reports #content table#overview th.sent { width:auto; white-space:normal; }
}
@media (max-width:700px) {
    html.theme-modern body.statistics #header { height:42px !important; }
    html.theme-modern body.statistics .modern-header-hero, html.theme-modern body.statistics .modern-header-tools { display:none !important; }
    html.theme-modern body.statistics #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.statistics #content .top10Wrapper { float:none !important; width:100% !important; max-width:100%; margin:0 0 16px !important; }
    html.theme-modern body.statistics #content .top10Wrapper table.top10 { table-layout:auto; }
    html.theme-modern body.statistics #content .top10Wrapper table.top10 td { overflow-wrap:normal; }
    html.theme-modern body.statistics #content .contentNavi.tabNavi { max-width:100%; overflow-x:auto; }
}
@media (max-width:700px) {
    html.theme-modern body.plus #header { height:42px !important; }
    html.theme-modern body.plus .modern-header-hero, html.theme-modern body.plus .modern-header-tools { display:none !important; }
    html.theme-modern body.plus #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.plus #content .contentNavi.subNavi { overflow-x:auto; }
    html.theme-modern body.plus #content .contentNavi.subNavi .container { flex:1 0 auto; min-width:max-content; }
    html.theme-modern body.plus #content .contentNavi.subNavi .container .content a { width:auto !important; padding:10px 12px !important; overflow:visible; text-overflow:clip; }
}

html.theme-modern body.spieler .modern-inner-page > #contentOuterContainer { border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body.spieler .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; }
html.theme-modern body.spieler .profile-close { position:absolute; z-index:20; top:26px; right:47px; left:auto; width:28px; height:28px; border:1px solid #654b35; border-radius:50%; background:linear-gradient(#f8e4bd,#a38060); box-shadow:0 1px 3px #453023; color:#fff; font:bold 25px/25px Arial,sans-serif; text-align:center; text-decoration:none; text-shadow:0 1px 2px #543b2b; }
html.theme-modern body.spieler #content .contentNavi.subNavi { display:flex; width:100%; height:auto; min-height:38px; padding:2px; margin:0 0 14px; border:2px solid #92724b; background:#4e392e; box-sizing:border-box; overflow-x:auto; }
html.theme-modern body.spieler #content .contentNavi.subNavi .container { float:none; flex:1 0 auto; height:auto; margin:0; border-inline-end:1px solid #a48258; background:linear-gradient(#6e5040,#513a30); text-align:center; }
html.theme-modern body.spieler #content .contentNavi.subNavi .container.active { background:linear-gradient(#d9ba7c,#ab874d); }
html.theme-modern body.spieler #content .contentNavi.subNavi .container .content { display:block; float:none; width:auto; height:auto; padding:0; }
html.theme-modern body.spieler #content .contentNavi.subNavi .container a { display:block; padding:10px 12px; white-space:nowrap; text-decoration:none; }
html.theme-modern body.spieler #content .contentNavi.subNavi .container .tabItem { padding:0; color:#e9ce92 !important; font-weight:bold; }
html.theme-modern body.spieler #content .contentNavi.subNavi .container.active .tabItem { color:#4d382a !important; }
html.theme-modern body.spieler #content .contentNavi.subNavi .background-start, html.theme-modern body.spieler #content .contentNavi.subNavi .background-end, html.theme-modern body.spieler #content .contentNavi.subNavi > .clear { display:none; }
html.theme-modern body.spieler #content .profile-overview-hero { position:relative; box-sizing:border-box; min-height:270px; padding:14px; overflow:hidden; color:#fff; background:linear-gradient(90deg,rgba(18,27,21,.90),rgba(28,36,27,.35)),url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg) center / cover no-repeat; }
html.theme-modern[dir=rtl] body.spieler #content .profile-overview-hero { background-image:linear-gradient(270deg,rgba(18,27,21,.90),rgba(28,36,27,.35)),url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg); }
html.theme-modern body.spieler #content .profile-overview-hero h4.round { position:relative; z-index:1; margin:0 0 6px; padding:0; color:#fff; background:none; }
html.theme-modern body.spieler #content .profile-overview-hero .heroImage { position:absolute; inset-inline-end:8px; bottom:0; z-index:0; object-fit:contain; object-position:bottom; }
html.theme-modern body.spieler #content .profile-overview-hero #details { position:relative; z-index:1; width:auto; max-width:65%; margin:0; }
html.theme-modern body.spieler #content .profile-overview-hero #details th, html.theme-modern body.spieler #content .profile-overview-hero #details td { padding:3px 8px 3px 0; color:#fff; background:transparent; text-align:start; }
html.theme-modern body.spieler #content .profile-overview-hero #details a { color:#d4ec91; }
html.theme-modern body.spieler #content h4.round { padding:6px 10px; color:#526f36; background:#e1ebd8; border-radius:3px; }
html.theme-modern body.spieler #content table#villages, html.theme-modern body.spieler #content table#medals { width:100%; border-collapse:collapse; }
html.theme-modern body.spieler #content table#villages th, html.theme-modern body.spieler #content table#villages td, html.theme-modern body.spieler #content table#medals td { padding:6px; border-bottom:1px solid #d8d6cd; text-align:start; }
html.theme-modern body.spieler #content table#villages th { background:#ece9df; color:#5e5148; }
html.theme-modern body.spieler #content table#villages td a { color:#719a2c; font-weight:bold; }
html.theme-modern body.spieler #content textarea.editDescription { box-sizing:border-box; max-width:100%; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) .modern-inner-page > #contentOuterContainer { border:4px ridge #9b846b; border-radius:8px; padding:6px; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) .modern-inner-page > #contentOuterContainer .contentTitle { height:46px; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi { display:flex; width:100%; height:auto; min-height:38px; padding:2px; margin:0 0 10px; border:2px solid #92724b; background:#4e392e; box-sizing:border-box; overflow-x:auto; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container { float:none; flex:1 0 auto; height:auto; margin:0; border-inline-end:1px solid #a48258; background:linear-gradient(#6e5040,#513a30); text-align:center; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container.active { background:linear-gradient(#d9ba7c,#ab874d); }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container .content { display:block; float:none; width:auto; height:auto; padding:0; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container a { display:block; width:auto; padding:10px 12px; white-space:nowrap; text-decoration:none; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container .tabItem { padding:0; color:#e9ce92 !important; font-weight:bold; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container.active .tabItem { color:#4d382a !important; }
html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi :is(.background-start,.background-end,.clear) { display:none; }
html.theme-modern body.hero_inventory #content.hero_inventory { display:flex; flex-direction:column; align-items:stretch; }
html.theme-modern body.hero_inventory #content.hero_inventory > .clear { display:none; }
html.theme-modern body.hero_inventory #content.hero_inventory > .hero-attributes-panel { order:3; clear:both; margin:12px auto; max-width:100%; }
html.theme-modern body.hero_inventory #content.hero_inventory > #bodyOptions { order:1; box-sizing:border-box; width:100%; margin:0; background:#a8bb78 url(../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg) center / cover no-repeat; }
html.theme-modern body.hero_inventory #hero_body_container { margin:0 auto; }
html.theme-modern body.hero_inventory #hero_body { left:0; }
html.theme-modern body.hero_inventory #hero_body_content .content > .draggable { z-index:2; border:2px solid #ad936d; border-radius:50%; box-sizing:border-box; background-color:rgba(58,47,37,.72); box-shadow:0 2px 4px rgba(0,0,0,.55), inset 0 1px 3px #30241d; }
html.theme-modern body.hero_inventory #hero_body_content #helmet { left:8px !important; top:10px !important; }
html.theme-modern body.hero_inventory #hero_body_content #body { left:8px !important; top:76px !important; }
html.theme-modern body.hero_inventory #hero_body_content #leftHand { left:8px !important; top:142px !important; }
html.theme-modern body.hero_inventory #hero_body_content #rightHand { left:8px !important; top:208px !important; }
html.theme-modern body.hero_inventory #hero_body_content #shoes { left:8px !important; top:274px !important; }
html.theme-modern body.hero_inventory #hero_body_content #horse { left:8px !important; top:340px !important; }
html.theme-modern body.hero_inventory #hero_body_content #bag { left:auto !important; right:0 !important; top:auto !important; bottom:0 !important; }
html.theme-modern body.hero_inventory #bodyOptions .heroHidden { float:none; margin:0; padding:8px; background:rgba(255,255,255,.86); }
html.theme-modern body.hero_inventory #content.hero_inventory > #hero_inventory { order:2; float:none; box-sizing:border-box; width:100%; margin:0; padding:8px; background:#5d4a3d; }
html.theme-modern body.hero_inventory #hero_inventory .boxes { width:auto; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale { display:flow-root; margin:0 auto; max-width:360px; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale > .inventory { box-sizing:border-box; width:64px; height:64px; margin:2px; border:2px solid #9a846f; border-radius:4px; background:#44372f; box-shadow:inset 0 2px 4px rgba(0,0,0,.45); }
html.theme-modern body.hero_inventory #hero_inventory .market { box-sizing:border-box; width:100%; margin:8px 0 0; }
html.theme-modern body.hero_inventory #content.hero_inventory > :is(#placeHolder,#HeroInventory) { order:4; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer::before { content:''; position:absolute; top:19px; left:0; right:0; height:48px; background:url(../gpack/modern-reference/img_ltr/hud/content/header.jpg) repeat-x left top; pointer-events:none; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer::after { content:''; position:absolute; inset:0; z-index:1; border-style:solid; border-width:68px 51px 11px; border-image:url(../gpack/modern-reference/img_ltr/hud/content/frame.png) 68 51 11 fill / 1 / 0 repeat; pointer-events:none; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer .contentTitle { height:67px; border:0; background:#d2bda1; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer .contentContainer { margin:0 11px; }
html.theme-modern body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer #content h1.titleInHeader { z-index:2; top:30px; left:35px; right:auto; max-width:calc(100% - 70px); }
html.theme-modern[dir=rtl] body:not(.village1):not(.village2) .modern-inner-page > #contentOuterContainer #content h1.titleInHeader { right:35px; left:auto; }
html.theme-modern body.hero_inventory #content.hero_inventory > #bodyOptions { background:#3a3c31 url(hero-v2-heroPageBackground.jpg) center top / cover no-repeat; }
html.theme-modern body.hero_inventory #hero_body_container { position:relative; width:100%; height:500px; margin:0; zoom:1; }
html.theme-modern body.hero_inventory #hero_body { left:auto; right:0; top:0; width:calc(100% - 72px); height:500px; overflow:hidden; text-align:center; }
html.theme-modern body.hero_inventory #hero_body .heroBody { width:auto; max-width:100%; height:500px; object-fit:contain; object-position:center bottom; }
html.theme-modern body.hero_inventory #hero_body_content { left:0; top:0; width:100%; height:500px; }
html.theme-modern body.hero_inventory #hero_body_content .content > .draggable { left:0 !important; right:auto !important; bottom:auto !important; width:70px !important; height:70px !important; border:1px solid #a38958; border-radius:0; background:rgba(40,40,32,.48) !important; box-shadow:inset 0 0 0 1px rgba(229,195,118,.18); }
html.theme-modern body.hero_inventory #hero_body_content .content > .draggable:empty::before { content:''; display:block; width:100%; height:100%; background-position:center; background-repeat:no-repeat; }
html.theme-modern body.hero_inventory #hero_body_content #helmet { top:0 !important; }
html.theme-modern body.hero_inventory #hero_body_content #body { top:71px !important; }
html.theme-modern body.hero_inventory #hero_body_content #shoes { top:142px !important; }
html.theme-modern body.hero_inventory #hero_body_content #leftHand { top:213px !important; }
html.theme-modern body.hero_inventory #hero_body_content #rightHand { top:284px !important; }
html.theme-modern body.hero_inventory #hero_body_content #horse { top:355px !important; }
html.theme-modern body.hero_inventory #hero_body_content #bag { top:426px !important; left:0 !important; right:auto !important; bottom:auto !important; }
html.theme-modern body.hero_inventory #helmet:empty::before { background-image:url(hero-v2-slotHelmet_medium.png); }
html.theme-modern body.hero_inventory #body:empty::before { background-image:url(hero-v2-slotBody_medium.png); }
html.theme-modern body.hero_inventory #shoes:empty::before { background-image:url(hero-v2-slotShoes_medium.png); }
html.theme-modern body.hero_inventory #leftHand:empty::before { background-image:url(hero-v2-slotLeftHand_medium.png); }
html.theme-modern body.hero_inventory #rightHand:empty::before { background-image:url(hero-v2-slotRightHand_medium.png); }
html.theme-modern body.hero_inventory #horse:empty::before { background-image:url(hero-v2-slotHorse_medium.png); }
html.theme-modern body.hero_inventory #bag:empty::before { background-image:url(hero-v2-slotBag_medium.png); }
html.theme-modern body.hero_inventory #hero_inventory { background:#211c19 !important; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale { max-width:none; }
html.theme-modern body.hero_attributes #content.hero_inventory > .hero-attributes-panel { display:flex; flex-direction:column; gap:10px; order:0; width:100%; max-width:none; margin:0; padding:10px; box-sizing:border-box; color:#574438; background:#292d25 url(hero-v2-heroPageBackground.jpg) center top / cover fixed; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi { box-sizing:border-box; display:flex; width:100%; min-height:50px; height:50px; margin:0 0 10px; padding:4px; overflow:hidden; border:1px solid #34220d; background:#a58b6d linear-gradient(0deg,#caa065 0%,#876338 20%,#ba8f5b 54%,#f3ce8b 74%,#ecd9a5 92%); }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container { display:block; flex:1 1 0; min-width:0; height:40px; border:0; border-inline-end:1px solid #987752; background:#5f473b; box-shadow:inset 0 -10px 2px -5px rgba(0,0,0,.45),inset 0 20px 10px -5px rgba(0,0,0,.2); }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container.active { background:#85664a; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container:has(a[href="hero_adventure.php"]),
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container:has(a[href="hero_auction.php"]) { display:none; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container a { display:block; box-sizing:border-box; height:40px; padding:0 4px; line-height:40px; text-align:center; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container .tabItem { color:#eccd8e !important; font:700 13px/40px Arial,Helvetica,sans-serif; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container.active .tabItem { color:#f2e1d0 !important; }
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container:hover:not(.active) { background-color:#745849; }
html.theme-modern body.hero_attributes .hero-attributes-panel > #attributes { order:3; width:100%; margin:0; }
html.theme-modern body.hero_attributes .hero-attributes-panel > .boxes:has(#setResource) { order:2; }
html.theme-modern body.hero_attributes .hero-attributes-panel > .boxes:has(.health),
html.theme-modern body.hero_attributes .hero-attributes-panel > .boxes:has(.experience) { order:1; }
html.theme-modern body.hero_attributes .hero-attributes-panel .boxes { position:relative; float:none; box-sizing:border-box; width:100%; height:auto; margin:0; padding:12px; border:3px double #a58751; border-radius:3px; background:#ede0c3; box-shadow:0 1px 4px #251c16; }
html.theme-modern body.hero_attributes .hero-attributes-panel .boxes > :is(.boxes-tl,.boxes-tr,.boxes-tc,.boxes-ml,.boxes-mr,.boxes-mc,.boxes-bl,.boxes-br,.boxes-bc) { display:none; }
html.theme-modern body.hero_attributes .hero-attributes-panel .boxes-contents { position:static; width:auto; height:auto; margin:0; padding:0; background:none; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute:not(.res) { display:flex; align-items:center; gap:8px; float:none; width:100%; min-height:34px; height:auto; margin:0; padding:0; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute .element { position:static; float:none; width:auto; margin:0; padding:0; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribName { flex:1 1 135px; font-weight:bold; }
html.theme-modern body.hero_attributes .hero-attributes-panel .current { min-width:48px; text-align:center; }
html.theme-modern body.hero_attributes .hero-attributes-panel .progress { flex:1 1 140px; min-width:45px; }
html.theme-modern body.hero_attributes .hero-attributes-panel .bar-bg { box-sizing:border-box; width:100%; height:15px; padding:2px; border:2px ridge #b39259; border-radius:7px; background:#5d4437; }
html.theme-modern body.hero_attributes .hero-attributes-panel .bar { height:7px; border-radius:3px; background:#d69628; }
html.theme-modern body.hero_attributes .hero-attributes-panel .points { min-width:25px; text-align:center; border-radius:7px; background:#c1b39b; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute.headline { justify-content:space-between; font-weight:bold; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute.headline :is(.attributesHeadline,.pointsHeadline) { float:none; width:auto; margin:0; padding:0; }
html.theme-modern body.hero_attributes #setResource { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; width:auto; }
html.theme-modern body.hero_attributes #setResource .changeResourcesHeadline { flex-basis:100%; font-weight:bold; }
html.theme-modern body.hero_attributes #setResource .resource { float:none; width:auto; margin:0; }
html.theme-modern body.hero_attributes #setResource label { display:inline-flex; align-items:center; gap:3px; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute.level { flex-wrap:wrap; }
html.theme-modern body.hero_attributes .hero-attributes-panel .attribute.speed { flex-basis:100%; }
@media (max-width:700px) {
    html.theme-modern body.hero_attributes .hero-attributes-panel { padding:7px; }
    html.theme-modern body.hero_attributes .hero-attributes-panel .boxes { padding:8px; }
    html.theme-modern body.hero_attributes .hero-attributes-panel .attribute:not(.res) { gap:4px; }
    html.theme-modern body.hero_attributes .hero-attributes-panel .attribName { flex-basis:90px; }
    html.theme-modern body.hero_attributes .hero-attributes-panel .attribName { min-width:0; }
    html.theme-modern body.hero_attributes .hero-attributes-panel .current { min-width:35px; }
}
@media (max-width:700px) {
    html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #header { height:42px !important; }
    html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) :is(.modern-header-hero,.modern-header-tools) { display:none !important; }
    html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body:is(.hero_inventory,.hero,.hero_adventure,.hero_auction) #content .contentNavi.subNavi .container a { padding:10px 8px; }
    html.theme-modern body.hero_inventory #content .contentNavi.subNavi .container { flex:1 0 auto; min-width:0; }
    html.theme-modern body.hero_inventory #content .contentNavi.subNavi .container a { padding:10px 2px; font-size:10px; }
    html.theme-modern body.hero_inventory #content.hero_inventory > .clear { display:none; }
    html.theme-modern body.hero_inventory #bodyOptions { overflow:hidden; }
    html.theme-modern body.hero_inventory #hero_body_container { zoom:1; }
    html.theme-modern body.hero_inventory #attributes { box-sizing:border-box; width:100%; max-width:100%; margin:0; }
    html.theme-modern body:is(.hero,.hero_adventure,.hero_auction) #content { overflow-x:auto; }
}
@media (max-width:700px) {
    html.theme-modern body.spieler #header { height:42px !important; }
    html.theme-modern body.spieler .modern-header-hero, html.theme-modern body.spieler .modern-header-tools { display:none !important; }
    html.theme-modern body.spieler #mid { min-height:0; padding-bottom:70px; }
    html.theme-modern body.spieler #content .profile-overview-hero { min-height:255px; padding:10px; }
    html.theme-modern body.spieler #content .profile-overview-hero #details { max-width:68%; font-size:11px; }
    html.theme-modern body.spieler #content .profile-overview-hero .heroImage { width:130px !important; height:180px !important; }
    html.theme-modern body.spieler #content table#villages { table-layout:fixed; font-size:11px; }
    html.theme-modern body.spieler #content table#villages th, html.theme-modern body.spieler #content table#villages td { padding:4px 2px; overflow-wrap:anywhere; }
    html.theme-modern body.spieler #content table#editDetails, html.theme-modern body.spieler #content table#editDetails tbody, html.theme-modern body.spieler #content table#editDetails tr, html.theme-modern body.spieler #content table#editDetails th, html.theme-modern body.spieler #content table#editDetails td { display:block; box-sizing:border-box; width:100%; }
    html.theme-modern body.spieler #content table#editDetails th, html.theme-modern body.spieler #content table#editDetails td { height:auto; min-height:0; padding:4px; clear:both; text-align:start; }
    html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc), html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc) tbody, html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc) tr, html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc) th, html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc) td { display:block; box-sizing:border-box; width:100%; height:auto; text-align:start; }
    html.theme-modern body.spieler #content table:is(#change_pass,#change_mail,#del_acc) input:not([type=radio]):not([type=checkbox]) { box-sizing:border-box; width:100%; max-width:100%; }
    html.theme-modern body.spieler #content table#links, html.theme-modern body.spieler #content table#links tbody { display:block; width:100%; }
    html.theme-modern body.spieler #content table#links thead { display:none; }
    html.theme-modern body.spieler #content table#links tbody tr { display:grid; grid-template-columns:25px 38px minmax(0,1fr) 30px; gap:5px; align-items:center; margin-bottom:12px; }
    html.theme-modern body.spieler #content table#links td { display:block; width:auto; padding:0; }
    html.theme-modern body.spieler #content table#links td.nam { grid-column:3; }
    html.theme-modern body.spieler #content table#links td.link { grid-column:3; grid-row:2; }
    html.theme-modern body.spieler #content table#links td.add { grid-column:4; grid-row:1; }
    html.theme-modern body.spieler #content table#links td.nam input, html.theme-modern body.spieler #content table#links td.link input { width:100%; }
    html.theme-modern body.spieler #content textarea.editDescription { float:none; display:block; width:100% !important; margin:8px 0; }
    html.theme-modern body.spieler #content input.text, html.theme-modern body.spieler #content select { max-width:100%; box-sizing:border-box; }
}
@media (max-width:700px) {
    html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container { flex:1 1 0; }
    html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container a { padding:0 2px; }
    html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi .container .tabItem { font-size:11px; }
}

html.theme-modern body .contentNavi.subNavi { display:flex !important; flex-wrap:nowrap !important; justify-content:flex-start !important; box-sizing:border-box; width:100% !important; height:50px !important; min-height:50px !important; padding:4px !important; gap:0 !important; overflow-x:auto !important; overflow-y:hidden !important; border:1px solid #34220d !important; border-radius:0 !important; background:#a58b6d linear-gradient(0deg,#caa065 0%,#876338 20%,#ba8f5b 54%,#f3ce8b 74%,#ecd9a5 92%) !important; box-shadow:none !important; }
html.theme-modern body .modern-inner-page #content > .contentNavi.subNavi { width:calc(100% + 46px) !important; }
html.theme-modern body .contentNavi.subNavi > :is(.container,.content) { display:block !important; float:none !important; flex:1 0 auto !important; box-sizing:border-box; width:auto !important; min-width:0 !important; height:40px !important; margin:0 !important; padding:0 !important; border:0 !important; border-inline-end:1px solid #987752 !important; border-radius:0 !important; background:#5f473b !important; box-shadow:inset 0 -10px 2px -5px rgba(0,0,0,.45),inset 0 20px 10px -5px rgba(0,0,0,.2) !important; text-align:center; }
html.theme-modern body .contentNavi.subNavi > :is(.container,.content):is(.active,:has(> a.active)) { background:#85664a !important; }
html.theme-modern body .contentNavi.subNavi > :is(.container,.content):hover:not(.active) { background-color:#745849 !important; }
html.theme-modern body .contentNavi.subNavi > .container > .content { display:block !important; float:none !important; width:auto !important; height:40px !important; margin:0 !important; padding:0 !important; background:none !important; }
html.theme-modern body .contentNavi.subNavi > :is(.container > .content,.content) > a { display:block !important; box-sizing:border-box; width:100% !important; height:40px !important; margin:0 !important; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:none !important; box-shadow:none !important; color:#eccd8e !important; font:700 13px/40px Arial,Helvetica,sans-serif !important; text-align:center; text-decoration:none; white-space:nowrap; }
html.theme-modern body .contentNavi.subNavi > :is(.container > .content,.content) > a .tabItem { display:inline !important; height:auto !important; margin:0 !important; padding:0 !important; color:inherit !important; font:inherit !important; line-height:inherit !important; }
html.theme-modern body .contentNavi.subNavi > :is(.container.active > .content,.content.active) > a,
html.theme-modern body .contentNavi.subNavi > .content > a.active { color:#f2e1d0 !important; }
html.theme-modern body .contentNavi.subNavi :is(.background-start,.background-end),
html.theme-modern body .contentNavi.subNavi > .clear { display:none !important; }
html.theme-modern button:has(> .button-container > .button-contents):not(.gold):not(.goldButton),
html.theme-modern button.textButtonV1.green {
    box-sizing:border-box; min-height:25px; height:auto; padding:4px 20px !important; border:1px solid #283308 !important; border-radius:3px !important;
    background:#7cb029 linear-gradient(#7cb029,#587c1e) !important; color:#f2f2f2 !important; font:700 11px/15px Arial,Helvetica,Verdana,sans-serif !important;
    box-shadow:inset 2px 0 1px -1px #4b6f19,inset -2px 0 1px -1px #4b6f19,inset 0 3px 1px -1px #b5e251,inset 0 -3px 1px -1px rgba(44,75,12,.6) !important;
    text-shadow:0 1px 1px #344a13; cursor:pointer;
}
html.theme-modern button:has(> .button-container > .button-contents):not(.gold):not(.goldButton):hover:not(:disabled),
html.theme-modern button.textButtonV1.green:hover:not(:disabled) { background:#8ac137 linear-gradient(#8ac137,#68902b) !important; }
html.theme-modern button:has(> .button-container > .button-contents):disabled,
html.theme-modern button.textButtonV1.green:disabled { opacity:.55; cursor:default; }
html.theme-modern button:has(> .button-container > .button-contents):not(.gold):not(.goldButton) > .button-container { position:static !important; display:block !important; width:auto !important; height:auto !important; margin:0 !important; padding:0 !important; background:none !important; }
html.theme-modern button:has(> .button-container > .button-contents):not(.gold):not(.goldButton) .button-position { display:none !important; }
html.theme-modern button:has(> .button-container > .button-contents):not(.gold):not(.goldButton) .button-contents { position:static !important; display:block !important; width:auto !important; height:auto !important; margin:0 !important; padding:0 !important; color:inherit !important; font:inherit !important; line-height:inherit !important; background:none !important; }
html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs { width:calc(100% + 46px) !important; height:50px !important; overflow-x:auto !important; overflow-y:hidden !important; }
html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs > .container { height:40px !important; flex:1 0 auto !important; }
html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs > .container a { height:40px !important; padding:0 10px !important; line-height:40px !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container > .content > a { display:flex !important; align-items:center !important; justify-content:center !important; width:100% !important; height:40px !important; padding:0 10px !important; color:#eccd8e !important; font:700 13px/1 Arial,Helvetica,Verdana,sans-serif !important; text-decoration:none !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container > .content > a > .tabItem { display:inline !important; height:auto !important; padding:0 !important; color:inherit !important; font:inherit !important; line-height:inherit !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container.active > .content > a { color:#f2e1d0 !important; }
@media (max-width:700px) {
    html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container > .content > a { padding:0 8px !important; font-size:11px !important; }
}
html.theme-modern .rally-evasion { margin:22px 0; padding:14px; border:1px solid #d4c7b2; background:#f6f2e8; }
html.theme-modern .rally-evasion h2 { margin:0 0 10px; color:#765438; font:bold 17px Arial,sans-serif; }
html.theme-modern .rally-evasion label { display:block; margin:12px 0; }
html.theme-modern body.a2b #troops { width:100%; margin:10px 0 18px; border-collapse:collapse; background:#faf9f4; }
html.theme-modern body.a2b #troops td { padding:7px 4px; vertical-align:middle; white-space:nowrap; }
html.theme-modern body.a2b #troops input.text { box-sizing:border-box; width:48px; max-width:40%; text-align:center; }
html.theme-modern body.a2b .destination { margin:16px 0; }
html.theme-modern body.a2b .option { margin:14px 0; line-height:2; }
html.theme-modern body:is(.a2b,.warsim) .modern-inner-page #content > h1 { z-index:2; top:30px; left:35px; right:auto; max-width:calc(100% - 70px); color:#fff8ed; font:bold 18px/26px Arial,Helvetica,Verdana,sans-serif; text-shadow:0 1px 2px #49372a; }
html.theme-modern[dir=rtl] body:is(.a2b,.warsim) .modern-inner-page #content > h1 { right:35px; left:auto; }
@media (max-width:700px) {
    html.theme-modern body.a2b #troops { table-layout:fixed; }
    html.theme-modern body.a2b #troops td { padding:5px 2px; font-size:10px; white-space:normal; overflow-wrap:anywhere; }
    html.theme-modern body.a2b #troops input.text { width:35px; }
}
html.theme-modern body.village2 #village_map.tribe-3 img.building[class] { background-size:auto; }
html.theme-modern body.village2 #village_map.tribe-1 img.building.g12 { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/roman/g13.png); }
html.theme-modern body.village2 #village_map.tribe-2 img.building.g12 { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/teuton/g13.png); }
html.theme-modern body.village2 #village_map.tribe-3 img.building.g12 { background-image:url(../gpack/modern-reference/img_ltr/themes/default/buildings/gaul/g13.png); }
html.theme-modern body.build #build.gid0 .modern-category-hidden { display:none !important; }
html.theme-modern body.build #build.gid0 .modern-construction-tabs { margin:0 0 18px; }
html.theme-modern body.build #build.gid0 h2 { clear:both; margin:18px 0 8px; color:#765438; font:bold 19px Arial,sans-serif; }
html.theme-modern body.build #build.gid0 .build_desc { min-height:120px; line-height:1.5; }
html.theme-modern body.build #build.gid0 .build_desc .build_logo { float:inline-end; width:120px; height:120px; margin:0 0 8px 14px; }
html.theme-modern body.build #build.gid0 .build_desc img.modern-construction-art { width:120px !important; height:120px !important; background-size:auto !important; background-position:center top !important; background-repeat:no-repeat !important; }
html.theme-modern body.build #build.gid0 .contractNew { clear:both; margin:6px 0 14px; padding:10px; border:1px solid #d4c7b2; background:#f6f2e8; }
html.theme-modern body.build #build.gid0 .contractNew .showCosts { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
html.theme-modern body.build #build.gid0 .contractNew .showCosts .clear { display:none; }
html.theme-modern body.build #build.gid0 hr { clear:both; border:0; border-top:1px solid #d3c8b4; margin:18px 0; }
@media (max-width:700px) {
    html.theme-modern body.build #build.gid0 .build_desc .build_logo { width:96px; height:96px; margin-inline-start:8px; }
    html.theme-modern body.build #build.gid0 .build_desc img.modern-construction-art { width:96px !important; height:96px !important; background-size:96px 96px !important; }
}
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi > .container:has(a[href="hero_adventure.php"]),
html.theme-modern body:is(.hero_inventory,.hero) #content .contentNavi.subNavi > .container:has(a[href="hero_auction.php"]) { display:none !important; }
@media (max-width:700px) {
    html.theme-modern body .contentNavi.subNavi > :is(.container > .content,.content) > a { padding:0 8px !important; font-size:11px !important; }
}

/* Auction navigation, filters and tables */
html.theme-modern body.hero_auction #content > .contentNavi.subNavi:has(a[href="hero_inventory.php"]) { display:none !important; }
html.theme-modern body.hero_auction #content > .auction-tabs { margin-bottom:16px !important; }
html.theme-modern body.hero_auction #auction { max-width:100%; }
html.theme-modern body.hero_auction #auction #filter { margin:0 0 14px; }
html.theme-modern body.hero_auction #auction #filter .boxes { border:1px solid #765c43; border-radius:3px; background:linear-gradient(#8c6b52,#5c4133); box-shadow:inset 0 1px #c9aa82; }
html.theme-modern body.hero_auction #auction #filter .boxes-contents { padding:7px !important; background:none !important; }
html.theme-modern body.hero_auction #auction #filter .wrapper { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
html.theme-modern body.hero_auction #auction #filter .silver { order:2; margin-inline-start:auto; color:#f4e4c6; white-space:nowrap; }
html.theme-modern body.hero_auction #auction .filterContainer { display:flex; flex:1 1 280px; flex-wrap:wrap; gap:3px; }
html.theme-modern body.hero_auction #auction .filterContainer button.iconFilter { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:2px; border:1px solid transparent; border-radius:3px; background:rgba(38,22,15,.24); cursor:pointer; }
html.theme-modern body.hero_auction #auction .filterContainer button.iconFilter:hover, html.theme-modern body.hero_auction #auction .filterContainer button.iconFilterActive { border-color:#d8b774; background:#a37b48; }
html.theme-modern body.hero_auction #auction table { width:100%; border-collapse:collapse; background:#f3eee4; }
html.theme-modern body.hero_auction #auction table th { padding:8px 5px; border:1px solid #9e8870; background:#d1b998; color:#4b3b2c; }
html.theme-modern body.hero_auction #auction table td { padding:8px 5px; border:1px solid #c8b9a6; color:#4b3b2c; }
html.theme-modern body.hero_auction #auction table tbody tr:nth-child(even) { background:#e9e0d1; }
@media (max-width:700px) {
 html.theme-modern body.hero_auction #content { overflow-x:hidden; }
 html.theme-modern body.hero_auction #auction { overflow-x:auto; }
 html.theme-modern body.hero_auction #auction table { min-width:450px; }
 html.theme-modern body.hero_auction #auction #filter .silver { order:0; margin-inline-start:0; }
 html.theme-modern body.hero_auction #auction .filterContainer { flex-basis:100%; }
}
html.theme-modern body.hero_auction #auction #filter .boxes > :not(.boxes-contents) { display:none !important; }
html.theme-modern body.hero_auction #content .auction-tabs .container.active .tabItem { color:#f4e5c8 !important; }
html.theme-modern body.hero_auction #content .contentNavi.subNavi.auction-tabs .container.active .tabItem { color:#f2e1d0 !important; }

/* Hero inventory: equipment filters and item cells. */
html.theme-modern body.hero_inventory #content.hero_inventory > #hero_inventory { padding:0 !important; background:#292c24 !important; }
html.theme-modern body.hero_inventory #hero_inventory .boxes { margin:0 !important; padding:0 !important; border:0 !important; background:none !important; }
html.theme-modern body.hero_inventory #hero_inventory .boxes > :not(.boxes-contents) { display:none !important; }
html.theme-modern body.hero_inventory #hero_inventory .boxes-contents { margin:0 !important; padding:0 !important; border:0 !important; background:none !important; }
html.theme-modern body.hero_inventory .hero-inventory-toolbar { display:flex; align-items:center; direction:ltr; min-height:42px; padding:0 4px; background:linear-gradient(#44382f,#181411); border:1px solid #756044; box-sizing:border-box; }
html.theme-modern body.hero_inventory .hero-inventory-filter { flex:0 0 37px; width:37px; height:38px; padding:2px; border:1px solid transparent; background:transparent; cursor:pointer; }
html.theme-modern body.hero_inventory .hero-inventory-filter span { display:block; width:100%; height:100%; background-position:center; background-repeat:no-repeat; background-size:contain; }
html.theme-modern body.hero_inventory .hero-inventory-filter:hover, html.theme-modern body.hero_inventory .hero-inventory-filter.active { border-color:#ac8950; border-radius:3px; background:#6c5132; }
html.theme-modern body.hero_inventory .filter-all span { background-image:url(hero-v2-slotBag_medium.png); }
html.theme-modern body.hero_inventory .filter-leftHand span { background-image:url(hero-v2-slotLeftHand_medium.png); }
html.theme-modern body.hero_inventory .filter-rightHand span { background-image:url(hero-v2-slotRightHand_medium.png); }
html.theme-modern body.hero_inventory .filter-helmet span { background-image:url(hero-v2-slotHelmet_medium.png); }
html.theme-modern body.hero_inventory .filter-body span { background-image:url(hero-v2-slotBody_medium.png); }
html.theme-modern body.hero_inventory .filter-shoes span { background-image:url(hero-v2-slotShoes_medium.png); }
html.theme-modern body.hero_inventory .filter-bag span { background-image:url(hero-v2-slotBag_medium.png); }
html.theme-modern body.hero_inventory .filter-horse span { background-image:url(hero-v2-slotHorse_medium.png); }
html.theme-modern body.hero_inventory .hero-inventory-trade { margin-left:auto; padding:0 6px; color:#a2c747 !important; white-space:nowrap; font-weight:bold; text-decoration:none; }
html.theme-modern body.hero_inventory .hero-inventory-trade:before { content:'▶'; margin-right:4px; color:#bca168; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale { display:grid !important; grid-template-columns:repeat(8,minmax(0,1fr)); width:100%; max-width:none; gap:0; margin:0; background:#292e25; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale > .inventory, html.theme-modern body.hero_inventory #hero_inventory #itemsToSale > .hero-inventory-empty { position:relative; float:none !important; box-sizing:border-box; width:100% !important; height:auto !important; aspect-ratio:1; margin:0 !important; border:1px solid #766747; border-radius:0; background:#343a2e; box-shadow:inset 0 0 0 1px rgba(0,0,0,.28); overflow:hidden; }
html.theme-modern body.hero_inventory #hero_inventory #itemsToSale > .inventory[hidden] { display:none !important; }
html.theme-modern body.hero_inventory #itemsToSale > .inventory > .item { position:absolute !important; inset:0; width:auto !important; height:auto !important; background-size:contain !important; background-position:center !important; background-repeat:no-repeat !important; }
html.theme-modern body.hero_inventory #itemsToSale > .inventory .amount { position:absolute; top:1px; right:3px; color:#eee2be; text-shadow:1px 1px 2px #000; }
html.theme-modern body.hero_inventory #itemsToSale > :is(.market,.clear) { display:none !important; }
@media (max-width:700px) {
 html.theme-modern body.hero_inventory .hero-inventory-toolbar { flex-wrap:wrap; }
 html.theme-modern body.hero_inventory .hero-inventory-filter { flex:1 1 11%; width:auto; min-width:30px; }
 html.theme-modern body.hero_inventory .hero-inventory-trade { flex:1 0 100%; text-align:right; padding:5px 8px; }
}

/* Hero return and evasion settings in the attributes page. */
html.theme-modern body.hero_attributes .hero-attributes-panel > .hero-status-panel { order:4; box-sizing:border-box; width:100%; padding:12px; border:3px double #a58751; border-radius:3px; color:#574438; background:#ede0c3; box-shadow:0 1px 4px #251c16; }
html.theme-modern body.hero_attributes .hero-return-status { display:flex; align-items:center; gap:12px; margin-bottom:12px; line-height:1.4; }
html.theme-modern body.hero_attributes .hero-return-icon { flex:0 0 40px; width:40px; height:40px; background:url(hero-v2-slotShoes_medium.png) center / contain no-repeat; }
html.theme-modern body.hero_attributes .hero-return-status strong { color:#708d24; }
html.theme-modern body.hero_attributes .hero-return-countdown { white-space:nowrap; }
html.theme-modern body.hero_attributes .hero-hide-form { margin:0; }
html.theme-modern body.hero_attributes .hero-hide-label { display:flex; align-items:center; gap:10px; cursor:pointer; line-height:1.4; }
html.theme-modern body.hero_attributes .hero-hide-label input { position:absolute; width:1px; height:1px; opacity:0; }
html.theme-modern body.hero_attributes .hero-hide-switch { position:relative; flex:0 0 44px; width:44px; height:20px; border:1px solid #93876f; border-radius:12px; background:#aaa08f; box-sizing:border-box; }
html.theme-modern body.hero_attributes .hero-hide-switch:after { content:''; position:absolute; top:1px; left:1px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px #4a3b25; transition:transform .15s; }
html.theme-modern body.hero_attributes .hero-hide-label input:checked + .hero-hide-switch { background:#6ab526; border-color:#4c8a17; }
html.theme-modern body.hero_attributes .hero-hide-label input:checked + .hero-hide-switch:after { transform:translateX(23px); }
html.theme-modern body.hero_attributes .hero-hide-label input:focus-visible + .hero-hide-switch { outline:2px solid #4d7724; outline-offset:2px; }

/* Hero equipment: show the equipped item, and extend the portrait across the panel. */
html.theme-modern body.hero_inventory:not(.hero_attributes) #content.hero_inventory { padding-left:0 !important; padding-right:0 !important; }
html.theme-modern body.hero_inventory #bodyOptions #hero_body_content .content > .draggable { left:0 !important; }
html.theme-modern body.hero_inventory #hero_body_content .draggable:empty::before { opacity:.48; }
html.theme-modern body.hero_inventory #hero_body_content .draggable > a { display:flex; width:100%; height:100%; align-items:center; justify-content:center; }
html.theme-modern body.hero_inventory #hero_body_content .draggable .item.onHero { flex:none; background-size:contain; background-position:center; background-repeat:no-repeat; }

/* Keep inventory tabs aligned with the full-width portrait on desktop and mobile. */
html.theme-modern body.hero_inventory:not(.hero_attributes) .modern-inner-page #content.hero_inventory > .contentNavi.subNavi { left:0 !important; right:auto !important; width:100% !important; margin:0 0 -27px !important; }
@media (max-width:700px) {
  html.theme-modern body.hero_inventory:not(.hero_attributes) #content.hero_inventory > .contentNavi.subNavi > .container { flex:1 1 0 !important; min-width:0 !important; }
}

/* Modern support form and responsive simulator / village overview. */
html.theme-modern body.support #content.support .supportDescription { margin:0 0 18px; color:#594b3d; line-height:1.55; }
html.theme-modern body.support #content.support .supportForm { width:100%; max-width:100%; }
html.theme-modern body.support #support .form_table { width:100%; border-collapse:collapse; margin:0 0 10px; background:transparent; }
html.theme-modern body.support #support .form_table td { padding:5px; border:0; background:transparent; vertical-align:top; }
html.theme-modern body.support #support .form_table_label { width:28%; color:#594b3d; font-weight:bold; }
html.theme-modern body.support #support :is(input,select,textarea) { box-sizing:border-box; width:100%; max-width:100%; padding:7px; border:1px solid #ab9b82; border-radius:3px; background:#fffdf6; color:#40372f; font:inherit; }
html.theme-modern body.support #support textarea { min-height:130px; resize:vertical; }
html.theme-modern body.support #support .error { display:block; color:#a02222; }
html.theme-modern body.village3 #content.village3 table { max-width:100%; }
html.theme-modern body.warsim #content.warsim #select { width:100%; max-width:100%; border-collapse:collapse; background:transparent; }
html.theme-modern body.warsim #select td { padding:8px; vertical-align:top; }
html.theme-modern body.warsim #select .choice label { display:inline-block; padding:3px 0; }
@media (max-width:700px) {
 html.theme-modern body.support #header { height:42px !important; }
 html.theme-modern body.support :is(.modern-header-hero,.modern-header-tools) { display:none !important; }
 html.theme-modern body.support #mid { min-height:0; padding-bottom:70px; }
 html.theme-modern body.support #support .form_table, html.theme-modern body.support #support .form_table tbody, html.theme-modern body.support #support .form_table tr, html.theme-modern body.support #support .form_table td { display:block; width:100%; box-sizing:border-box; }
 html.theme-modern body.warsim #select, html.theme-modern body.warsim #select tbody { display:block; width:100%; }
 html.theme-modern body.warsim #select tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
 html.theme-modern body.warsim #select tr > td { display:block; width:auto; min-width:0; box-sizing:border-box; }
 html.theme-modern body.village3 #content.village3 { overflow-x:auto; }
 html.theme-modern body.village3 #content.village3 table { width:100%; min-width:440px; }
}

/* Secondary tabs within game pages: compact grey tabs with a green active tab. */
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi { display:flex !important; flex-wrap:nowrap !important; align-items:flex-end !important; box-sizing:border-box; width:100% !important; height:auto !important; min-height:25px !important; margin:12px 0 14px !important; padding:0 !important; gap:2px; overflow-x:auto !important; overflow-y:hidden !important; border:0 !important; border-bottom:1px solid #bbb !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container { display:block !important; float:none !important; position:relative !important; flex:0 0 auto !important; width:auto !important; height:auto !important; min-height:0 !important; margin:0 !important; padding:0 !important; border:1px solid #b9b9b9 !important; border-radius:4px 4px 0 0 !important; background:#e6e6e6 !important; box-shadow:inset 0 1px 0 #fff !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container.active { border-color:#8eb827 !important; background:#8fc31f !important; box-shadow:none !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container:hover:not(.active) { background:#f2f2f2 !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container > .content { display:block !important; float:none !important; width:auto !important; height:auto !important; margin:0 !important; padding:0 !important; background:none !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container > .content > a { display:block !important; width:auto !important; height:auto !important; padding:3px 12px 1px !important; color:#666 !important; font:13px/16px Arial,Helvetica,Verdana,sans-serif !important; text-align:center; text-decoration:none !important; white-space:nowrap; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container .tabItem { display:inline !important; padding:0 !important; color:inherit !important; font:inherit !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container.active > .content > a { color:#fff !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi :is(.background-start,.background-end,.clear) { display:none !important; }

html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container > .content > span.tabItem { display:block !important; padding:3px 12px 1px !important; color:#666 !important; font:13px/16px Arial,Helvetica,Verdana,sans-serif !important; white-space:nowrap; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi > .container.active > .content > span.tabItem { color:#fff !important; }
html.theme-modern body .modern-inner-page #content .contentNavi.tabNavi a:focus-visible { outline:2px solid #477400; outline-offset:-2px; }

/* Fit rally navigation on desktop and make large troop counts readable. */
@media (min-width:701px) {
 html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs { overflow:hidden !important; }
 html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container { flex:1 1 0 !important; min-width:0 !important; }
 html.theme-modern body .modern-inner-page #content .contentNavi.subNavi.rally-tabs > .container > .content > a { padding:0 2px !important; font-size:11px !important; line-height:1.1 !important; white-space:normal !important; }
}
html.theme-modern body.build #build.gid16 .troop-details-scroll { max-width:100%; overflow-x:auto; margin:10px 0 18px; }
html.theme-modern body.build #build.gid16 .troop-details-split { min-width:510px; width:100%; margin:0; table-layout:fixed; }
html.theme-modern body.build #build.gid16 .troop-details-split th:first-child,
html.theme-modern body.build #build.gid16 .troop-details-split td.role { width:76px; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.units td { font:11px/16px Arial,Helvetica,sans-serif; white-space:nowrap; font-variant-numeric:tabular-nums; direction:ltr; }

@media (min-width:701px) {
 html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs { overflow:hidden !important; }
 html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs > .container { flex:1 1 0 !important; min-width:0 !important; }
 html.theme-modern body.build #build.gid16 .contentNavi.subNavi.rally-tabs > .container > .content > a { padding:0 2px !important; font-size:11px !important; line-height:1.1 !important; white-space:normal !important; }
}

/* Rally point: legible troop quantities and reference-style overview tables. */
html.theme-modern body.a2b #troops { display:block; width:100%; }
html.theme-modern body.a2b #troops tbody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
html.theme-modern body.a2b #troops tr { display:contents; }
html.theme-modern body.a2b #troops td { display:flex; align-items:center; gap:4px; box-sizing:border-box; min-width:0; padding:8px 5px; white-space:nowrap; font-size:12px; }
html.theme-modern body.a2b #troops td:empty { display:none; }
html.theme-modern body.a2b #troops input.text { box-sizing:border-box; flex:0 0 13ch; width:13ch; min-width:13ch; max-width:none; padding:3px 4px; font:13px Arial,Helvetica,sans-serif; text-align:right; font-variant-numeric:tabular-nums; }
html.theme-modern body.a2b #troops td > a, html.theme-modern body.a2b #troops td > .none { white-space:nowrap; font-variant-numeric:tabular-nums; }
@media (max-width:550px) {
 html.theme-modern body.a2b #troops tbody { grid-template-columns:minmax(0,1fr); }
 html.theme-modern body.a2b #troops td { font-size:12px; white-space:nowrap; }
}
html.theme-modern body.build #build.gid16 .troop-details-split th,
html.theme-modern body.build #build.gid16 .troop-details-split td { border:1px solid #c4c4c4; }
html.theme-modern body.build #build.gid16 .troop-details-split thead td,
html.theme-modern body.build #build.gid16 .troop-details-split thead td a { background:#fff; color:#222; font-weight:normal; text-align:center; }
html.theme-modern body.build #build.gid16 .troop-details-split thead td.role { text-align:left; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.units th { background:#e9e9e9; color:#333; font-weight:normal; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.units th.coords { color:#a9b6c2; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.units td { background:#fff; color:#333; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.units td.none { color:#a9b6c2; }
html.theme-modern body.build #build.gid16 .troop-details-split tbody.infos th,
html.theme-modern body.build #build.gid16 .troop-details-split tbody.infos td { background:#e8e8e8; color:#333; font-weight:normal; }

html.theme-modern body.a2b #troops td { width:auto !important; max-width:none !important; }

/* Confirmation uses the same readable troop layout as the rally overview. */
html.theme-modern body.a2b .troop-details-scroll { max-width:100%; overflow-x:auto; margin:10px 0 18px; }
html.theme-modern body.a2b .troop-details-split { min-width:510px; width:100%; margin:0; table-layout:fixed; }
html.theme-modern body.a2b .troop-details-split th:first-child,
html.theme-modern body.a2b .troop-details-split td.role { width:76px; }
html.theme-modern body.a2b .troop-details-split tbody.units td { font:11px/16px Arial,Helvetica,sans-serif; white-space:nowrap; font-variant-numeric:tabular-nums; direction:ltr; }

html.theme-modern body.a2b .troop-details-split th,
html.theme-modern body.a2b .troop-details-split td { border:1px solid #c4c4c4; }
html.theme-modern body.a2b .troop-details-split thead td,
html.theme-modern body.a2b .troop-details-split thead td a { background:#fff; color:#222; font-weight:normal; text-align:center; }
html.theme-modern body.a2b .troop-details-split thead td.role { text-align:left; }
html.theme-modern body.a2b .troop-details-split tbody.units th { background:#e9e9e9; color:#333; font-weight:normal; }
html.theme-modern body.a2b .troop-details-split tbody.units th.coords { color:#a9b6c2; }
html.theme-modern body.a2b .troop-details-split tbody.units td { background:#fff; color:#333; }
html.theme-modern body.a2b .troop-details-split tbody.units td.none { color:#a9b6c2; }
html.theme-modern body.a2b .troop-details-split tbody.infos th,
html.theme-modern body.a2b .troop-details-split tbody.infos td { background:#e8e8e8; color:#333; font-weight:normal; }

html.theme-modern body.a2b .troop-details-split tbody:is(.options,.cata) th,
html.theme-modern body.a2b .troop-details-split tbody:is(.options,.cata) td { background:#eee; text-align:start; padding:5px; }

/* Match the rally overview even when legacy a2b table rules are loaded. */
html.theme-modern body.a2b table.troop-confirmation.troop-details-split { border-collapse:collapse !important; background:#fff !important; }
html.theme-modern body.a2b table.troop-confirmation.troop-details-split th,
html.theme-modern body.a2b table.troop-confirmation.troop-details-split td { border:1px solid #c4c4c4 !important; padding:4px 2px !important; }
html.theme-modern body.a2b table.troop-confirmation.troop-details-split thead td,
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.units td { background:#fff !important; background-image:none !important; }
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.units th,
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.units tr td:first-child,
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.infos th,
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.infos td { background:#e8e8e8 !important; background-image:none !important; color:#333; font-weight:normal; }
html.theme-modern body.a2b table.troop-confirmation.troop-details-split tbody.units th { text-align:center; }

/* Village overview and Plus shortcut. */
html.theme-modern #sidebarBoxVillageList { position:relative; overflow:visible; }
html.theme-modern #sidebarBoxVillageList .tw-village-overview-button { position:absolute; z-index:3; top:-16px; right:32px; display:grid; place-items:center; box-sizing:border-box; width:40px; height:40px; border:2px solid #5b3d2d; border-radius:50%; background:linear-gradient(#e4cc96,#815d3e 28%,#5d8e22 31%,#315d12 70%,#71543b 73%,#d9bd89); box-shadow:0 2px 3px #493a2f, inset 0 0 0 2px #d6bc84; }
html.theme-modern #sidebarBoxVillageList .tw-village-overview-button:hover { filter:brightness(1.15); }
html.theme-modern #sidebarBoxVillageList .tw-village-overview-button svg { width:21px; height:16px; fill:#fff5d4; filter:drop-shadow(0 1px 1px #28420d); }
html.theme-modern body.village3 #content.village3 { overflow:visible; background:#fff; }
html.theme-modern body.village3 #content.village3 h1.titleInHeader { font:bold 22px Georgia,serif; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll { width:100%; max-width:100%; overflow-x:auto; margin:16px 0; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll table { width:100%; margin:0; border-collapse:collapse; background:#fff; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll :is(td,th) { border:1px solid #c6c6c6; padding:5px 7px; text-align:center; white-space:nowrap; font:12px/16px Arial,Tahoma,sans-serif; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll thead :is(td,th) { background:#fff; color:#333; font-weight:normal; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll tbody tr.hl :is(td,th) { background:#e7f1d1; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll tbody tr:not(.hl) :is(td,th) { background:#f7f7f7; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll .vil { text-align:start; }
html.theme-modern body.village3 #content.village3 .tw-village-table-scroll a { color:#6f9d15; font-weight:bold; }
@media (max-width:700px) { html.theme-modern body.village3 #content.village3 .tw-village-table-scroll table { min-width:520px; } }

html.theme-modern #sidebarBoxVillageList .tw-village-overview-button { top:-36px; }
html.theme-modern body.village3 .modern-inner-page > #contentOuterContainer .contentContainer { background:#fff !important; }

/* Alliance shortcuts use the same icons and disabled states as the original sidebar. */
html.theme-modern #sidebarBoxAlliance .sbx-buttons { gap:5px; }
html.theme-modern #sidebarBoxAlliance .sbx-btn svg { width:20px; height:20px; }
html.theme-modern #sidebarBoxAlliance .sbx-btn:first-child svg { width:25px; height:25px; }
html.theme-modern #sidebarBoxAlliance .sbx-btn.sbx-disabled { opacity:.52; cursor:default; filter:grayscale(.6); }
html.theme-modern #sidebarBoxAlliance .sbx-btn:not(.sbx-disabled):hover { filter:brightness(1.14); }

/* Player rankings: race emblem beside each player name. */
html.theme-modern body.statistics #content table.row_table_data td.pla { white-space:nowrap; }
html.theme-modern body.statistics #content table.row_table_data .tw-ranking-tribe { display:inline-block; width:auto; max-width:22px; height:auto; max-height:26px; margin-inline-end:7px; vertical-align:middle; }

/* Tribe-specific task mentors use their original silhouette and dimensions. */
html.theme-modern #sidebarBoxQuestmaster #questmasterButton { justify-self:center; align-self:end; margin:0; }
html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_1, html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_1 svg { width:152px; height:121px; }
html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_1 img.mentor { width:142px; height:117px; }
html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_2, html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_2 svg { width:200px; height:116px; }
html.theme-modern #sidebarBoxQuestmaster #questmasterButton.vid_2 img.mentor { width:190px; height:112px; }

/* Adventure report: isolated from battle and trade reports. */
html.theme-modern body.reports #content .modern-adventure-report { box-sizing:border-box; width:100%; border:1px solid #e1d2b2; background:#fbf7eb; color:#3e3933; overflow:hidden; }
html.theme-modern body.reports #content .adventure-report-meta { background:#fcf1d9; font:12px Arial,sans-serif; }
html.theme-modern body.reports #content .adventure-report-subject { padding:8px 12px; border-bottom:1px solid #e5d8bc; font-weight:bold; overflow-wrap:anywhere; }
html.theme-modern body.reports #content .adventure-report-time { min-height:32px; box-sizing:border-box; padding:8px 12px; }
html.theme-modern body.reports #content .adventure-report-delete { float:inline-end; padding:0; border:0; background:transparent; cursor:pointer; }
html.theme-modern body.reports #content .adventure-report-illustration { width:100%; aspect-ratio: 546 / 190; background:url(modern-report-adventure-won.jpg) center / cover no-repeat; }
html.theme-modern body.reports #content .adventure-report-banner { position:relative; display:flex; align-items:center; min-height:36px; box-sizing:border-box; padding:0 15px 0 108px; background:linear-gradient(110deg,#b3373e 0 79%,#7f292d 79%); color:#fff; }
html.theme-modern body.reports #content .adventure-report-banner h2 { color:#fff; font:bold 19px Arial,sans-serif; text-transform:uppercase; margin:0; padding:0; }
html.theme-modern body.reports #content .adventure-report-tribe { position:absolute; width:62px; height:62px; object-fit:contain; inset-inline-start:4px; bottom:0; }
html.theme-modern body.reports #content .adventure-report-details { width:100%; border:0; border-collapse:collapse; background:#fbf7eb; table-layout:auto; }
html.theme-modern body.reports #content .adventure-report-details th, html.theme-modern body.reports #content .adventure-report-details td { background:transparent; border:0; padding:8px 10px; vertical-align:top; text-align:start; color:#3e3933; font:12px Arial,sans-serif; }
html.theme-modern body.reports #content .adventure-report-details th { width:86px; font-weight:normal; }
html.theme-modern body.reports #content .adventure-report-stat { display:inline-flex; align-items:center; gap:5px; margin-inline-end:14px; direction:ltr; }
html.theme-modern body.reports #content .adventure-report-stat img { width:16px; height:16px; vertical-align:middle; }
html[dir=rtl].theme-modern body.reports #content .adventure-report-banner { padding:0 108px 0 15px; }
@media(max-width:700px) { html.theme-modern body.reports #content .adventure-report-banner h2 { font-size:16px; } html.theme-modern body.reports #content .adventure-report-details th { width:72px; } }

html.theme-modern body.reports #content .adventure-report-illustration.is-dead { background-image:url(modern-report-adventure-lost.jpg); }

html.theme-modern body.reports #content .adventure-report-banner .roleIcon { position:absolute; width:39px; height:45px; inset-inline-start:47px; bottom:-3px; }

/* Report category tabs share the full available width on desktop. */
html.theme-modern body.reports #content .report-category-tabs { display:flex; width:100%; overflow:visible; }
html.theme-modern body.reports #content .report-category-tabs .container { min-width:0; flex:1 1 0; }
html.theme-modern body.reports #content .report-category-tabs .container a { padding:10px 2px; white-space:nowrap; font-size:clamp(9px, 0.85vw, 12px); }
html.theme-modern body.reports #content .surrounding-reports th, html.theme-modern body.reports #content .surrounding-reports td { overflow-wrap:anywhere; }
html.theme-modern body.reports #content .surrounding-pagination { display:flex; gap:8px; padding:10px; }
@media(max-width:700px) { html.theme-modern body.reports #content .report-category-tabs .container a { font-size:clamp(8px, 2.2vw, 11px); padding:9px 1px; white-space:normal; overflow-wrap:anywhere; } }

html.theme-modern body.reports #content .report-category-tabs .container.active { background:linear-gradient(#ead39d,#b9985e) !important; }
html.theme-modern body.reports #content .report-category-tabs .container.active .tabItem { color:#493323 !important; }
@media(max-width:700px) {
 html.theme-modern body.reports #content .report-category-tabs { overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
 html.theme-modern body.reports #content .report-category-tabs .container { flex:1 0 auto; }
 html.theme-modern body.reports #content .report-category-tabs .container a { font-size:11px; padding:10px 9px; white-space:nowrap; overflow-wrap:normal; }
}

/* Task overview */
html.theme-modern body.tasks #content.tasks { position:relative; min-height:320px; padding-bottom:24px; background:#f7f4eb; }
html.theme-modern body.tasks .tw-task-tabs { display:flex!important; }
html.theme-modern body.tasks .tw-task-tabs > .container { flex:1 1 50%!important; min-width:0!important; }
html.theme-modern body.tasks .tw-task-tabs a { white-space:normal!important; }
.tw-task-close { position:absolute; z-index:4; right:13px; top:-53px; display:block; width:30px; height:30px; border:2px ridge #d4bb83; background:#527629; color:white!important; text-align:center; font:bold 27px/26px Arial; text-decoration:none!important; }
.tw-task-list { display:grid; gap:10px; margin:18px 0 0; }
.tw-task-list[hidden],.tw-task-detail[hidden] { display:none!important; }
.tw-task-card { display:flex; align-items:stretch; min-height:76px; box-sizing:border-box; overflow:hidden; background:#f5ecd6; border:3px ridge #b99b68; box-shadow:0 1px 2px #a79479; color:#513c2d; }
.tw-task-card.is-complete { opacity:.62; }
.tw-task-picture { flex:0 0 76px; width:76px; min-height:70px; object-fit:cover; object-position:center; }
.tw-task-description { flex:1 1 auto; min-width:0; padding:9px; display:flex; flex-direction:column; justify-content:center; gap:6px; }
.tw-task-description strong { font-size:14px; }
.tw-task-rewards { display:flex; flex-wrap:wrap; gap:5px; color:#74604e; font-size:11px; }
.tw-task-rewards span { display:inline-flex; align-items:center; gap:2px; padding:2px 4px; border-radius:4px; background:#ded3ba; }
.tw-task-rewards img { display:inline-block; width:18px; height:18px; }
.tw-task-action { flex:0 0 130px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px; padding:6px; text-align:center; }
.tw-task-progress { width:120px; height:12px; border:2px ridge #987a4c; border-radius:8px; background:#614936; overflow:hidden; }
.tw-task-progress span { display:block; height:100%; background:linear-gradient(#a8d44d,#619a18); }
.tw-task-action small { font-size:11px; }
.tw-task-open,.tw-task-back { cursor:pointer; border:1px solid #4a681d; border-radius:3px; padding:4px 9px; background:linear-gradient(#a7cc57,#5c8d1e); box-shadow:inset 0 1px #d5eca0; color:white; font-weight:bold; }
.tw-task-open:hover,.tw-task-back:hover { background:linear-gradient(#badc6a,#75a52a); }
.tw-task-collected { padding:9px 16px; border:1px solid #b8ab93; background:#d8d0bf; color:#766c60; }
.tw-task-detail { margin:18px 0; padding:14px; background:#f5ecd6; border:3px ridge #b99b68; color:#513c2d; overflow-wrap:anywhere; }
.tw-task-detail #popup3,.tw-task-detail #qstd { position:static!important; float:none!important; width:auto!important; height:auto!important; margin:0!important; padding:0!important; background:none!important; }
.tw-task-detail #qstbg { display:none!important; }
.tw-task-detail .spoken,.tw-task-detail .rew { margin:12px 0; }
.tw-task-detail .qle,.tw-task-detail .qri { display:inline-block; margin:8px 12px 4px 0; padding:7px 12px; background:#759f2a; border:1px solid #506f1c; color:white!important; text-decoration:none; }
.tw-task-detail .tw-task-back { margin-bottom:12px; }
@media(max-width:700px) { .tw-task-card { flex-wrap:wrap; } .tw-task-picture { flex-basis:62px; width:62px; } .tw-task-action { flex:0 0 105px; padding:4px; } .tw-task-progress { width:95px; } .tw-task-description { padding:5px; } .tw-task-rewards { gap:2px; } .tw-task-rewards span { padding:1px; } }
@media(max-width:380px) { .tw-task-action { flex-basis:90px; } .tw-task-progress { width:80px; } .tw-task-open { font-size:11px; } }

html.theme-modern body.tasks .modern-inner-page #content h1.titleInHeader { position:absolute!important; top:-51px!important; left:20px!important; right:auto!important; margin:0!important; width:auto!important; }
html.theme-modern[dir=rtl] body.tasks .modern-inner-page #content h1.titleInHeader { right:20px!important; left:auto!important; }

/* Shared close controls, sidebar clock and mobile drawers */
html.theme-modern :is(.building-close,.messages-close,.profile-close,.tw-task-close) { box-sizing:border-box!important; width:32px!important; height:32px!important; border:3px ridge #dbbf7e!important; border-radius:0!important; background:linear-gradient(#82a24e,#385e19)!important; box-shadow:inset 0 0 0 1px #273d16,0 1px 2px #473123!important; color:#fff!important; font:bold 26px/25px Arial,sans-serif!important; text-align:center!important; text-decoration:none!important; text-shadow:0 1px 2px #233d11!important; }
html.theme-modern :is(.building-close,.messages-close,.profile-close,.tw-task-close):hover { background:linear-gradient(#a0c65d,#517d21)!important; }
#tw-server-time { box-sizing:border-box; width:186px; min-height:27px; margin:0 0 10px; padding:5px 7px; border:1px solid #735844; border-radius:5px; background:#f3eee3; box-shadow:0 2px 4px #0006; color:#563c31; direction:ltr; text-align:center; font:11px/15px Arial,sans-serif; white-space:nowrap; }
html.theme-modern .tw-clock-language { display:flex; align-items:center; flex-wrap:wrap; gap:4px; width:100%; margin:0 0 10px; direction:ltr; }
@media (min-width:701px) { html.theme-modern .tw-clock-language { position:relative; top:-18px; } }
html.theme-modern .tw-clock-language #tw-server-time { flex:0 0 auto; margin:0; }
html.theme-modern .language-flags svg { width:22px; height:13px; }
html.theme-modern .tw-clock-language .language-flags { gap:2px; }
html.theme-modern .tw-clock-language .language-flags a { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:26px; min-height:25px; padding:1px; }
html.theme-modern body.plus #content > h1.titleInHeader { text-align:start!important; }
html.theme-modern body.plus #content .plus-tabs { display:flex!important; overflow:hidden!important; }
html.theme-modern body.plus #content .plus-tabs > .container { flex:1 1 0!important; min-width:0!important; }
html.theme-modern body.plus #content .plus-tabs > .container > .content > a { width:100%!important; height:40px!important; padding:0 3px!important; display:flex!important; align-items:center!important; justify-content:center!important; white-space:normal!important; font-size:11px!important; line-height:1.1!important; }
.tw-sidebar-veil,.tw-sidebar-toggle { display:none; }
@media(max-width:700px) {
 html.theme-modern body .modern-info-sidebar,html.theme-modern body .modern-village-sidebar { display:block!important; position:fixed!important; top:42px!important; bottom:54px!important; left:0!important; right:auto!important; width:min(320px,88vw)!important; max-width:88vw!important; height:auto!important; overflow-y:auto!important; overflow-x:hidden!important; margin:0!important; padding:12px 10px!important; box-sizing:border-box!important; z-index:10002!important; background:rgba(68,52,35,.96); box-shadow:0 2px 12px #0009; transform:translateX(-110%)!important; transition:transform .22s ease; visibility:hidden; }
 html.theme-modern body .modern-village-sidebar { left:auto!important; right:0!important; transform:translateX(110%)!important; }
 html.theme-modern body > .modern-village-sidebar #side_info { position:relative !important; inset:auto !important; float:none !important; margin:0 !important; }
 html.theme-modern body.tw-sidebar-left-open .modern-info-sidebar,html.theme-modern body.tw-sidebar-right-open .modern-village-sidebar { transform:translateX(0)!important; visibility:visible; }
 html.theme-modern body .tw-sidebar-veil:not([hidden]) { display:block; position:fixed; inset:42px 0 54px; z-index:10001; background:#0006; }
 html.theme-modern body .tw-sidebar-toggle { display:block; position:fixed; top:47%; z-index:10003; width:19px; height:58px; padding:0; border:1px solid #735b43; color:#fff3d5; background:#554631cc; font:bold 25px/50px Arial; }
 html.theme-modern body .tw-sidebar-toggle-left { left:0; border-radius:0 5px 5px 0; }
 html.theme-modern body .tw-sidebar-toggle-right { right:0; border-radius:5px 0 0 5px; }
 html.theme-modern body.tw-sidebar-left-open .tw-sidebar-toggle-left { left:min(320px,88vw); }
 html.theme-modern body.tw-sidebar-right-open .tw-sidebar-toggle-right { right:min(320px,88vw); }
 html.theme-modern body.plus #content .plus-tabs > .container > .content > a { font-size:10px!important; padding:0 1px!important; }
}

html.theme-modern .tw-page-close { position:absolute; z-index:20; top:10px; right:12px; box-sizing:border-box; width:32px; height:32px; border:3px ridge #dbbf7e; border-radius:0; background:linear-gradient(#82a24e,#385e19); box-shadow:inset 0 0 0 1px #273d16,0 1px 2px #473123; color:white!important; font:bold 26px/25px Arial,sans-serif; text-align:center; text-decoration:none!important; text-shadow:0 1px 2px #233d11; }
html.theme-modern .tw-page-close:hover { background:linear-gradient(#a0c65d,#517d21); }

@media (max-width:700px) {
 html.theme-modern body > aside.modern-info-sidebar, html.theme-modern body > aside.modern-village-sidebar { display:block!important; position:fixed!important; z-index:10002!important; }
 html.theme-modern body.tw-sidebar-left-open > aside.modern-info-sidebar, html.theme-modern body.tw-sidebar-right-open > aside.modern-village-sidebar { display:block!important; visibility:visible!important; transform:translateX(0)!important; }
}

/* Payment return page */
html.theme-modern body.plus #content.payment-result-page { min-height:280px; }
.payment-result-card { box-sizing:border-box; max-width:480px; margin:28px auto 36px; padding:25px 22px; border:3px ridge #b99b68; background:#f5eddc; box-shadow:0 1px 4px #82715a66; color:#503e30; text-align:center; }
.payment-result-icon { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:55px; height:55px; margin:0 auto 12px; border:3px ridge #d5bd8d; border-radius:50%; background:linear-gradient(#c87559,#973b2e); color:#fff; font:bold 36px/1 Arial,sans-serif; text-shadow:0 1px 2px #463023; }
.payment-result-success .payment-result-icon { background:linear-gradient(#a6c65d,#54851d); }
.payment-result-notice .payment-result-icon { background:linear-gradient(#dcb45a,#ae7823); }
.payment-result-card h2 { margin:0 0 14px; font-size:18px; color:#503e30; }
.payment-result-message { line-height:1.8; overflow-wrap:anywhere; }
.payment-result-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:14px; margin-top:24px; }
.payment-result-button { display:inline-block; padding:7px 15px; border:1px solid #4a681d; border-radius:3px; background:linear-gradient(#a7cc57,#5c8d1e); color:white!important; font-weight:bold; text-decoration:none!important; box-shadow:inset 0 1px #d5eca0; }
.payment-result-button:hover { background:linear-gradient(#badc6a,#75a52a); }
.payment-result-back { color:#527a1f!important; font-weight:bold; }
@media(max-width:700px) { .payment-result-card { margin:20px 0 28px; padding:20px 12px; } }

/* Reinforcements use the same neutral grid as the rally overview. */
html.theme-modern body.build #build.gid16 table.troop-details-split { border-collapse:collapse !important; background:#fff !important; }
html.theme-modern body.build #build.gid16 table.troop-details-split th,
html.theme-modern body.build #build.gid16 table.troop-details-split td { border:1px solid #c4c4c4 !important; }
html.theme-modern body.build #build.gid16 table.troop-details-split thead td,
html.theme-modern body.build #build.gid16 table.troop-details-split tbody.units td { background:#fff !important; background-image:none !important; }
html.theme-modern body.build #build.gid16 table.troop-details-split tbody.units th,
html.theme-modern body.build #build.gid16 table.troop-details-split tbody.infos th,
html.theme-modern body.build #build.gid16 table.troop-details-split tbody.infos td { background:#e8e8e8 !important; background-image:none !important; color:#333; font-weight:normal; }
html.theme-modern body.a2b table.reinforcement-return input.text { box-sizing:border-box; width:100%; min-width:0; max-width:100%; padding:3px 2px; font:11px Arial,Helvetica,sans-serif; font-variant-numeric:tabular-nums; text-align:center; }

/* Gold packages and the Plus advantages cards. */
html.theme-modern body.plus .modern-gold-package-image { display:block; width:100px !important; height:100px !important; max-width:100%; object-fit:contain; margin:0 auto; }
html.theme-modern body.plus .plus-advantages { display:flex; flex-wrap:wrap; gap:10px; align-items:stretch; margin:14px 0; }
html.theme-modern body.plus .plus-advantages > h4,
html.theme-modern body.plus .plus-advantages > p { display:none; }
html.theme-modern body.plus .plus-advantages > table.plusFunctions { display:block; box-sizing:border-box; width:100% !important; margin:0 !important; padding:0 !important; border:0 !important; background:none !important; }
html.theme-modern body.plus .plus-advantages > table.plusFunctions thead { display:none; }
html.theme-modern body.plus .plus-advantages > table.plusFunctions > tbody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; }
html.theme-modern body.plus .plus-advantages > table.plusFunctions tr { display:flex; flex-wrap:wrap; align-content:flex-start; align-items:center; box-sizing:border-box; min-width:0; padding:13px; gap:8px; border:3px double #9a7745; border-radius:3px; background:linear-gradient(150deg,#fbf8ee 0%,#faf4e6 70%,#ead9b5 100%); box-shadow:inset 0 0 0 1px #e4d0a4; color:#503a2b; }
html.theme-modern body.plus .plus-advantages > table.plusFunctions td { display:block; box-sizing:border-box; width:auto !important; height:auto !important; padding:0 !important; border:0 !important; background:transparent !important; text-align:start; white-space:normal; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.desc { flex:1 0 100%; font-weight:bold; font-size:14px; text-align:start; line-height:1.45; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.desc .run { font-size:12px; font-weight:normal; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.dur { flex:1 1 auto; font-size:12px; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.cost { font-weight:bold; white-space:nowrap; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.act { flex:0 1 auto; }
html.theme-modern body.plus .plus-advantages .plusFunctions td.act button { max-width:100%; }
html.theme-modern body.plus .plus-advantages > table.plus-account-card,
html.theme-modern body.plus .plus-advantages > table.plus-club-card { flex:1 1 calc(50% - 10px); width:calc(50% - 10px) !important; }
html.theme-modern body.plus .plus-advantages > table.plus-club-card { order:0; }
html.theme-modern body.plus .plus-advantages > table.plus-account-card { order:1; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards { order:2; }
html.theme-modern body.plus .plus-advantages > table.plus-extra-cards { order:3; }
html.theme-modern body.plus .plus-advantages > table:is(.plus-account-card,.plus-club-card) > tbody { display:block; }
html.theme-modern body.plus .plus-advantages > table:is(.plus-account-card,.plus-club-card) tr { min-height:130px; height:100%; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards > tbody { grid-template-columns:repeat(4,minmax(0,1fr)); }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards tr { min-height:130px; justify-content:center; text-align:center; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td { text-align:center; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td.desc { text-align:center; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td.dur { flex:1 0 100%; }
@media(max-width:700px) {
 html.theme-modern body.plus .plus-advantages > table.plus-resource-cards > tbody { grid-template-columns:repeat(2,minmax(0,1fr)); }
 html.theme-modern body.plus .plus-advantages > table.plus-extra-cards > tbody { grid-template-columns:1fr; }
 html.theme-modern body.plus .plus-advantages > table:is(.plus-account-card,.plus-club-card) { flex-basis:100%; width:100% !important; }
}

html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td.act { flex:1 1 100%; width:100% !important; min-width:0; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td.act button { width:100% !important; min-width:0 !important; padding-inline:1px !important; }
html.theme-modern body.plus .plus-advantages > table.plus-resource-cards td.act .button-contents { white-space:normal; font-size:10px; }

/* Gold shop: package artwork, framed tile and price strip. */
html.theme-modern body.plus #products.modern-gold-products { width:100% !important; max-width:100%; padding:0; }
html.theme-modern body.plus .gold-package-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:start; margin:16px 0 24px; direction:ltr; }
html.theme-modern body.plus .gold-package-item { min-width:0; }
html.theme-modern body.plus .gold-package-card { position:relative; display:flex; flex-direction:column; align-items:center; box-sizing:border-box; width:100%; min-width:0; min-height:244px; overflow:hidden; padding:12px 5px 0; border:4px ridge #c3a167; border-radius:3px; background:radial-gradient(ellipse at 50% 65%,#51d2d0 0%,#087b7e 30%,#075458 66%,#073c40 100%); box-shadow:inset 0 0 0 1px #432e1a,0 1px 3px #6c563b; color:#fff1d9 !important; text-align:center; text-decoration:none !important; font-family:Arial,Tahoma,sans-serif; }
html.theme-modern body.plus a.gold-package-card:hover, html.theme-modern body.plus a.gold-package-card:focus-visible { filter:brightness(1.13); outline:2px solid #e5c57a; outline-offset:2px; }
html.theme-modern body.plus .gold-package-card-featured { background:radial-gradient(ellipse at 50% 65%,#ffe281 0%,#bb7717 45%,#85500d 100%); }
html.theme-modern body.plus .gold-package-name { display:block; min-height:18px; max-width:100%; overflow-wrap:anywhere; color:#ffe8af; font-size:11px; font-weight:bold; text-shadow:0 1px 2px #37200e; }
html.theme-modern body.plus .gold-package-amount { display:flex; justify-content:center; align-items:center; gap:5px; width:100%; color:#fff3de; font-size:clamp(14px,2.2vw,21px); font-weight:bold; line-height:1.2; direction:ltr; text-shadow:0 1px 2px #361a0d,1px 1px #361a0d; overflow-wrap:anywhere; }
html.theme-modern body.plus .gold-package-coin { display:inline-flex; flex:0 0 22px; justify-content:center; align-items:center; width:22px; height:22px; border:2px solid #69401c; border-radius:50%; background:radial-gradient(circle at 35% 30%,#ffdf81,#c48021 76%); box-shadow:inset 0 0 0 2px #e7b957; color:#ffdf94; font:bold 16px Georgia,serif; text-shadow:0 1px #74461c; }
html.theme-modern body.plus .gold-package-card img.modern-gold-package-image { display:block; flex:1 1 auto; width:100px !important; height:100px !important; min-height:100px; max-height:120px; max-width:100%; object-fit:contain; margin:auto; }
html.theme-modern body.plus .gold-package-price { display:flex; justify-content:center; align-items:center; box-sizing:border-box; width:calc(100% + 10px); min-height:33px; margin:0 -5px; padding:6px 3px; background:rgba(0,0,0,.4); color:#fff0d6; font-weight:bold; font-size:13px; direction:ltr; text-shadow:0 1px 2px #27170e; }
html.theme-modern body.plus .gold-package-methods { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; padding:8px 0; }
html.theme-modern body.plus .gold-package-methods form { margin:0; max-width:100%; }
html.theme-modern body.plus .gold-package-methods input[type=image] { max-width:100%; height:auto; }
@media (max-width:700px) { html.theme-modern body.plus .gold-package-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } html.theme-modern body.plus .gold-package-card { min-height:215px; } }
@media (max-width:330px) { html.theme-modern body.plus .gold-package-grid { grid-template-columns:1fr; } }

/* Public login and registration: parchment panel with the lobby frame. */
html.theme-modern body:is(.login,.signup,.logout,.activate) { min-width:0 !important; min-height:100vh; margin:0; color:#604b3c; background:#29342b url('../gpack/modern-reference/img_ltr/themes/default/background/bgResources.jpg') center top / cover fixed no-repeat !important; font:14px/1.45 Arial,Tahoma,sans-serif; }
html.theme-modern body:is(.login,.signup,.logout,.activate)::before { content:''; position:fixed; inset:0; background:rgba(11,15,15,.55); pointer-events:none; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #wrapper, html.theme-modern body:is(.login,.signup,.logout,.activate) .bodyWrapper { position:relative; min-width:0 !important; width:100% !important; min-height:100vh; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #staticElements, html.theme-modern body:is(.login,.signup,.logout,.activate) #msfilter, html.theme-modern body:is(.login,.signup,.logout,.activate) #header, html.theme-modern body:is(.login,.signup,.logout,.activate) #side_info, html.theme-modern body:is(.login,.signup,.logout,.activate) #ce { display:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #mid { display:flex !important; flex-direction:column; align-items:center; box-sizing:border-box; width:100% !important; min-width:0 !important; margin:0 !important; padding:32px 22px 24px !important; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi { position:relative !important; inset:auto !important; order:0; float:none !important; width:min(100%,600px) !important; margin:0 auto 18px !important; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi ul { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:7px; margin:0; padding:0; list-style:none; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi li { float:none !important; width:auto !important; margin:0 !important; padding:0 !important; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi li > a { display:block; padding:7px 12px; border:1px solid #9f8a5b; border-radius:3px; background:linear-gradient(#614d3d,#342820); color:#f4e3c1; text-decoration:none; line-height:1.2; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi li.active > a { background:linear-gradient(#d1b17a,#927044); color:#fff8e8; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #contentOuterContainer { position:relative !important; inset:auto !important; order:1; float:none !important; box-sizing:border-box !important; width:min(100%,460px) !important; min-width:0 !important; height:auto !important; margin:0 auto !important; padding:22px !important; border:7px solid #4d4648 !important; border-radius:6px; background:linear-gradient(#c8a36c,#f2dfb9 30px,#fef0ce 200px) top / 100% 50% no-repeat,linear-gradient(0deg,#c8a46c,#f5e3bd 30px,#fef0ce 200px) bottom / 100% 50% no-repeat !important; box-shadow:0 2px 18px #0009,inset 0 0 8px #8e7248; }
html.theme-modern body.signup #contentOuterContainer { width:min(100%,620px) !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #contentOuterContainer::after { content:''; position:absolute; inset:-18px -17px -19px; z-index:3; pointer-events:none; background:url('auth-modern/corner-1.png') left top no-repeat,url('auth-modern/corner-2.png') right top no-repeat,url('auth-modern/corner-3.png') left bottom no-repeat,url('auth-modern/corner-4.png') right bottom no-repeat; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #contentOuterContainer > .contentTitle, html.theme-modern body:is(.login,.signup,.logout,.activate) #contentOuterContainer > .contentFooter { display:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) .contentContainer, html.theme-modern body:is(.login,.signup,.logout,.activate) #content { position:static !important; box-sizing:border-box; width:100% !important; min-width:0 !important; height:auto !important; margin:0 !important; padding:0 !important; background:none !important; border:0 !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content h1.titleInHeader { position:static !important; width:auto !important; height:auto !important; margin:0 0 22px !important; padding:0 !important; color:#684f40 !important; font:bold 18px/1.3 Georgia,serif !important; letter-spacing:1px; text-shadow:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content h2,html.theme-modern body:is(.login,.signup,.logout,.activate) #content h4 { position:static; margin:18px 0 10px; padding:0; background:none; color:#654d3c; font:bold 15px/1.4 Arial,Tahoma,sans-serif; }
html.theme-modern body:is(.login,.signup,.logout,.activate) :is(.outerLoginBox,.innerLoginBox,.greenbox,.greenbox-content) { float:none !important; width:100% !important; height:auto !important; margin:0 !important; padding:0 !important; border:0 !important; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) :is(.greenbox-top,.greenbox-bottom) { display:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) table:is(.loginTable,.pwForgottenTable,#sign_input) { width:100% !important; margin:0 !important; border:0 !important; background:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) table:is(.loginTable,.pwForgottenTable,#sign_input) :is(tbody,tr,th,td) { display:block; box-sizing:border-box; width:100% !important; height:auto !important; padding:0 !important; border:0 !important; background:none !important; text-align:start !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) table:is(.loginTable,.pwForgottenTable,#sign_input) tr { margin:0 0 15px; }
html.theme-modern body:is(.login,.signup,.logout,.activate) table:is(.loginTable,.pwForgottenTable,#sign_input) tr > :first-child { margin-bottom:5px; font-weight:bold; }
html.theme-modern body:is(.login,.signup,.logout,.activate) input.text { display:block; box-sizing:border-box; width:100% !important; max-width:100%; height:40px; padding:8px 10px; border:1px solid #96836d; border-radius:2px; background:#fffdf8; color:#35291f; font:14px Arial,Tahoma,sans-serif; }
html.theme-modern body:is(.login,.signup,.logout,.activate) input.text:focus { outline:2px solid #99ac58; outline-offset:1px; }
html.theme-modern body:is(.login,.signup,.logout,.activate) .error { display:block; color:#a4231e; }
html.theme-modern body:is(.login,.signup,.logout,.activate) .passwordForgotten { margin-top:16px !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) :is(.passwordForgottenLink,.btn) { margin-top:15px; text-align:center; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content button { cursor:pointer; }
html.theme-modern body.signup .tribeSelect { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; width:100% !important; }
html.theme-modern body.signup .tribeSelect .tribe { float:none !important; flex:1 1 120px; min-width:0; max-width:170px; height:auto !important; text-align:center; }
html.theme-modern body.signup #sign_select { width:100% !important; }
html.theme-modern body.signup #sign_select td { padding:6px; }
html.theme-modern body.signup .signup-captcha { display:grid; gap:6px; margin:16px 0; }
html.theme-modern body.signup .signup-captcha img { max-width:100%; }
html.theme-modern body:is(.login,.signup,.logout,.activate) .hide { display:none !important; }
@media(max-width:600px) { html.theme-modern body:is(.login,.signup,.logout,.activate) #mid { padding:20px 17px !important; } html.theme-modern body:is(.login,.signup,.logout,.activate) #contentOuterContainer { padding:17px !important; } html.theme-modern body.signup #sign_select,html.theme-modern body.signup #sign_select tbody,html.theme-modern body.signup #sign_select tr { display:block; } html.theme-modern body.signup #sign_select td { display:inline-block; } }

html.theme-modern body:is(.login,.signup,.logout,.activate) .contentContainer, html.theme-modern body:is(.login,.signup,.logout,.activate) #content { box-shadow:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content button { display:inline-block; width:auto; min-width:90px; min-height:34px; padding:5px 16px; border:3px double #c7a662; border-radius:2px; background:linear-gradient(#8fbf42,#4e8016 55%,#3d6610) !important; color:#fff8dc; font:bold 13px Arial,Tahoma,sans-serif; text-shadow:0 1px #334d10; box-shadow:0 1px 2px #80694d; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content button:hover { filter:brightness(1.12); }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content button .button-position { display:none !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content button .button-container,html.theme-modern body:is(.login,.signup,.logout,.activate) #content button .button-contents { position:static !important; display:block !important; width:auto !important; height:auto !important; margin:0 !important; padding:0 !important; background:none !important; color:inherit !important; line-height:1.3 !important; }
html.theme-modern body.login #content .loginTable tr:last-child > td:nth-child(2) { text-align:center !important; }

html.theme-modern body:is(.login,.signup,.logout,.activate) #side_navi { height:auto !important; min-height:0 !important; }
html.theme-modern body:is(.login,.signup,.logout,.activate) #content h4 { box-sizing:border-box; width:100% !important; min-width:0 !important; max-width:100% !important; }

html.theme-modern body.logout #content p { margin:14px 0; line-height:1.6; }
html.theme-modern body.logout #content p:last-of-type { margin-top:24px; text-align:center; }
html.theme-modern body.logout #content a.arrow { display:inline-block; min-width:110px; padding:8px 16px; border:3px double #c7a662; border-radius:2px; background:linear-gradient(#8fbf42,#4e8016 55%,#3d6610); color:#fff8dc; font:bold 13px Arial,Tahoma,sans-serif; text-align:center; text-decoration:none; text-shadow:0 1px #334d10; }
html.theme-modern body.logout #content a.arrow:hover,html.theme-modern body.logout #content a.arrow:focus-visible { filter:brightness(1.12); }

/* Login sidebars retain the game server information and notices. */
html.theme-modern body.login #mid { display:grid !important; grid-template-columns:minmax(0,230px) minmax(0,460px) minmax(0,230px); grid-template-rows:auto auto auto; justify-content:center; align-content:start; align-items:start; column-gap:18px; }
html.theme-modern body.login #mid > #side_navi { grid-column:1 / -1; grid-row:1; }
html.theme-modern body.login #mid > #contentOuterContainer { grid-column:2; grid-row:2 / span 2; }
html.theme-modern body.login #mid > #side_info { display:contents !important; position:static !important; width:auto !important; height:auto !important; }
html.theme-modern body.login .auth-side-left,html.theme-modern body.login .auth-side-right,html.theme-modern body.login .auth-side-extra { position:static; width:100%; min-width:0; }
html.theme-modern body.login .auth-side-left { grid-column:1; grid-row:2; }
html.theme-modern body.login .auth-side-right { grid-column:3; grid-row:2; }
html.theme-modern body.login .auth-side-extra { grid-column:3; grid-row:3; }
html.theme-modern body.login .auth-sidebar-card { box-sizing:border-box; position:relative; width:100%; margin:0 0 14px; padding:18px 20px; border:solid transparent; border-width:20px 25px; border-image:url('../gpack/modern-reference/img_ltr/hud/sidebar/sidebarBox.png') 38 53 fill / 20px 25px stretch; color:#563f31; font:13px/1.5 Arial,Tahoma,sans-serif; overflow-wrap:anywhere; }
html.theme-modern body.login .auth-sidebar-card center { text-align:center; }
html.theme-modern body.login .auth-sidebar-card font { font-size:13px; }
html.theme-modern[lang=fa] body.login .auth-sidebar-card, html.theme-modern[lang=fa] body.login .auth-sidebar-card * { font-family:Vazirmatn,Tahoma,sans-serif !important; letter-spacing:normal; }
html.theme-modern[lang=en] body.login .auth-sidebar-card, html.theme-modern[lang=en] body.login .auth-sidebar-card * { font-family:Arial,Helvetica,sans-serif !important; letter-spacing:normal; }
html.theme-modern body.login .auth-sidebar-card b { color:#4b3527; }
html.theme-modern body.login .auth-side-extra:empty { display:none; }
@media(max-width:900px) {
 html.theme-modern body.login #mid { display:flex !important; }
 html.theme-modern body.login #mid > #side_info { display:grid !important; order:2; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:min(100%,460px) !important; margin:20px auto 0; }
 html.theme-modern body.login .auth-side-left,html.theme-modern body.login .auth-side-right,html.theme-modern body.login .auth-side-extra { grid-column:auto; grid-row:auto; }
 html.theme-modern body.login .auth-side-extra { grid-column:1/-1; }
}
@media(max-width:480px) { html.theme-modern body.login #mid > #side_info { grid-template-columns:1fr; } html.theme-modern body.login .auth-side-extra { grid-column:auto; } }

/* Modern troop portraits for training and research pages. */
html.theme-modern body.build #build img.unitSection { width:140px; height:140px; background-repeat:no-repeat; background-position:center; }
html.theme-modern body.build #build img.unitSection.u1Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t1.png'); }
html.theme-modern body.build #build img.unitSection.u2Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t2.png'); }
html.theme-modern body.build #build img.unitSection.u3Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t3.png'); }
html.theme-modern body.build #build img.unitSection.u4Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t4.png'); }
html.theme-modern body.build #build img.unitSection.u5Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t5.png'); }
html.theme-modern body.build #build img.unitSection.u6Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t6.png'); }
html.theme-modern body.build #build img.unitSection.u7Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t7.png'); }
html.theme-modern body.build #build img.unitSection.u8Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t8.png'); }
html.theme-modern body.build #build img.unitSection.u9Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t9.png'); }
html.theme-modern body.build #build img.unitSection.u10Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/roman/section/t10.png'); }
html.theme-modern body.build #build img.unitSection.u11Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t1.png'); }
html.theme-modern body.build #build img.unitSection.u12Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t2.png'); }
html.theme-modern body.build #build img.unitSection.u13Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t3.png'); }
html.theme-modern body.build #build img.unitSection.u14Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t4.png'); }
html.theme-modern body.build #build img.unitSection.u15Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t5.png'); }
html.theme-modern body.build #build img.unitSection.u16Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t6.png'); }
html.theme-modern body.build #build img.unitSection.u17Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t7.png'); }
html.theme-modern body.build #build img.unitSection.u18Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t8.png'); }
html.theme-modern body.build #build img.unitSection.u19Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t9.png'); }
html.theme-modern body.build #build img.unitSection.u20Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/teuton/section/t10.png'); }
html.theme-modern body.build #build img.unitSection.u21Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t1.png'); }
html.theme-modern body.build #build img.unitSection.u22Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t2.png'); }
html.theme-modern body.build #build img.unitSection.u23Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t3.png'); }
html.theme-modern body.build #build img.unitSection.u24Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t4.png'); }
html.theme-modern body.build #build img.unitSection.u25Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t5.png'); }
html.theme-modern body.build #build img.unitSection.u26Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t6.png'); }
html.theme-modern body.build #build img.unitSection.u27Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t7.png'); }
html.theme-modern body.build #build img.unitSection.u28Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t8.png'); }
html.theme-modern body.build #build img.unitSection.u29Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t9.png'); }
html.theme-modern body.build #build img.unitSection.u30Section { background-image:url('../gpack/modern-reference/img_ltr/global/units/gaul/section/t10.png'); }

/* Persian interface typography; keep icon fonts and the English interface unchanged. */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/vazirmatn/Vazirmatn-variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
html.theme-modern[lang="fa"] body,
html.theme-modern[lang="fa"] body :is(button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6),
html.theme-modern[lang="fa"] body.plus .gold-package-card {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}
/* Persian tab labels override legacy font shorthands on inner menus. */
html.theme-modern[lang="fa"] body :is(#content, #build) .contentNavi:is(.tabNavi, .subNavi) > .container > .content > :is(a, span.tabItem),
html.theme-modern[lang="fa"] body :is(#content, #build) .contentNavi:is(.tabNavi, .subNavi) :is(a.tabItem, a > span.tabItem) {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}
/* Map frame and controls share the current game layout. */
html.theme-modern body.map #content h1.titleInHeader { inset-inline-start:60px; inset-inline-end:auto; }
html.theme-modern body.map #mapContainer #mapCoordEnter { direction:ltr; left:auto; right:0; bottom:0; }
html.theme-modern body.map #mapContainer #mapCoordEnter .coordinatesInput { direction:ltr; }
@media (max-width:700px) {
    html.theme-modern body.map .modern-inner-page > #contentOuterContainer { overflow:visible; }
    html.theme-modern body.map #content .map2 { box-sizing:border-box; width:100%; max-width:100%; margin:0; padding-inline-start:0; padding-inline-end:25px; }
    html.theme-modern body.map #content #mapContainer { width:100%; max-width:100%; }
    html.theme-modern body.map #mapContainer #minimapContainer { top:30px; }
    html.theme-modern body.map #mapContainer #outline { bottom:28px; }
}html.theme-modern[dir="rtl"] body.map .modern-inner-page > #contentOuterContainer #content h1.titleInHeader { right:65px; left:auto; }
@media (max-width:700px) {
    html.theme-modern body.map .mapTileDialog .dialog-container { box-sizing:border-box; width:min(320px, calc(100vw - 40px)) !important; max-height:calc(100vh - 40px); overflow:auto; }
    html.theme-modern body.map .mapTileDialog .dialog-contents { box-sizing:border-box; width:100% !important; margin:0 !important; padding:14px !important; }
    html.theme-modern body.map .mapTileDialog .positionDetails { width:100%; }
    html.theme-modern body.map .mapTileDialog .positionDetails h1.titleInHeader { position:static !important; width:auto !important; max-width:calc(100% - 32px) !important; margin:0 0 10px !important; line-height:1.4; }
    html.theme-modern body.map .mapTileDialog #tileDetails { box-sizing:border-box; width:100% !important; min-height:0 !important; height:auto !important; overflow:visible; }
    html.theme-modern body.map .mapTileDialog #tileDetails .detailImage { box-sizing:border-box; float:none; width:100%; max-width:319px; height:auto; min-height:218px; margin:0 auto; padding-top:218px; background-position:center top; background-size:contain; background-repeat:no-repeat; }
    html.theme-modern body.map .mapTileDialog #tileDetails #options { position:static !important; width:100% !important; margin:0; }
    html.theme-modern body.map .mapTileDialog #map_details { position:static !important; float:none !important; box-sizing:border-box; width:100% !important; margin:12px 0 0 !important; }
    html.theme-modern body.map .mapTileDialog .content > br { display:none; }
}html.theme-modern body.map #mapContainer #mapCoordEnter button { min-width:54px; min-height:22px; border:1px solid #304a0d; border-radius:3px; background:linear-gradient(#93c344,#48751b) !important; color:#fff !important; }
html.theme-modern body.map #mapContainer #mapCoordEnter button .button-content { color:#fff !important; text-shadow:0 1px #284a0c; }
html.theme-modern body.map .mapTileDialog .iconButton.cancel { width:30px !important; height:30px !important; border:3px ridge #dbbf7e !important; border-radius:0 !important; background:linear-gradient(#82a24e,#385e19) !important; box-shadow:inset 0 0 0 1px #273d16; }
html.theme-modern body.map .mapTileDialog .iconButton.cancel::after { color:#fff; font:bold 23px/22px Arial,sans-serif; }
@media (max-width:700px) {
    html.theme-modern body.map .mapTileDialog .dialog-dragbar { box-sizing:border-box; width:100% !important; }
    html.theme-modern body.map .mapTileDialog .dragbar-inner-mid { width:calc(100% - 20px) !important; }
}
/* Activation forms and status messages use the shared account frame. */
html.theme-modern body.activate #content .activation,
html.theme-modern body.activate #content .no_mail { margin:0 0 18px; line-height:1.7; overflow-wrap:anywhere; }
html.theme-modern body.activate #content .code { margin-bottom:5px; }
html.theme-modern body.activate #content form { margin:14px 0 20px; }
html.theme-modern body.activate #content form button { margin-top:12px; }
html.theme-modern body.activate #content hr { border:0; border-top:1px solid #c7b18a; margin:20px 0; }
html.theme-modern body.activate #content .activation.boxes { width:100%; height:auto; padding:0; background:none; }
html.theme-modern body.activate #content .activation.boxes > :not(.boxes-contents) { display:none; }
html.theme-modern body.activate #content .activation.boxes > .boxes-contents { position:static; padding:0; background:none; }
html.theme-modern body.activate #content .activation table,
html.theme-modern body.activate #content .activation tbody,
html.theme-modern body.activate #content .activation tr,
html.theme-modern body.activate #content .activation th,
html.theme-modern body.activate #content .activation td { display:block; box-sizing:border-box; width:100%; text-align:start; }
html.theme-modern body.activate #content .activation tr { margin-bottom:12px; }
html.theme-modern[lang=fa] body.activate #content :is(h1,h2,h4,button,input) { font-family:Vazirmatn,Tahoma,sans-serif !important; letter-spacing:normal; }
/* First-login welcome uses the same framed content and buttons as the game. */
html.theme-modern .tw-welcome-overlay { position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center; box-sizing:border-box; padding:16px; background:rgba(0,0,0,.58); }
html.theme-modern .tw-welcome-panel { position:relative; box-sizing:border-box; width:min(100%,590px); max-height:calc(100vh - 32px); overflow:auto; padding:7px; border:4px ridge #a88e70; border-radius:7px; background:#b49d86; box-shadow:inset 0 0 0 2px #e6d4b5,0 5px 20px #0009; }
html.theme-modern .tw-welcome-header { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:54px; padding:5px 12px; border:1px solid #88715e; background:#927e6a url(../gpack/modern-reference/img_ltr/hud/content/header.jpg) center / cover; }
html.theme-modern .tw-welcome-header h2 { flex:1; margin:0; color:#fff; font-size:20px; line-height:1.4; text-shadow:1px 1px 2px #574337; }
html.theme-modern .tw-welcome-close { flex:none; box-sizing:border-box; width:32px; height:32px; padding:0; border:3px ridge #dbbf7e; border-radius:0; background:linear-gradient(#82a24e,#385e19); box-shadow:inset 0 0 0 1px #273d16,0 1px 2px #473123; color:#fff; cursor:pointer; font:bold 26px/25px Arial,sans-serif; }
html.theme-modern .tw-welcome-body { min-height:135px; padding:24px; overflow:hidden; background:#faf7ed; color:#513c2d; font-size:14px; line-height:1.9; }
html.theme-modern .tw-welcome-body p { margin:0 0 18px; }
html.theme-modern .tw-welcome-mentor { float:left; width:150px; max-width:38%; height:auto; margin:0 18px 8px 0; }
html.theme-modern[dir=rtl] .tw-welcome-mentor { float:right; margin:0 0 8px 18px; }
html.theme-modern .tw-welcome-first { padding:8px 18px; border:1px solid #385612; border-radius:3px; background:linear-gradient(#a8d45c,#5a8b1a); box-shadow:inset 0 1px #d6ed9b; color:#fff; cursor:pointer; font:inherit; font-weight:bold; }
html.theme-modern .tw-welcome-first:hover,html.theme-modern .tw-welcome-close:hover { filter:brightness(1.12); }
html.theme-modern .tw-welcome-overlay button:disabled { opacity:.65; cursor:wait; }
html.theme-modern .tw-welcome-error { clear:both; padding-top:12px; color:#a32121; }
html.theme-modern .tw-welcome-error[hidden] { display:none; }
@media(max-width:480px) { html.theme-modern .tw-welcome-overlay { padding:10px; } html.theme-modern .tw-welcome-panel { max-height:calc(100vh - 20px); } html.theme-modern .tw-welcome-body { padding:16px; } html.theme-modern .tw-welcome-mentor { width:105px; } html.theme-modern .tw-welcome-header h2 { font-size:17px; } }

/* Room for a nine-digit troop count in every training building. */
html.theme-modern body.build input.troop-training-amount { box-sizing:border-box; width:11ch; min-width:11ch; max-width:100%; padding:3px 4px; direction:ltr; text-align:right; font:13px Arial,Helvetica,sans-serif; font-variant-numeric:tabular-nums; }

/* Market transfer amounts and the hero adventure confirmation. */
html.theme-modern body.build #build.gid17 #send_select input.market-resource-amount { box-sizing:border-box; width:12ch; min-width:12ch; max-width:none; padding:3px 4px; direction:ltr; text-align:right; font:13px Arial,Helvetica,sans-serif; font-variant-numeric:tabular-nums; }
/* Market offers: keep the original controls usable on narrow screens. */
html.theme-modern body.build #build.gid17 .tw-market-table { width:100%; overflow-x:auto; }
html.theme-modern body.build #build.gid17 :is(#range,#sell_overview) { width:100%; min-width:520px; border-collapse:collapse; background:#fff; }
html.theme-modern body.build #build.gid17 :is(#range,#sell_overview) :is(th,td) { padding:6px; border:1px solid #c8c8c8; vertical-align:middle; }
html.theme-modern body.build #build.gid17 :is(#range,#sell_overview) thead :is(th,td) { background:#e7e7e7; color:#333; }
html.theme-modern body.build #build.gid17 :is(#range,#sell_overview) tbody tr:nth-child(even) { background:#f4f4f4; }
html.theme-modern body.build #build.gid17 #sell { width:100%; }
html.theme-modern body.build #build.gid17 #sell :is(th,td) { padding:6px; vertical-align:middle; }
html.theme-modern body.build #build.gid17 #sell input.text { box-sizing:border-box; width:12ch; max-width:100%; direction:ltr; }
html.theme-modern body.build #build.gid17 #sell input[name=d2] { width:4ch; }
html.theme-modern body.build #build.gid17 .traderCount { float:none; width:max-content; max-width:100%; margin:10px 0; }
html.theme-modern body.build #build.gid17 #sell { border-collapse:collapse; background:#fff; }
html.theme-modern body.build #build.gid17 #sell tr:nth-child(even) { background:#f2f0e6; }
html.theme-modern body.build #build.gid17 #sell th { white-space:nowrap; background:#dfd1b4; }
html.theme-modern body.build #build.gid17 #sell select { min-width:65px; }
html.theme-modern body.build #build.gid17 #sell_overview .market-ratio { display:inline-block; min-width:2.5em; padding:2px 5px; border-radius:3px; background:#e4e4e4; text-align:center; direction:ltr; }
html.theme-modern body.build #build.gid17 #sell_overview :is(.val,.tra,.dur) { white-space:nowrap; }
html.theme-modern body.build #build.gid17 #sell_overview .abo a { display:inline-flex; min-width:22px; min-height:22px; align-items:center; justify-content:center; }
html.theme-modern body.statistics .tw-wonder-ranking h4 { margin:12px 0 12px; padding:5px 10px; border-radius:3px; background:#dfede2; color:#243c2c; font-weight:bold; }
html.theme-modern body.statistics .tw-wonder-table-wrap { width:100%; overflow-x:auto; }
html.theme-modern body.statistics #wonder { width:100%; min-width:460px; border-collapse:collapse; background:transparent; }
html.theme-modern body.statistics #wonder :is(th,td) { padding:10px 6px; border:0; border-bottom:1px solid #c8c8c8; text-align:start; vertical-align:middle; background:transparent; }
html.theme-modern body.statistics #wonder thead th { padding-top:4px; padding-bottom:6px; color:#684c3c; font-weight:bold; white-space:nowrap; }
html.theme-modern body.statistics #wonder tbody tr:hover { background:#f8e6c7; }
html.theme-modern body.statistics #wonder .ra { width:30px; white-space:nowrap; }
html.theme-modern body.statistics #wonder .nam { width:40%; }
html.theme-modern body.statistics #wonder .lev { text-align:end; white-space:nowrap; }
html.theme-modern body.statistics #wonder a { color:#71a900; font-weight:bold; text-decoration:none; }
html.theme-modern body.statistics #wonder .coordinates { display:inline-block; white-space:nowrap; }
html.theme-modern body.statistics #wonder .wonder-name { display:block; margin-top:3px; color:#806d5b; overflow-wrap:anywhere; }
html.theme-modern body.statistics .tw-wonder-note { margin:12px 0; color:#746b61; font-size:11px; }
@media(max-width:700px) {
 html.theme-modern body.build #build.gid17 #sell, html.theme-modern body.build #build.gid17 #sell tbody, html.theme-modern body.build #build.gid17 #sell tr { display:block; width:100%; }
 html.theme-modern body.build #build.gid17 #sell tr { display:flex; flex-wrap:wrap; align-items:center; }
 html.theme-modern body.build #build.gid17 #sell th { width:100%; text-align:start; }
 html.theme-modern body.build #build.gid17 #sell td { display:block; }
 html.theme-modern body.build #build.gid17 #sell td.val { width:auto; flex:0 0 auto; }
 html.theme-modern body.build #build.gid17 #sell td.val input.text { width:12ch; min-width:12ch; max-width:none; }
}
html.theme-modern body.a2b .adventure-start { width:100%; box-sizing:border-box; margin:14px auto; border:3px ridge #b59b75; background:#f6eedc; color:#503d2e; }
html.theme-modern body.a2b .adventure-start-image { overflow:hidden; background:#7e8c59; }
html.theme-modern body.a2b .adventure-start-image img { display:block; width:100%; height:auto; max-height:300px; object-fit:cover; }
html.theme-modern body.a2b .adventure-start-content { padding:15px; }
html.theme-modern body.a2b .adventure-start-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 14px; padding:8px 10px; border-bottom:1px solid #d5c4a7; }
html.theme-modern body.a2b .adventure-start-row:nth-of-type(odd) { background:#ede2cd; }
html.theme-modern body.a2b .adventure-start-row strong { overflow-wrap:anywhere; }
html.theme-modern body.a2b .adventure-start-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding-top:16px; }
html.theme-modern body.a2b .adventure-start-back { color:#58851d; font-weight:bold; }
@media (max-width:700px) {
 html.theme-modern body.build #build.gid17 #send_select { width:100%; table-layout:auto; }
 html.theme-modern body.build #build.gid17 #send_select td { padding-inline:2px; }
 html.theme-modern body.build #build.gid17 #send_select input.market-resource-amount { width:11ch; min-width:11ch; font-size:12px; }
 html.theme-modern body.a2b .adventure-start-content { padding:10px; }
}

/* Research and troop-training cards on narrow screens. */
@media (max-width:700px) {
 html.theme-modern body.build #build:is(.gid22,.gid13) .researches { box-sizing:border-box; width:100%; padding:12px 8px; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .research,
 html.theme-modern body.build #build .trainUnits .action { display:flex; align-items:flex-start; flex-wrap:wrap; box-sizing:border-box; gap:10px; width:100%; min-width:0; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .research > .bigUnitSection,
 html.theme-modern body.build #build .trainUnits .action > .bigUnitSection { float:none; flex:0 0 102px; box-sizing:border-box; width:102px; height:102px; margin:0; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .research img.unitSection,
 html.theme-modern body.build #build .trainUnits .action img.unitSection { display:block; width:100px; height:100px; background-size:contain; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .research > .information,
 html.theme-modern body.build #build .trainUnits .action > .details { float:none; flex:1 1 145px; box-sizing:border-box; width:auto; min-width:0; max-width:100%; margin:0; padding-top:0; overflow-wrap:anywhere; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .information .costs { margin:8px 0; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .showCosts,
 html.theme-modern body.build #build .trainUnits .action .showCosts { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; width:auto; min-width:0; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .showCosts :is(.resources,.clocks,.npcs),
 html.theme-modern body.build #build .trainUnits .action .showCosts :is(.resources,.clocks,.npcs) { float:none; margin:0; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .showCosts > .clear,
 html.theme-modern body.build #build .trainUnits .action .showCosts > .clear { display:none; }
 html.theme-modern body.build #build:is(.gid22,.gid13) .contractLink { max-width:100%; overflow-wrap:anywhere; }
}

/* Round village quick links and Travian Plus information dialog. */
html.theme-modern #sidebarBoxActiveVillage a.layoutButton { border-radius:50%; border:2px solid #4e321c; background:radial-gradient(circle at 50% 40%, #ffdf88 0%,#dba947 53%,#a9722f 56%,#f3d485 65%,#6b431f 70%,#b99658 76%,#4b301b 100%); box-shadow:inset 0 1px 2px #ffedb2,0 1px 2px #392818; }
html.theme-modern #sidebarBoxActiveVillage a.layoutButton:hover { filter:brightness(1.12); }
html.theme-modern #sidebarBoxActiveVillage a.layoutButton.disabled { filter:saturate(.6) brightness(.8); opacity:1; }
html.theme-modern #sidebarBoxActiveVillage a.settings { border-radius:50%; border:2px solid #54391f; background:radial-gradient(circle,#eac469 42%,#a16c2d 48%,#efd083 60%,#604122 70%); box-shadow:0 1px 2px #382514; }
.twQuickPlus[hidden] { display:none !important; }
.twQuickPlus { position:fixed; inset:0; z-index:999999; display:flex; align-items:center; justify-content:center; padding:12px; background:rgba(0,0,0,.72); box-sizing:border-box; }
.twQuickPlus__panel { width:min(620px,100%); max-height:calc(100dvh - 24px); display:flex; flex-direction:column; box-sizing:border-box; border:7px ridge #b7a48c; border-radius:8px; background:#e9dec8; box-shadow:0 2px 8px #000; color:#604c41; font:13px/1.3 Arial,Tahoma,sans-serif; }
.twQuickPlus__panel header { display:flex; align-items:center; justify-content:space-between; flex:none; min-height:48px; padding:0 16px; background:linear-gradient(#bba995,#988574); border-bottom:3px solid #806e58; }
.twQuickPlus__panel h2 { margin:0; color:#fff8e9; text-shadow:1px 1px #594435; font:bold 22px Georgia,serif; }
.twQuickPlus__close { width:32px;height:32px;border:3px ridge #c8aa6f; background:linear-gradient(#88b644,#315c11); color:white; font:bold 26px/22px Arial; cursor:pointer; }
.twQuickPlus__body { overflow:auto; padding:10px; overscroll-behavior:contain; }
.twQuickPlus__feature { display:flex; align-items:center; gap:12px; min-height:56px; padding:5px; margin-bottom:6px; border:1px solid #c2b5a1; background:#f8f4e9; box-shadow:0 2px 3px #c1b29b; }
.twQuickPlus__feature strong { display:block; margin-bottom:3px; }
.twQuickPlus__art { flex:0 0 80px; height:56px; background:url(plusPopupIconsV4.png) no-repeat 0 0; }
.twQuickPlus__art--direct {background-position:0 -336px}.twQuickPlus__art--attack {background-position:0 -224px}.twQuickPlus__art--queue {background-position:0 -168px}.twQuickPlus__art--links {background-position:0 -280px}.twQuickPlus__art--villages {background-position:0 -112px}.twQuickPlus__art--map {background-position:0 -56px}.twQuickPlus__art--trade {background-position:0 0}
.twQuickPlus__intro { margin:10px 4px; line-height:1.6; }.twQuickPlus__intro strong {display:block;text-align:center}
.twQuickPlus__footer { display:flex; justify-content:flex-end; padding:12px 4px 4px; }.twQuickPlus__footer a { display:inline-block; padding:8px 26px; border:3px ridge #bd9a50; background:linear-gradient(#ffe884,#d79e0a); color:#422600!important; text-decoration:none; font-weight:bold; text-align:center; }
html[lang=fa] .twQuickPlus__panel {font-family:Vazirmatn,Tahoma,sans-serif;}
@media(max-width:480px){.twQuickPlus {padding:6px}.twQuickPlus__panel {max-height:calc(100dvh - 12px)}.twQuickPlus__panel header {min-height:42px}.twQuickPlus__body {padding:7px}.twQuickPlus__feature {gap:7px}.twQuickPlus__art {flex-basis:80px}.twQuickPlus__footer a {width:100%}}

/* Profile editor: reference layout, with the existing profile fields retained. */
html.theme-modern[lang=en] body,html.theme-modern[lang=en] body :is(input,select,textarea,button),html.theme-modern[lang=en] body :is(.contentNavi,.tabNavi,.subNavi) :is(a,span) {font-family:Arial,Helvetica,Verdana,sans-serif!important}
html.theme-modern[lang=en] body :is(h1.titleInHeader,.modern-info-sidebar .modern-side-card h2,#sidebarBoxVillageList .boxTitle,#sidebarBoxQuestmaster .boxTitle,#sidebarBoxActiveVillage .playerName,#sidebarBoxActiveVillage input.villageInput) {font-family:"Noto Serif",Georgia,serif!important}
html.theme-modern body.spieler .tw-profile-edit {clear:both; padding-top:8px; color:#5b463b;}
html.theme-modern body.spieler .tw-profile-field {margin:0 0 17px;}
html.theme-modern body.spieler .tw-profile-field h3 {margin:0 0 10px;padding:0;background:none;border:0;font:bold 16px/1.3 Arial,Helvetica,Verdana,sans-serif;color:#5e463a;}
html.theme-modern[lang=fa] body.spieler .tw-profile-field h3 {font-family:Vazirmatn,Tahoma,sans-serif;}
html.theme-modern body.spieler .tw-profile-field input[type=text],html.theme-modern body.spieler .tw-profile-field select {box-sizing:border-box;width:200px;max-width:100%;height:40px;padding:7px 10px;border:1px solid #9d8d7c;border-radius:0;background:#fff;color:#4e4035;font-size:13px;}
html.theme-modern body.spieler .tw-profile-genders {display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;}
html.theme-modern body.spieler .tw-profile-genders label {display:flex;align-items:center;gap:4px;white-space:nowrap;}
html.theme-modern body.spieler .tw-profile-genders input {width:19px;height:19px;margin:0;accent-color:#79a72c;}
html.theme-modern body.spieler .tw-profile-birthday {display:flex;gap:6px;flex-wrap:wrap;}
html.theme-modern body.spieler .tw-profile-birthday input[type=text] {width:76px;}
html.theme-modern body.spieler .tw-profile-birthday select {width:140px;}
html.theme-modern body.spieler .tw-profile-toolbar {display:flex;gap:3px;margin-bottom:5px;}
html.theme-modern body.spieler .tw-profile-toolbar button {box-sizing:border-box;width:27px;height:27px;padding:0;border:1px solid #b8aa97;border-radius:2px;background:linear-gradient(#fff,#dfdbd3);color:#5e463a;cursor:pointer;font-size:14px;}
html.theme-modern body.spieler .tw-profile-descriptions {display:grid;grid-template-columns:1fr 1fr;gap:6px;}
html.theme-modern body.spieler .tw-profile-descriptions textarea.editDescription {float:none!important;box-sizing:border-box;display:block;width:100%!important;min-width:0;height:245px;margin:0!important;padding:10px;border:1px solid #a29483;border-radius:0;background:#fff;color:#4e4035;text-align:start!important;resize:vertical;font-size:13px;}
html.theme-modern body.spieler #villages {width:100%;table-layout:auto;}
html.theme-modern body.spieler #villages input.text {box-sizing:border-box;max-width:100%;}
html.theme-modern body.spieler .switchWrap {margin:12px 0;}
@media(max-width:520px){html.theme-modern body.spieler .tw-profile-descriptions {grid-template-columns:1fr;}html.theme-modern body.spieler .tw-profile-descriptions textarea.editDescription {height:165px;}html.theme-modern body.spieler #villages {display:block;overflow-x:auto;}html.theme-modern body.spieler .tw-profile-birthday select {width:120px;}}

/* Info box notices and world events. */
html.theme-modern .modern-info-card .tw-info-notice {position:relative;clear:both;margin:10px 0 0;padding:10px 0 0;border-top:1px solid rgba(119,94,66,.25);color:#5d493c;font:13px/1.35 Arial,Helvetica,Verdana,sans-serif;text-align:start;}
html.theme-modern[lang=fa] .modern-info-card .tw-info-notice {font-family:Vazirmatn,Tahoma,sans-serif;}
html.theme-modern .modern-info-card .tw-info-notice p {margin:0 0 7px;}
html.theme-modern .modern-info-card .tw-info-notice p:last-child {margin-bottom:0;}
html.theme-modern .tw-info-dismiss {position:absolute;inset-inline-end:0;top:5px;border:0;background:transparent;color:#c5160a;font:bold 18px Arial;cursor:pointer;}
html.theme-modern .tw-plus-expired p {padding-inline-end:18px;}
html.theme-modern .tw-info-action {box-sizing:border-box;display:inline-block;min-width:78px;margin:0 0 6px;padding:4px 12px;border:2px ridge #c9aa6e;border-radius:4px;color:#fff!important;font:bold 12px Arial,Tahoma,sans-serif;text-align:center;text-decoration:none!important;cursor:pointer;}
html.theme-modern .tw-info-action:disabled {opacity:.6;cursor:wait;}
html.theme-modern .modern-info-card .tw-info-error {color:#aa251a;}
html.theme-modern .tw-info-world-timers {text-align:center;line-height:1.7;}
html.theme-modern .tw-info-world-timers .list {margin:0!important;}
html.theme-modern .tw-info-notice[hidden],html.theme-modern .tw-info-error[hidden] {display:none!important;}

/* Reference-style Info Box expansion control. */
html.theme-modern #sidebarBoxInfobox .sbx-toggle {position:relative;width:100px;height:30px;margin:6px auto -30px;background:url(../gpack/modern-reference/img_ltr/hud/sidebar/toggle.png) no-repeat center;}
html.theme-modern #sidebarBoxInfobox .sbx-toggle-button {position:absolute;top:1px;left:38px;display:grid;place-items:center;box-sizing:border-box;width:24px;height:21px;margin:0;padding:0;border:0;border-radius:0;background:transparent;cursor:pointer;}
html.theme-modern #sidebarBoxInfobox .sbx-toggle-button svg {display:block;width:18px;height:11px;fill:#ddf1bd;filter:drop-shadow(0 1px 0 #356016);}
html.theme-modern #sidebarBoxInfobox.tw-info-collapsed .sbx-toggle-button svg {transform:scaleY(-1);}
html.theme-modern #sidebarBoxInfobox.tw-info-collapsed > :is(.modern-info-line,.sbx-gold,.tw-info-notice):not(.tw-info-preview) {display:none!important;}
html.theme-modern #sidebarBoxInfobox .sbx-toggle-button:focus-visible {outline:2px solid #e6ce8c;outline-offset:2px;}

/* Give the mobile village centre a larger touch target and more room above it. */
@media (max-width:700px) {
 html.theme-modern body.village2 #wrapper { background-position:center top, center 66px !important; }
 html.theme-modern body.village2 #contentOuterContainer.modern-village-main { top:var(--mobile-center-offset, 40px) !important; }
}

/* Use the site Persian font on shared game buttons. */
html.theme-modern[lang=fa] body button:has(> .button-container > .button-contents),
html.theme-modern[lang=fa] body button.textButtonV1,
html.theme-modern[lang=fa] body button.textButtonV2 { font-family:Vazirmatn,Tahoma,sans-serif !important; }

/* Override the shared button font shorthand for Persian labels. */
html.theme-modern[lang=fa] body button:has(> .button-container > .button-contents):not(.gold):not(.goldButton),
html.theme-modern[lang=fa] body button.textButtonV1.green {font-family:Vazirmatn,Tahoma,sans-serif !important;}

/* Keep the construction queue centred in both writing directions. */
html.theme-modern body.village2 #contentOuterContainer.modern-village-main .buildingList {right:auto !important;}
@media (max-width:700px) {
 html.theme-modern body.village2 > .buildingList.tw-mobile-building-list {position:fixed !important;z-index:95;left:50% !important;right:auto !important;top:auto !important;bottom:calc(54px + 10px + env(safe-area-inset-bottom, 0px)) !important;transform:translateX(-50%);box-sizing:border-box;width:min(397px, calc(100vw - 24px)) !important;max-height:min(35vh, 240px);overflow:auto;margin:0 !important;padding:8px 10px;border:1px solid #bbb6a3;border-radius:4px;background:rgba(255,255,251,.97);box-shadow:0 2px 5px rgba(0,0,0,.3);color:#333;font:13px/1.4 Arial,Helvetica,sans-serif;pointer-events:auto;}
 html.theme-modern[dir=rtl] body.village2 > .buildingList.tw-mobile-building-list {direction:rtl;font-family:Vazirmatn,Tahoma,sans-serif;}
 html.theme-modern body.village2 > .buildingList.tw-mobile-building-list li {flex-wrap:wrap;}
 html.theme-modern body.village2 > .buildingList.tw-mobile-building-list > div:not(.boxes-contents) {display:none;}
 html.theme-modern body.village2 > .buildingList.tw-mobile-building-list .boxes-contents {position:static;padding:0;background:none;}
 html.theme-modern body.village2 > .buildingList.tw-mobile-building-list table {width:100%;background:transparent;}
}
@media (min-width:451px) and (max-width:700px) {html.theme-modern body.village2 > .buildingList.tw-mobile-building-list {bottom:calc(62px + 10px + env(safe-area-inset-bottom, 0px)) !important;}}

/* Consistent, direction-aware building descriptions. */
html.theme-modern body.build #build .resource-build-description {clear:both;display:block;width:100%;box-sizing:border-box;margin:8px 0;color:#333;}
html.theme-modern body.build #build .resource-build-description summary {display:list-item;box-sizing:border-box;width:100%;padding:6px 12px;border:1px solid #a1bc79;background:linear-gradient(to right,#cbe0ac,#f9fbf4);color:#4b5f2b;font:bold 13px/1.6 Arial,Helvetica,sans-serif;text-align:start;cursor:pointer;list-style-position:inside;}
html.theme-modern[dir=rtl] body.build #build .resource-build-description summary {background:linear-gradient(to left,#cbe0ac,#f9fbf4);}
html.theme-modern[lang=fa] body.build #build .resource-build-description summary,html.theme-modern[lang=fa] body.build #build .resource-build-description > div {font-family:Vazirmatn,Tahoma,sans-serif;}
html.theme-modern body.build #build .resource-build-description > div {padding:14px 4px;line-height:1.7;overflow-wrap:anywhere;}

/* Persian type in building values and Info Box actions. */
html.theme-modern[lang=fa] body.build #build[class*=gid] table#build_value :is(th,td,b,span),
html.theme-modern[lang=fa] body .modern-info-card a.tw-info-action {font-family:Vazirmatn,Tahoma,sans-serif !important;}

/* Keep hero actions above the portrait and health/experience hit areas. */
html.theme-modern .modern-header-hero .modern-hero-shortcut { z-index: 5; width: 27px; height: 27px; border: 1px solid #382514; box-shadow: inset 0 0 0 2px #c9a66c, 0 1px 2px rgba(0,0,0,.6); }
html.theme-modern .modern-header-hero .modern-hero-adventure { right: 13px; top: -1px; background: linear-gradient(#91be42, #4c7318); }
html.theme-modern .modern-header-hero .modern-hero-auction { right: -1px; top: 27px; background: linear-gradient(#ad9870, #665039); }
html.theme-modern .modern-hero-adventure-count { color: #fff; font: bold 13px/1 Arial, sans-serif; text-shadow: 0 1px 2px #27370e; }

/* Building content and hero mansion tables. */
html.theme-modern body.build .modern-inner-page > #contentOuterContainer #content.build { padding-bottom: 26px; }
html.theme-modern body.build #build.gid37 h4 { margin: 20px 0 10px; padding: 5px 10px; border-radius: 3px; background: #dfede2; color: #303d30; }
html.theme-modern body.build #build.gid37 .tw-oases-table { max-width: 100%; overflow-x: auto; }
html.theme-modern body.build #build.gid37 :is(#oasesOwned,#oasesSurround) { width: 100%; min-width: 480px; margin: 0; border-collapse: collapse; background: #fff; table-layout: auto; }
html.theme-modern body.build #build.gid37 :is(#oasesOwned,#oasesSurround) :is(th,td) { padding: 6px; border: 1px solid #ccc; text-align: center; vertical-align: middle; }
html.theme-modern body.build #build.gid37 :is(#oasesOwned,#oasesSurround) thead td { background: #fafafa; color: #51463f; font-weight: normal; }
html.theme-modern body.build #build.gid37 :is(#oasesOwned,#oasesSurround) tbody tr:nth-child(even) td { background: #f2f2f2; }
html.theme-modern body.build #build.gid37 .nextOases { padding: 5px 8px; color: #777; }
html.theme-modern body.build #build.gid37 .res span { display: inline-block; white-space: nowrap; margin-inline: 2px; }
html.theme-modern[lang=fa] body.hero_adventure #heroAdventure :is(.heroState,.heroState div,.heroState a,.adventureList,.adventureList th,.adventureList td),
html.theme-modern[lang=fa] body.reports #content :is(.adventure-report-meta,.adventure-report-subject,.adventure-report-time,.adventure-report-banner h2,.adventure-report-details,.adventure-report-details th,.adventure-report-details td) { font-family: Vazirmatn,Tahoma,sans-serif !important; line-height: 1.7; }

html.theme-modern[lang=fa] body.reports #content h1.titleInHeader,
html.theme-modern[lang=fa] body.hero_adventure #heroAdventure a.textButtonV2.buttonFramed.rectangle.withText.green > div > div { font-family: Vazirmatn,Tahoma,sans-serif !important; }

/* Shared appearance for rectangular gold action buttons. */
html.theme-modern :is(a.textButtonV1.gold,button.textButtonV1.gold,a.tw-info-action.gold) { display:inline-flex; box-sizing:border-box; align-items:center; justify-content:center; min-height:27px; height:auto; padding:4px 20px; border:1px solid #82631d; border-radius:5px; background:linear-gradient(#fdf5cb,#e6ce64); color:#5a4408 !important; font-weight:700; font-size:12px; line-height:17px; text-align:center; text-decoration:none !important; text-shadow:0 1px 0 #fff5cf; cursor:pointer; }
html.theme-modern :is(a.textButtonV1.gold,button.textButtonV1.gold,a.tw-info-action.gold):hover { filter:brightness(1.07); }
html.theme-modern[lang=fa] :is(a.textButtonV1.gold,button.textButtonV1.gold,a.tw-info-action.gold) { font-family:Vazirmatn,Tahoma,sans-serif !important; }

/* Mirror framed close buttons for right-to-left pages. */
html.theme-modern .tw-page-close { top:26px; right:47px; left:auto; }
html.theme-modern .tw-task-close { top:-41px; right:36px; left:auto; }
html.theme-modern[dir=rtl] body :is(.building-close,.messages-close,.profile-close,.tw-page-close) { right:auto; left:47px; }
html.theme-modern[dir=rtl] .tw-task-close { right:auto; left:36px; }

/* Mobile village centre: enlarge hit areas without changing the artwork. */
@media (max-width:700px) and (pointer:coarse) {
 html.theme-modern body.village2 #village_map .buildingSlot:not(.a40) .buildingShape path { stroke:transparent; stroke-width:16px; pointer-events:all; }
 html.theme-modern body.village2 #village_map .buildingSlot a.level::before { content:""; position:absolute; width:60px; height:60px; left:50%; top:50%; transform:translate(-50%,-50%); border-radius:50%; }
}

/* War simulator tables and mobile layout. */
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) { box-sizing:border-box; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) table.fill_in { width:100%; border-collapse:collapse; background:#fff; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) table.fill_in > tbody > tr > th { padding:6px; border:1px solid #c9c9c9; background:#e5e5e5; color:#413c38; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.details { padding:0; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.details > table { width:100%; border-collapse:collapse; table-layout:auto; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.details > table td { padding:4px; border:1px solid #d0d0d0; background:#fff; vertical-align:middle; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.details > table tr:nth-child(even) td { background:#f1f1f1; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.value input { box-sizing:border-box; width:12ch; max-width:100%; direction:ltr; text-align:left; }
html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) td.research input { box-sizing:border-box; width:4ch; max-width:100%; direction:ltr; }
@media (max-width:700px) {
 html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) { float:none !important; clear:both; display:block; width:100% !important; max-width:100%; margin:12px 0; }
 html.theme-modern body.warsim #content.warsim #select { clear:both; }
 html.theme-modern body.warsim #content.warsim #select .fighterType, html.theme-modern body.warsim #content.warsim #select .choice { float:none; width:auto; position:static; }
 html.theme-modern body.warsim #content.warsim :is(#attacker,#defender) .border { float:none; width:100%; max-width:100%; margin:0 0 10px; }
}

/* Keep the task close control outside the mobile scrolling content. */
html.theme-modern body.tasks .tw-task-close { top:26px; right:47px; left:auto; z-index:5; }
html.theme-modern[dir=rtl] body.tasks .tw-task-close { right:auto; left:47px; }
/* Highlight the current player, their villages and their alliance in rankings. */
html.theme-modern body.statistics #content :is(table.row_table_data,table.top10,#wonder) tbody tr.own > td { background:#e7f0ca; }

/* Task title belongs to the frame, outside the mobile scroll area. */
html.theme-modern body.tasks #contentOuterContainer > h1.titleInHeader { position:absolute; z-index:4; top:28px; left:35px; right:auto; max-width:calc(100% - 115px); margin:0; color:#fff8ed; font:bold 18px/26px Arial,Tahoma,sans-serif; text-shadow:0 1px 2px #49372a; }
html.theme-modern[dir=rtl] body.tasks #contentOuterContainer > h1.titleInHeader { left:auto; right:35px; }
html.theme-modern[lang=fa] body.tasks #contentOuterContainer > h1.titleInHeader { font-family:Vazirmatn,Tahoma,sans-serif; }

/* Support page */
html.theme-modern .tw-support-guest #contentOuterContainer { width:min(100%,560px) !important; }
html.theme-modern .tw-support-guest .tw-support-intro { margin:0 0 20px; color:#59483b; font:14px/1.9 Arial,Tahoma,sans-serif; }
html.theme-modern .tw-support-guest .tw-support-action { display:inline-block; padding:8px 24px; border:1px solid #49691d; border-radius:3px; background:linear-gradient(#a7cc57,#5c8d1e); color:#fff; font-weight:bold; text-decoration:none; }
html.theme-modern[lang=fa] .tw-support-guest .tw-support-intro,html.theme-modern[lang=fa] .tw-support-guest #content h1,html.theme-modern[lang=fa] .tw-support-guest .tw-support-action,html.theme-modern[lang=fa] .tw-support-cards { font-family:Vazirmatn,Tahoma,sans-serif !important; }
html.theme-modern .tw-support-cards { display:grid; gap:12px; margin:12px 0 24px; }
html.theme-modern .tw-support-card { display:block; padding:15px 18px; border:1px solid #c5b28c; border-radius:3px; background:#f7efdd; color:#554436; text-decoration:none; line-height:1.7; }
html.theme-modern .tw-support-card:hover { background:#edf2d8; border-color:#9db76b; }
html.theme-modern .tw-support-card strong { display:block; color:#658d25; font-size:15px; }
html.theme-modern .tw-support-card span { display:block; margin-top:4px; font-size:13px; }

/* Persian statistics title and navigation use the game font. */
html.theme-modern[lang=fa] body.statistics #content :is(h1.titleInHeader,.contentNavi a,.contentNavi .tabItem) { font-family:Vazirmatn,Tahoma,sans-serif !important; letter-spacing:normal; }

/* Rally point farm list and target forms. */
html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) { max-width:100%; margin:16px 0 24px; }
html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) .boxes { box-sizing:border-box; width:100%; max-width:100%; }
html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) table { width:100%; }
html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) th { width:30%; padding:8px; text-align:start; }
html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) td { padding:8px; }
html.theme-modern body.build #content #raidListSlot :is(select,input) { box-sizing:border-box; max-width:100%; }
html.theme-modern body.build #content #raidListSlot .coordinatesInput { display:flex; flex-wrap:nowrap; gap:8px 16px; direction:ltr; float:none; width:auto; height:auto; }
html.theme-modern body.build #content #raidListSlot .coordinatesInput :is(.xCoord,.yCoord) { display:flex; align-items:center; gap:4px; float:none; width:auto; }
html.theme-modern body.build #content #raidListSlot .coordinatesInput > .clear { display:none; }
html.theme-modern body.build #content #raidListSlot .coordinatesInput :is(label,input) { float:none; }
html.theme-modern body.build #content #raidListSlot .coordinatesInput input { width:58px; }
html.theme-modern body.build #content #raidListSlot .targetSelect { display:flex; flex-wrap:wrap; align-items:center; gap:4px; float:none; width:auto; height:auto; margin-top:8px; }
html.theme-modern body.build #content #raidListSlot .troops { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:8px 12px; margin:14px 0; }
html.theme-modern body.build #content #raidListSlot .troops .troopGroup { display:flex; align-items:center; gap:5px; float:none; width:auto; min-width:0; margin:0; }
html.theme-modern body.build #content #raidListSlot .troops .troopGroup :is(label,input) { float:none; }
html.theme-modern body.build #content #raidListSlot .troops .troopGroup input { flex:1; width:100%; min-width:0; }
html.theme-modern body.build #content #raidListSlot .troops > .clear { display:none; }
html.theme-modern[lang=fa] body.build #content :is(#raidListSlot,#raidListCreate,#raidList,.rally-tabs) { font-family:Vazirmatn,Tahoma,sans-serif; }
html.theme-modern[lang=fa] body.build #content :is(#raidListSlot,#raidListCreate,#raidList,.rally-tabs) :is(input,select,button,a,th,td,.tabItem) { font-family:Vazirmatn,Tahoma,sans-serif !important; }
@media (max-width:700px) {
    html.theme-modern body.build #content #raidList .listContent .detail { max-width:100%; overflow-x:auto; }
    html.theme-modern body.build #content #raidList table.list { min-width:620px; }
    html.theme-modern body.build #content :is(#raidListSlot,#raidListCreate) th { width:34%; }
}

html.theme-modern .modern-village-sidebar #sidebarBoxActiveVillage { display:block; }
html.theme-modern .modern-village-sidebar #side_info { position:relative !important; inset:auto !important; float:none !important; width:300px !important; margin:0 !important; }
@media (min-width:701px) {
    html.theme-modern .modern-inner-page { display:flow-root; }
    html.theme-modern body .modern-inner-page > .modern-info-sidebar,
    html.theme-modern body.village2 .modern-info-sidebar { left:calc(50% - 672.5px); right:auto; top:32px; }
    html.theme-modern body .modern-inner-page > .modern-village-sidebar,
    html.theme-modern body.village2 .modern-village-sidebar { left:calc(50% + 372.5px); right:auto; top:32px; }
}
