/* MadWars Classic / Forged. Original interface; legacy themes stay selectable. */
.forged-navigation,.forged-ranking-heading,.forged-game-caption,.brand-crest{display:none}
.forged-dialog{box-sizing:border-box;width:min(680px,calc(100% - 28px));max-height:88svh;overflow:auto;padding:40px;border:1px solid #84603c;background:radial-gradient(ellipse at 100% 0,#3b282126,transparent 65%),#151313;color:#bcb4a7;font:14px/1.7 Arial,sans-serif;box-shadow:0 40px 140px #000c}
.forged-dialog::backdrop{background:#090708d9;backdrop-filter:blur(7px)}
.forged-dialog h2{font:normal 38px/1.2 Georgia,serif;color:#eee2cb;margin:12px 0}
.forged-dialog h3{font:normal 21px/1.35 Georgia,serif;color:#e1c390;margin:0 0 8px}
.forged-dialog h3 small{font:12px Arial;color:#b7a17a;margin-left:8px}
.forged-dialog a,.forged-dialog button:not(.dialog-close){color:#dfbf83}
.forged-dialog a:focus-visible,.forged-dialog button:focus-visible{outline:2px solid #ebc381;outline-offset:4px}
.dialog-close{position:absolute;right:15px;top:8px;font:28px Arial;background:none;border:0;color:#d4b98e;cursor:pointer;padding:4px 8px}
.dialog-intro{color:#a39a8d;margin-bottom:30px}
.start-steps{list-style:none;padding:0;margin:25px 0}
.start-steps li{display:grid;grid-template-columns:38px 1fr;gap:15px;border-top:1px solid #89745038;padding:23px 0}
.start-steps li>span{font:24px Georgia;color:#846345}
.start-steps p,.download-card p{margin:5px 0 12px}
.start-steps button{padding:0;background:none;border:0;font:inherit;cursor:pointer;text-align:left}
.download-card{padding:24px 0;border-top:1px solid #89745038}
.download-tag{display:block;color:#a78a61;font:9px Arial;letter-spacing:1.8px;margin-bottom:12px}
.download-card .forged-primary{display:inline-flex;gap:25px;align-items:center;padding:11px 17px;text-decoration:none;border:1px solid #bb8d50;background:linear-gradient(#713326,#4e211c);color:#ffe7bd;font-weight:bold;box-shadow:inset 0 1px #e6ba6e29}
.checksum-link{display:inline-block;margin-left:15px;font-size:11px}
.download-note{font-size:12px;line-height:1.8;color:#9d968b}
.download-faq{border-block:1px solid #89745038;padding:16px 0;margin-bottom:20px}
.download-faq summary{cursor:pointer;color:#decaab}
.download-faq p{font-size:13px;margin-bottom:0}
@media(max-width:800px){body[data-theme=modern] .realm-tools>a.realm-wordmark{min-width:194px;width:194px}}
@media(max-width:360px){body[data-theme=modern] .realm-tools>a.realm-wordmark{min-width:168px;width:168px;font-size:24px;padding-left:37px}body[data-theme=modern] .realm-tools>a.realm-wordmark span{font-size:18px}}

body[data-theme=modern]{--forged-bg:#100f0f;--forged-panel:#191717;--forged-gold:#c8a56c;--forged-line:#b5925733;--forged-text:#c0b9af;background:var(--forged-bg);color:var(--forged-text);font:14px/1.6 Arial,sans-serif}
body[data-theme=modern] .page-frame{background:radial-gradient(ellipse at 15% 50%,#3d24121c,transparent 55%),#100f0f;padding:0;min-height:100svh}
body[data-theme=modern] a{color:#ddbe88}
body[data-theme=modern] button{cursor:pointer}
body[data-theme=modern] :is(button,a,input,select):focus-visible{outline:2px solid #e8be78;outline-offset:4px}
body[data-theme=modern] .realm-tools{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:22px;width:min(1240px,calc(100% - 64px));max-width:none;min-height:90px;height:auto;margin:auto;padding:18px 0;border-bottom:1px solid var(--forged-line);background:none}
body[data-theme=modern] .realm-wordmark{position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;gap:0;color:#e8c88c;font:32px/1 Georgia,serif;text-decoration:none;letter-spacing:1px;padding-left:49px;width:166px;flex-shrink:0}
body[data-theme=modern] .realm-wordmark span{font:24px/1 Georgia,serif;letter-spacing:1px}
body[data-theme=modern] .realm-wordmark small{display:block;width:100%;font:8px/1 Arial;letter-spacing:6px;color:#a38965;margin-top:6px}
body[data-theme=modern] .brand-crest{position:absolute;display:block;left:0;top:0;width:35px;height:42px}
body[data-theme=modern] .realm-tools>.realm-wordmark{display:block;white-space:nowrap;min-width:210px}
body[data-theme=modern] .forged-navigation{display:flex;align-items:center;gap:22px;margin-right:auto}
body[data-theme=modern] .forged-navigation a,body[data-theme=modern] .forged-navigation button{padding:8px 0;background:none;border:0;font:12px Arial;color:#c2b8a8;text-decoration:none}
body[data-theme=modern] .forged-navigation a:hover,body[data-theme=modern] .forged-navigation button:hover{color:#f0d39c}
body[data-theme=modern] .theme-switch{order:0;width:auto;gap:0;border:1px solid var(--forged-line);padding:3px}
body[data-theme=modern] .theme-switch button{background:none;border:0;padding:7px 8px;font:10px Arial;color:#9f9586}
body[data-theme=modern] .theme-switch button[aria-pressed=true]{background:#3b3024;color:#f1d6a0;border:0}
body[data-theme=modern] .realm-download{font:11px Arial;border:0;padding:10px 0;white-space:nowrap;color:#d6bc8e}
body[data-theme=modern] #open-registration{background:linear-gradient(#423424,#30271f);border:1px solid #8d6a3e;color:#e9c994;padding:11px 14px;font:11px Arial}

body[data-theme=modern] .realm-hero,body[data-theme=modern][data-game] .realm-hero{display:block;position:relative;width:100%;max-width:1600px;margin:0 auto;min-height:490px;overflow:hidden;filter:none;background:linear-gradient(90deg,#100f0ff2 0%,#100f0fba 28%,#100f0f08 70%),linear-gradient(0deg,#100f0f 0%,transparent 35%),url('madwars-citadel.jpg') 65% 45%/cover no-repeat}
body[data-theme=modern] .hero-copy{box-sizing:border-box;position:relative;z-index:1;width:min(1240px,calc(100% - 64px));margin:auto;padding:58px 0 85px;max-width:none}
body[data-theme=modern] .hero-kicker{font:9px/1.6 Arial;letter-spacing:2.5px;color:#b89b6c;margin:0 0 18px}
body[data-theme=modern] .hero-kicker span{font-size:8px;margin-right:8px;color:#b66138}
body[data-theme=modern] .hero-copy h1{font:normal clamp(44px,4.9vw,68px)/1.06 Georgia,serif;letter-spacing:-1.5px;color:#f1e9d8;margin:20px 0 23px;text-shadow:0 3px 25px #0008}
body[data-theme=modern] .hero-copy h1 em{font-style:normal;color:#d2ad73}
body[data-theme=modern] .hero-description{font:14px/1.9 Arial;color:#c0b6a6;max-width:360px;margin:0 0 25px}
body[data-theme=modern] .hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:22px}
body[data-theme=modern] .forged-primary{display:inline-flex;align-items:center;justify-content:space-between;gap:32px;border:1px solid #a77b43;background:linear-gradient(115deg,#833c2b,#54231d);padding:14px 23px;color:#ffe5b6;font:bold 13px Arial;text-decoration:none;box-shadow:inset 0 0 0 3px #2e151a38,inset 0 1px #ffe0a526,0 8px 25px #0004}
body[data-theme=modern] .forged-primary:hover{background:linear-gradient(115deg,#974832,#6c3024);border-color:#d5a867}
body[data-theme=modern] .forged-secondary{font:12px Arial;text-decoration:none;color:#e2cda9}
body[data-theme=modern] .forged-secondary span{margin-left:9px;color:#ad8a56}
body[data-theme=modern] .hero-account{margin-top:18px;color:#958b7d;font:11px/1.7 Arial}
body[data-theme=modern] #hero-register{background:none;border:0;border-bottom:1px solid #8a714740;padding:0;margin:0 0 0 4px;font:11px/1.7 Arial;color:#c5ab7c}
body[data-theme=modern] .hero-bottom{display:flex;position:absolute;bottom:20px;left:max(32px,calc((100% - 1240px)/2));right:max(32px,calc((100% - 1240px)/2));gap:20px;justify-content:space-between;color:#a58c66;font:8px Arial;letter-spacing:2px}

body[data-theme=modern] .realm-services{box-sizing:border-box;width:min(1240px,calc(100% - 64px));max-width:none;margin:0 auto 47px;padding:16px 22px;background:linear-gradient(100deg,#242019,#181717);border:1px solid var(--forged-line);font-size:12px;box-shadow:0 10px 30px #0002}
body[data-theme=modern] .realm-services summary{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:15px;color:#ded2bb;font-size:12px;list-style:none}
body[data-theme=modern] .realm-services summary::-webkit-details-marker{display:none}
body[data-theme=modern] .realm-services summary:before{content:'';width:6px;height:6px;background:#a99362;border-radius:50%;box-shadow:0 0 0 4px #a9936212;flex-shrink:0}
body[data-theme=modern] .realm-services[data-state=reachable] summary:before{background:#85ab78;box-shadow:0 0 0 4px #85ab7810}
body[data-theme=modern] .realm-services summary:after{content:'Подробнее +';margin-left:auto;font:10px Arial;color:#b49c73;white-space:nowrap}
body[data-theme=modern] .realm-services[open] summary:after{content:'Свернуть −'}
body[data-theme=modern] #realm-summary{font-size:11px;color:#a79c87}
body[data-theme=modern] .service-card{background:#151414;border:1px solid #6b583530}
body[data-theme=modern] .service-card h3{font:16px Georgia;color:#e0c99e}
body[data-theme=modern] .service-card p,body[data-theme=modern] #service-notice{color:#a49b8e;font-size:11px}
body[data-theme=modern] #refresh-services{color:#dac092;border:1px solid #725c3b;background:#282219;padding:8px 13px}

body[data-theme=modern] .forged-ranking-heading{display:flex;box-sizing:border-box;align-items:flex-end;justify-content:space-between;gap:30px;width:min(1240px,calc(100% - 64px));margin:0 auto 28px;scroll-margin-top:20px}
body[data-theme=modern] .forged-ranking-heading .hero-kicker{margin:0 0 9px;font-size:8px}
body[data-theme=modern] .forged-ranking-heading h2{font:normal 37px/1.2 Georgia;color:#e9ddc7;margin:0 0 10px;letter-spacing:-.5px}
body[data-theme=modern] .forged-ranking-heading h2 span{color:#b3653a}
body[data-theme=modern] .forged-ranking-heading p:last-child{font:12px/1.8 Arial;color:#a69c8d;margin:0}
body[data-theme=modern] #search-form{display:flex;align-items:center;gap:8px;max-width:none;flex-wrap:wrap;justify-content:flex-end;font:11px Arial;color:#b5a58d}
body[data-theme=modern] #search-form label{width:100%;text-align:left;font:8px Arial;letter-spacing:1.3px;text-transform:uppercase;color:#b29a75}
body[data-theme=modern] #player-search,body[data-theme=modern] #search-method{height:35px;border:1px solid #80684460;background:#191716;color:#e2d2b8;font:12px Arial;padding:7px 10px;border-radius:0;box-sizing:border-box}
body[data-theme=modern] #player-search{width:180px;min-width:70px;flex:1}
body[data-theme=modern] #search-method{width:93px;max-width:none}
body[data-theme=modern] #search-form .legacy-go{width:36px;height:35px;background:#3c2b20;border:1px solid #8a683e;padding:0;line-height:1}
body[data-theme=modern] #search-form .legacy-go img{display:none}
body[data-theme=modern] #search-form .legacy-go:after{content:'→';font:18px Arial;color:#edc886}
body[data-theme=modern] #clear-search{font:11px Arial;padding:7px;background:none;border:1px solid #6f5a3b;color:#c2ad88}
body[data-theme=modern] .site-header{box-sizing:border-box;width:min(1240px,calc(100% - 64px));max-width:none;margin:0 auto;min-height:0;height:auto;padding:0;background:none;z-index:3}
body[data-theme=modern] #game-menu{position:relative;display:flex;justify-content:flex-start;flex-wrap:wrap;gap:0;padding:0;width:100%;top:auto;border-bottom:1px solid var(--forged-line)}
body[data-theme=modern] #game-menu .game-toggle{position:relative;min-width:0;padding:14px 17px;border:0;border-bottom:2px solid transparent;background:transparent;font:12px/1.4 Arial;color:#b2a794;text-decoration:none;white-space:nowrap}
body[data-theme=modern] #game-menu .game-toggle[aria-current=page]{background:linear-gradient(0deg,#86603920,transparent);border:0;border-bottom:2px solid #c69b60;color:#ecd2a0}
body[data-theme=modern] #game-menu .game-toggle:hover{color:#e6cfa6;background:#bd985010}
body[data-theme=modern] #game-menu .game-submenu{background:#211c18;border:1px solid #8c6a40;box-shadow:0 12px 35px #0008}
body[data-theme=modern] #game-menu .game-submenu button[role=menuitem]{background:transparent!important;color:#d1b88c;text-decoration:none;font:12px Arial;padding:12px!important}
body[data-theme=modern] #game-menu .game-submenu button[role=menuitem]:hover,body[data-theme=modern] #game-menu .game-submenu button[role=menuitem]:focus-visible{background:#513b28!important;color:#ffdfac}

body[data-theme=modern] .ranking-frame{box-sizing:border-box;max-width:none;width:min(1240px,calc(100% - 64px));margin:0 auto 35px;padding:0;background:#171515;border:1px solid var(--forged-line);border-top:0;box-shadow:0 18px 50px #0002;min-width:0}
body[data-theme=modern] .classic-banner{display:none}
body[data-theme=modern] .forged-game-caption{display:flex;gap:15px;align-items:center;padding:24px 26px 19px;border-bottom:1px solid #b592571c;background:linear-gradient(110deg,#30231b38,transparent)}
body[data-theme=modern] .game-glyph{font-size:17px;color:#ba8050;text-shadow:0 0 15px #d0763450}
body[data-theme=modern] #forged-game-name{font:normal 25px Georgia;color:#ebd9b7}
body[data-theme=modern] .forged-game-caption small{margin-left:auto;font:8px Arial;letter-spacing:1.5px;color:#9c8664}
body[data-theme=modern] .toolbar{justify-content:flex-start;min-height:0;background:#171515;border:0;padding:14px 26px 10px}
body[data-theme=modern] .toolbar h2{font:11px Arial;color:#bcaa8c;margin:0}
body[data-theme=modern] #status{padding:0 26px;color:#bcab8c;font:12px/1.6 Arial}
body[data-theme=modern] .table-scroll{margin:0 13px;overflow:auto;max-width:calc(100% - 26px)}
body[data-theme=modern] #LeaderBoard{border-collapse:collapse;width:100%;font:13px Arial}
body[data-theme=modern] #LeaderBoard th{height:40px;background:#201d19;border:0;border-bottom:1px solid #b5925733;text-align:left;padding:0 14px}
body[data-theme=modern] #LeaderBoard th button{color:#bbaa8c;text-transform:none;letter-spacing:0;font:11px Arial;text-decoration:none}
body[data-theme=modern] #LeaderBoard td{height:52px;box-sizing:border-box;background:none;border:0;border-bottom:1px solid #b5925715;padding:10px 14px;color:#c2b9a8;font-weight:normal;text-align:left}
body[data-theme=modern] #LeaderBoard tbody tr:nth-child(odd){background:#1a1816}
body[data-theme=modern] #LeaderBoard tbody tr:nth-child(even){background:#171615}
body[data-theme=modern] #LeaderBoard tbody tr:hover{background:#30271d}
body[data-theme=modern] #LeaderBoard .player-link{font:14px Georgia;color:#dfbd81;text-decoration:none}
body[data-theme=modern] #LeaderBoard tbody tr:nth-child(-n+3) td:first-child{font:18px Georgia;color:#d6ae69}
body[data-theme=modern] .level-bar{background:#211c16;border:1px solid #5b492d;height:17px;box-shadow:none}
body[data-theme=modern] .level-bar progress,body[data-theme=modern] .level-bar progress::-webkit-progress-bar{background:#211b13}
body[data-theme=modern] .level-bar progress::-webkit-progress-value{background:linear-gradient(#c3a56c,#98713d 50%,#644326)}
body[data-theme=modern] .level-bar progress::-moz-progress-bar{background:linear-gradient(#c3a56c,#98713d 50%,#644326)}
body[data-theme=modern] .pagination{margin:0 13px;padding:18px 0;background:none;font:11px Arial;color:#a99b85}
body[data-theme=modern] .pagination button{background:#282219;border:1px solid #715934;padding:8px 12px;color:#dec18d;font:11px Arial}
body[data-theme=modern] #profile.player-profile{box-sizing:border-box;max-width:1050px;margin:25px auto;padding:28px;background:linear-gradient(130deg,#27211b,#181615);border:1px solid #80654166;box-shadow:none}
body[data-theme=modern] .profile-identity{background:#171411;border-color:#86683b50}
body[data-theme=modern] .profile-field{background:#c79e4d04}
body[data-theme=modern] .armory-slot,body[data-theme=modern] .armory-item{border-color:#80654166}

body[data-theme=modern] .realm-page-footer{box-sizing:border-box;margin-top:auto;background:#0e0d0d;border-top:1px solid #b5925722}
body[data-theme=modern] .bottom-bar{display:none}
body[data-theme=modern] .modern-footer{box-sizing:border-box;width:min(1240px,calc(100% - 64px));max-width:none;display:grid;grid-template-columns:1.6fr 1fr 1fr;gap:35px;margin:0 auto;padding:39px 0 22px;border:0;text-align:left}
body[data-theme=modern] .modern-footer .realm-wordmark{display:block;padding-left:0;font:25px Georgia;width:auto}
body[data-theme=modern] .modern-footer .realm-wordmark small{display:block;margin-top:4px;font:8px Arial;letter-spacing:4px}
body[data-theme=modern] .modern-footer h3{font:9px Arial;letter-spacing:1.6px;color:#b29a70}
body[data-theme=modern] .modern-footer p{font:11px/1.9 Arial;color:#978c7d;margin:12px 0 0}
body[data-theme=modern] .modern-footer button{font:11px Arial;color:#d1b582;padding:0;margin:0 0 15px;background:none;border:0}
body[data-theme=modern] .modern-footer .footer-meta{border-top:1px solid var(--forged-line);padding-top:18px;font:10px Arial;color:#8d806e}
body[data-theme=modern] .modern-footer .footer-meta button{font-size:10px;margin:0;color:#aa9677}

@media(min-width:1100px){body[data-theme=modern] .realm-download{display:none}}
@media(max-width:1100px){body[data-theme=modern] .realm-tools{gap:15px}body[data-theme=modern] .forged-navigation{gap:15px}body[data-theme=modern] .theme-switch{margin-left:auto}body[data-theme=modern] .realm-download{display:none}body[data-theme=modern] #game-menu .game-toggle{padding:12px}}
@media(max-width:800px){body[data-theme=modern] .realm-tools{width:calc(100% - 36px);min-height:80px;gap:14px}body[data-theme=modern] .realm-wordmark{font-size:28px;width:146px;padding-left:41px}body[data-theme=modern] .realm-wordmark span{font-size:21px}body[data-theme=modern] .brand-crest{width:30px;height:37px}body[data-theme=modern] .forged-navigation{order:4;width:100%;justify-content:flex-start;padding-top:13px;border-top:1px solid var(--forged-line)}body[data-theme=modern] .theme-switch{margin-left:auto}body[data-theme=modern] #open-registration{padding:9px;font-size:10px}body[data-theme=modern] .hero-copy{width:calc(100% - 40px);padding-top:45px}body[data-theme=modern] .realm-hero,body[data-theme=modern][data-game] .realm-hero{min-height:460px;background-position:60% center}body[data-theme=modern] .hero-copy h1{font-size:52px}body[data-theme=modern] .hero-bottom{left:20px;right:20px;font-size:7px;letter-spacing:1.3px}body[data-theme=modern] .realm-services,body[data-theme=modern] .forged-ranking-heading,body[data-theme=modern] .site-header,body[data-theme=modern] .ranking-frame,body[data-theme=modern] .modern-footer{width:calc(100% - 36px)}body[data-theme=modern] .forged-ranking-heading{align-items:stretch;flex-direction:column;gap:22px}body[data-theme=modern] #search-form{justify-content:flex-start;width:100%;max-width:400px}body[data-theme=modern] #service-cards{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-theme=modern] .modern-footer{grid-template-columns:1.3fr 1fr;gap:28px}body[data-theme=modern] .modern-footer>div:first-child{grid-column:1/-1}}
@media(max-width:520px){body[data-theme=modern] .realm-tools{gap:12px}body[data-theme=modern] .realm-tools>.realm-wordmark{margin-right:auto}body[data-theme=modern] .theme-switch{order:5;margin:0;width:auto;border:0;padding:0}body[data-theme=modern] .theme-switch button{padding:5px 7px;font-size:9px}body[data-theme=modern] .forged-navigation{width:auto;flex:1;gap:16px;margin:0;border:0;padding:0}body[data-theme=modern] .forged-navigation a,body[data-theme=modern] .forged-navigation button{font-size:11px}body[data-theme=modern] .hero-copy{padding-top:43px;padding-bottom:68px}body[data-theme=modern] .hero-copy h1{font-size:46px;letter-spacing:-1px}body[data-theme=modern] .hero-copy .hero-kicker{font-size:7px;letter-spacing:1.8px}body[data-theme=modern] .hero-description{font-size:12px;max-width:260px;color:#d0c3ae}body[data-theme=modern] .hero-actions{gap:17px}body[data-theme=modern] .forged-primary{padding:13px 18px;font-size:12px;gap:25px}body[data-theme=modern] .forged-secondary{font-size:11px}body[data-theme=modern] .hero-account,body[data-theme=modern] #hero-register{font-size:10px}body[data-theme=modern] .hero-bottom span:last-child{display:none}body[data-theme=modern] .realm-hero,body[data-theme=modern][data-game] .realm-hero{min-height:420px;background-position:58% center;background-image:linear-gradient(90deg,#100f0fdd,#100f0f70),linear-gradient(0deg,#100f0f,transparent 45%),url('madwars-citadel.jpg')}body[data-theme=modern] .realm-services{margin-bottom:35px;padding:14px}body[data-theme=modern] .realm-services summary{flex-wrap:wrap;gap:10px;font-size:11px}body[data-theme=modern] #realm-summary{font-size:10px}body[data-theme=modern] .realm-services summary:after{display:none}body[data-theme=modern] .forged-ranking-heading h2{font-size:32px}body[data-theme=modern] .forged-ranking-heading p:last-child{font-size:11px}body[data-theme=modern] #game-menu .game-toggle{font-size:10px;padding:11px 10px}body[data-theme=modern] .forged-game-caption{padding:21px 15px;gap:12px}body[data-theme=modern] #forged-game-name{font-size:21px}body[data-theme=modern] .forged-game-caption small{display:none}body[data-theme=modern] .toolbar{padding-inline:15px}body[data-theme=modern] .toolbar h2{font-size:10px}body[data-theme=modern] #LeaderBoard td,body[data-theme=modern] #LeaderBoard th{padding-inline:10px}body[data-theme=modern] .modern-footer{grid-template-columns:1fr;gap:25px;padding-top:30px}body[data-theme=modern] .modern-footer>div:first-child{grid-column:auto}body[data-theme=modern] .modern-footer .footer-meta{flex-wrap:wrap}body[data-theme=modern] #profile.player-profile{margin:15px 8px;padding:15px}.forged-dialog{padding:30px 23px}.forged-dialog h2{font-size:30px}.start-steps{margin-block:18px}.start-steps li{grid-template-columns:28px 1fr;gap:10px}.start-steps h3,.download-card h3{font-size:19px}.checksum-link{margin:14px 0 0;display:block}}
