/*
 * L2Retro: современный адаптивный слой поверх старой темы (style.css).
 * Меняет раскладку с фиксированных 1200px на сетку, чинит телефоны и планшеты, подтягивает карточки, текст и подвал.
 * Рисунки и фон остаются прежними.
 */
/* Старые шрифты (calibri) не загружаются из-за неверного пути и повреждённого файла: везде используется PT Sans, который уже подключён */
body, body * { font-family: 'PT Sans', 'Segoe UI', Roboto, Arial, sans-serif !important; }
#navigation li a, .sideTitle, .inform span, #news_full .news_title, #news_full .news_title a, .navi li a, .popup_title, .side_h { font-weight: 700; }

:root {
    --gold: #ffae00;
    --gold-soft: #ffd850;
    --ink: #e9e4d8;
    --muted: #9fb0b3;
    --card: rgba(14, 24, 26, .92);
    --card-line: rgba(255, 174, 0, .22);
    --bar: rgba(8, 13, 14, .88);
    --radius: 14px;
}

html { -webkit-text-size-adjust: 100%; }
body { background: #0b1112; color: var(--ink); line-height: 1.55; }
a { color: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- каркас: сетка вместо абсолютных координат ---------- */
#general {
    height: auto;
    max-height: none;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0b1112;
}
#general::after {          /* плавный переход картинки в тёмный фон, чтобы текст читался */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 520px; bottom: 0;
    background: linear-gradient(180deg, rgba(11, 17, 18, 0) 0, rgba(11, 17, 18, .78) 360px, #0b1112 900px);
    pointer-events: none;
    z-index: 0;
}
#wrapper {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    column-gap: 24px;
    row-gap: 0;
    align-items: start;
}
#header { grid-column: 1 / -1; width: auto; height: auto; margin: 0; }
#content { grid-column: 1; position: relative; top: auto; left: auto; width: auto; height: auto; margin-bottom: 32px; }
#content_inner { width: auto; }
#sideBlock { grid-column: 2; position: relative; top: auto; right: auto; width: auto; margin-bottom: 32px; }
#footer { grid-column: 1 / -1; }

/* ---------- верхнее меню ---------- */
#header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas:
    "nav nav nav"
    "status logo social"
    ". cta ."
    "info info info"; align-items: center; padding-bottom: 24px; }
#navigation {
    grid-area: nav;
    position: sticky; top: 0; z-index: 40;
    width: auto; height: auto;
    display: flex; justify-content: center; flex-wrap: wrap;
    margin: 0 -16px; padding: 0 16px;
    background: var(--bar);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
#navigation li { float: none; display: block; }
#navigation li a {
    padding: 0 clamp(14px, 3vw, 40px);
    height: auto; line-height: 1.2; padding-top: 18px; padding-bottom: 14px;
    font-size: 14px; letter-spacing: .04em;
    background: none;
    transition: background .15s, color .15s;
}
#navigation li a:hover { color: var(--gold-soft); }
.langs { position: absolute; top: 14px; right: 16px; z-index: 60; }

/* ---------- первый экран ---------- */
#header .logo {
    grid-area: logo; position: relative; top: auto; left: auto;
    width: 367px; max-width: 80vw; height: 97px;
    background-size: contain; background-position: center; margin: 36px auto 8px;
}
#header .social {
    grid-area: social; position: static; display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 28px 0 0;
}
#header .social li { margin: 0; }
#header .social li a { width: 56px; height: 56px; background-size: contain; background-position: center; opacity: .75; transition: opacity .15s, transform .15s; }
#header .social li a:hover { opacity: 1; transform: translateY(-2px); }
#header .btn_start {
    grid-area: cta; position: relative; top: auto; left: auto; right: auto; margin: 6px auto 20px;
    width: 440px; max-width: 100%; height: 100px; display: flex; align-items: center; justify-content: center;
}
#header .btn_st, #header .btn_st_1, #header .btn_st_2 { position: relative; top: auto; left: auto; right: auto; bottom: auto; margin: 0; flex: 0 0 auto; }
#header .btn_st_1 { order: 1; }
#header .btn_st { order: 2; }
#header .btn_st_2 { order: 3; }
#header .btn_st_1, #header .btn_st_2 { width: 220px; height: 73px; transition: filter .15s, transform .15s; }
#header .btn_st_1:hover, #header .btn_st_2:hover { transform: translateY(-2px); }
#header .btn_st { width: 112px; height: 103px; margin: 0 -26px; z-index: 2; pointer-events: none; }
#status {
    grid-area: status; position: relative; top: auto; left: auto; width: auto; z-index: 5;
    margin: 28px 0 0; min-height: 150px;
}
.l2topItem { position: absolute; top: 140px; left: 0; z-index: 6; }
.l2topItem img { border-radius: 6px; }

/* ---------- три блока под героем ---------- */
#header .infoBlock {
    grid-area: info; position: relative; top: auto; left: auto; width: auto;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px;
}
#header .inform {
    float: none; width: auto; min-height: 128px; padding: 4px 16px 14px 110px;
    background-color: var(--card); background-position: 6px center; background-repeat: no-repeat;
    border: 1px solid var(--card-line); border-radius: var(--radius);
    transition: border-color .15s, transform .15s;
}
#header .inform:hover { border-color: rgba(255, 174, 0, .55); transform: translateY(-2px); }
#header .inform span { font-size: 17px; padding-top: 18px; }
#header .inform p { font-size: 13px; line-height: 1.45; color: #e7d9c8; }
#header .inform a { font-size: 13px; }

/* ---------- основной текст и карточки ---------- */
#news_full, #content_inner > div[id^="news"] {
    width: auto; box-sizing: border-box; margin: 0 0 18px; padding: 26px 30px 20px;
    background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
#news_full .news_title, #news_full .news_title a { font-size: 22px; line-height: 1.25; color: var(--gold); text-decoration: none; }
#news_full .news_title a:hover { color: var(--gold-soft); }
#news_full .news_content { font-size: 16px; line-height: 1.7; color: var(--ink); text-align: left !important; margin-top: 16px; }
#news_full .news_content * { max-width: 100%; }
#news_full .news_content [style*="text-align"] { text-align: left !important; }
#news_full .news_content span[style*="large"] { font-size: 1.2em !important; line-height: 1.5; }
#news_full .news_content span[style*="medium"] { font-size: inherit !important; }
#news_full .news_content center, #news_full .news_content div[align], #news_full .news_content p[align] { text-align: left !important; display: block; }
#news_full .news_content img { height: auto; border-radius: 10px; }
#news_full .news_content h2, #news_full .news_content h3 { color: var(--gold); margin: 1.2em 0 .4em; }
#news_full .news_content ul { padding-left: 1.2em; }
#news_full .news_content li { margin: .25em 0; }
#news_full .news_link a { border-radius: 10px; width: auto; padding: 0 22px; transition: all .15s; }
.static-page, .news_content table { max-width: 100%; }
#content_inner .news_title + .content, #content_inner .content { color: var(--ink); font-size: 16px; line-height: 1.7; }
#content_inner h1, #content_inner .news_title { color: var(--gold); }
#content_inner table { max-width: 100%; }
#content_inner img { max-width: 100%; height: auto; }


/* ---------- статистика сервера и обычные страницы: общая карточка и таблицы ---------- */
#content_inner:not(:has(#news_full)) {
    padding: 22px 24px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 15px; overflow-x: auto;
}
#content_inner:not(:has(#news_full)) h1, #content_inner .news_title { font-size: 22px; margin: 0 0 14px; }
#content_inner a { color: var(--gold-soft); }
#content_inner a:hover { color: #fff; }
#content_inner table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
#content_inner td, #content_inner th { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; color: var(--ink); vertical-align: middle; }
#content_inner th { color: var(--muted); font-weight: 700; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
#content_inner tr:hover td { background: rgba(255, 255, 255, .03); }
#content_inner .trRowA td { background: rgba(255, 255, 255, .025); }
#content_inner .l2title, #content_inner td.l2title {
    background: rgba(120, 30, 22, .5); color: #fff; font-size: 16px; font-weight: 700; text-align: center; padding: 12px; border-radius: 8px;
}
#content_inner .l2title font { color: inherit; }
#content_inner .l2rates { color: var(--gold-soft); text-align: center; }
#content_inner .l2left { color: var(--muted); width: 55%; }
#content_inner .l2right { color: #fff; font-weight: 700; text-align: right; }
#content_inner .male { color: #8fc8ff; }
#content_inner .female { color: #ff9ec7; }
/* меню разделов статистики: вкладки */
#content_inner > div:first-child:has(a[href*="stat"]) { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 18px; }
#content_inner .error, #error { padding: 16px; color: #ffb4a8; background: rgba(120, 30, 22, .25); border-radius: 10px; font-size: 14px; }
@media (max-width: 640px) {
    #content_inner:not(:has(#news_full)) { padding: 14px 12px; }
    #content_inner td, #content_inner th { padding: 7px 6px; font-size: 13px; }
}

/* ---------- правая колонка ---------- */
.sideItem { display: block; width: auto; margin: 0 0 14px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.sideTitle { width: auto; height: auto; padding: 16px 16px 14px 64px; border-radius: 0; background-color: rgba(120, 30, 22, .55); line-height: 1.25; }
.sideItem > span, .sideItem .tg-line { display: block; padding: 4px 18px 14px; font-size: 14px; }
.pvp_form, .pvp_form table, .pvp_form table thead, .pvp_form table tbody { width: auto; display: block; margin: 0; padding: 0 12px; }
.pvp_form tr { width: auto; display: grid; grid-template-columns: 26px minmax(0, 1fr) 44px 36px; align-items: center; height: auto; line-height: 22px; border-radius: 4px; }
.pvp_form tr td, .pvp_form tr th { display: block; float: none; width: auto !important; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp_form tr td:nth-child(3), .pvp_form tr td:nth-child(4), .pvp_form tr th:nth-child(3), .pvp_form tr th:nth-child(4) { text-align: right; }
.sideDonate { width: auto; height: auto; min-height: 100px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: var(--radius); background-color: var(--card); background-size: cover; background-position: center; }
.sideDonate .side_h, .sideDonate h1 { width: auto; padding-top: 0; font-size: 13px; letter-spacing: .04em; }
.sideDonate span { width: auto; height: auto; padding-left: 28px; }

/* ---------- подвал ---------- */
#footer {
    position: relative; left: auto; right: auto; bottom: auto; width: auto; max-width: none; min-width: 0; height: auto; margin: 0 -16px;
    padding: 28px 16px 60px; background: var(--bar); border-top: 1px solid rgba(255, 174, 0, .25);
}
#footer_inner { width: min(1200px, 100%); height: auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
#footer .copyright { font-size: 13px; line-height: 1.6; color: #b9c2c4; }
#footer .copyright p { margin: 0 0 6px; }
#footer .copyright a { color: var(--gold); }
#footer .navi { position: static; width: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 4px; }
#footer .navi li a { padding: 4px 14px; line-height: 1.4; border-right: 1px solid rgba(255, 216, 80, .35); font-size: 13px; }
#footer .navi li:last-child a { border-right: 0; }

/* ---------- окно «скачать» ---------- */
.popup_content { width: min(520px, calc(100vw - 24px)); box-sizing: border-box; border: 1px solid var(--card-line); }
.popup_item { width: auto; margin-left: 20px; margin-right: 20px; padding-left: 10px; padding-right: 10px; }
#cookie-bar { box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }

/* ---------- планшеты ---------- */
@media (max-width: 1100px) {
    #wrapper { grid-template-columns: minmax(0, 1fr); }
    #content, #sideBlock { grid-column: 1; }
    #header { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "nav nav" "logo logo" "cta cta" "status social" "info info"; }
    #header .logo { margin-top: 28px; }
    #navigation { padding-right: 120px; }
    #header .social { justify-content: flex-end; margin-top: 0; }
    #status { margin: 0; }
    .l2topItem { display: none; }
    #sideBlock { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 14px; }
    #footer_inner { grid-template-columns: 1fr; }
    #footer .navi { justify-content: flex-start; }
}

@media (max-width: 860px) {
    #header .infoBlock { grid-template-columns: 1fr; }
}

/* ---------- телефоны ---------- */
@media (max-width: 640px) {
    #wrapper { width: calc(100% - 24px); }
    #navigation { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 110px 0 6px; scrollbar-width: none; }
    #navigation::-webkit-scrollbar { display: none; }
    #navigation li a { padding-left: 14px; padding-right: 14px; white-space: nowrap; font-size: 13px; }
    .langs { position: static; grid-area: lang; display: flex; justify-content: center; gap: 6px; padding: 8px 0 0; }
    .langs a { padding: 5px 12px; }
    #navigation { padding-right: 6px; }
    #header .btn_start { transform: scale(.8); transform-origin: center top; margin-bottom: -4px; }
    .vote-badge { display: none; }
    #header { grid-template-areas: "nav nav" "lang lang" "logo logo" "cta cta" "status status" "social social" "info info"; }
    #header .social { justify-content: center; }
    #status { display: flex; justify-content: center; min-height: 0; }
    #news_full { padding: 18px 16px 14px; }
    #news_full .news_title, #news_full .news_title a { font-size: 19px; }
    #news_full .news_content { font-size: 15px; }
    .sideTitle { padding-left: 56px; }
    #footer { margin: 0 -12px; padding: 22px 12px 90px; }
    #footer .navi li a { padding: 6px 10px; }
}

@media (max-width: 380px) {
    #header .btn_start { transform: scale(.7); margin-bottom: -14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- v2: ближе к оригинальному оформлению (яркий фон, прозрачное меню, блоки без плашек) ---------- */
:root { --card: rgba(18, 29, 31, .95); --card-line: rgba(255, 174, 0, .14); }
#navigation li a, #header .inform span, .sideTitle, #news_full .news_title, #news_full .news_title a, #content_inner h1, .navi li a {
    font-family: 'PT Serif', Georgia, 'Times New Roman', serif !important;
}
#general::after {
    top: 640px;
    background: linear-gradient(180deg, rgba(11, 17, 18, 0) 0, rgba(11, 17, 18, .42) 320px, rgba(11, 17, 18, .9) 900px, #0b1112 1250px);
}
#header .btn_start { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .45)); }
#news_full, #content_inner > div[id^="news"] { border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }

@media (min-width: 1101px) {
    #navigation {
        position: relative;
        background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
        -webkit-backdrop-filter: none; backdrop-filter: none;
        border-bottom: 0;
        padding-bottom: 18px;
    }
    #navigation li a { font-size: 15px; letter-spacing: .07em; padding-top: 28px; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
    #navigation li:not(:last-child) a { background: url(../images/nav.png) no-repeat center right; }
    #navigation li a:hover { background-color: rgba(39, 55, 71, .55); }
    #header .social li a { width: 92px; height: 92px; opacity: .85; }
    #header .infoBlock { gap: 8px; }
    #header .inform { background-color: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }
    #header .inform:hover { border-color: transparent; transform: none; }
    #header .inform span { font-size: 19px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
    #header .inform p { color: #ffe3ca; text-shadow: 0 1px 5px rgba(0, 0, 0, .95); }
}

/* ---------- v3: полупрозрачные окошки, сквозь которые виден фон ---------- */
:root { --card: rgba(12, 22, 24, .56); --card-line: rgba(255, 174, 0, .22); --bar: rgba(8, 13, 14, .6); }
#general::after {
    background: linear-gradient(180deg, rgba(11, 17, 18, 0) 0, rgba(11, 17, 18, .12) 320px, rgba(11, 17, 18, .3) 900px, rgba(11, 17, 18, .45) 1250px);
}
#news_full .news_content, #news_full .news_title, .sideItem, .sideDonate, #footer .copyright { text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
#news_full { box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .04); }

/* ---------- v4: все окошки на 35% непрозрачности ---------- */
:root { --card: rgba(12, 22, 24, .35); --bar: rgba(8, 13, 14, .35); }
.sideTitle { background-color: rgba(120, 30, 22, .35); }
#footer { border-top-color: rgba(255, 174, 0, .18); }

/* ---------- v5: ещё прозрачнее: верхнее меню без плашки, окошки почти стеклянные ---------- */
:root { --card: rgba(10, 18, 20, .18); --bar: rgba(8, 13, 14, .18); --card-line: rgba(255, 174, 0, .28); }
.sideItem .sideTitle { background-color: rgba(120, 30, 22, .2) !important; }
.sideItem, .sideDonate, #news_full, #content_inner > div[id^="news"], #content_inner:not(:has(#news_full)), #footer { box-shadow: none; }
.pvp_form tr { background: rgba(0, 0, 0, .14); }
.sideItem, .sideDonate, #footer, #news_full .news_content, #news_full .news_title, .pvp_form td, .pvp_form th { text-shadow: 0 1px 4px rgba(0, 0, 0, .9), 0 0 10px rgba(0, 0, 0, .55); }
@media (min-width: 1101px) {
    #navigation { background: none !important; }
    #navigation li a { text-shadow: 0 2px 8px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .6); }
}

/* ---------- v7: фон без тёмной плашки под меню (картинка bg1n.jpg: верх дорисован продолжением боке) ---------- */
#general {
    background: url(../images/bg1n.jpg?v=7) no-repeat center top 0px,
                url(../images/bg2.jpg) no-repeat center top 400px,
                url(../images/bg3.jpg) no-repeat center top 800px,
                url(../images/bg4.jpg) no-repeat center top 1200px;
    background-color: #0b1112;
}

/* ---------- v8: затемнение не ложится на девушку (оригинальная яркость фона справа) ---------- */
#general::after {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - 40px), transparent calc(50% + 150px), transparent calc(50% + 800px), #000 calc(50% + 980px));
            mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - 40px), transparent calc(50% + 150px), transparent calc(50% + 800px), #000 calc(50% + 980px));
}

/* логотип L2Retro */
#header .logo, .logo { background-image: url(../images/logo_l2retro_v4.png?v=34) !important; background-repeat: no-repeat; background-size: 100% auto; background-position: center; }


/* Desktop header: separate grid rows, no overlapping top-left controls. */
@media (min-width: 1101px) {
    #header {
        grid-template-areas: "nav nav nav" "status logo ." ". cta ." ". social ." "info info info";
    }
    #header .langs { left: 0; right: auto; top: 28px; display: flex; gap: 6px; }
    #navigation { padding-left: 150px; padding-right: 16px; }
    #status { margin: 0; min-height: 0; align-self: center; }
    #status .l2topItem { position: static; margin-top: 16px; }
    #header .social {
        grid-area: social; position: static; left: auto; top: auto;
        justify-content: center; margin: 4px 0 20px; gap: 16px;
    }
    #header .social li a { width: 56px; height: 56px; opacity: .95; }
}


/* Portal language selector and account dialog. */
#header .langs {display:flex;align-items:center;justify-content:flex-start;gap:10px;}
#portal-language,#portal-signin {box-sizing:border-box;height:38px;border:1px solid #9d752c;border-radius:7px;background:rgba(12,20,23,.7);color:#ffc456;font:700 15px Arial,sans-serif;padding:6px 12px;cursor:pointer;}
#portal-language {min-width:76px;}#portal-language option {background:#152023;color:#fff;}
#portal-signin:hover {background:#694b18;color:#fff;}
#portal-language:focus-visible,#portal-signin:focus-visible {outline:2px solid #ffcf75;outline-offset:3px;}
@media(min-width:1101px){#navigation {padding-left:220px;} #header .langs{top:20px;}}
@media(min-width:641px) and (max-width:1100px){#header .langs{left:0;right:auto;}#navigation{padding-left:210px;padding-right:0;}}
@media(max-width:640px){#header .langs{justify-content:flex-start;padding:10px 0 0;}}
body.portal-modal-open {overflow:hidden;}
#portal-login {box-sizing:border-box;width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:30px 26px 26px;margin:auto;border:1px solid #9d752c;border-radius:14px;background:#142026;color:#f8ebd8;box-shadow:0 20px 70px #0009;font:16px/1.5 Arial,sans-serif;}
#portal-login::backdrop {background:rgba(0,0,0,.7);}
#portal-login h2 {font:700 25px/1.3 'PT Serif',Georgia,serif;margin:8px 28px 24px 0;color:#f8dfaa;}
#portal-login .portal-close {position:absolute;right:12px;top:8px;border:0;background:transparent;color:#eee;font:30px Arial;cursor:pointer;width:38px;height:38px;}
#portal-login label {display:block;margin:12px 0 6px;}
#portal-login input:not([type=hidden]) {box-sizing:border-box;display:block;width:100%;height:46px;background:#0a1218;color:#fff;border:1px solid #718087;border-radius:6px;padding:10px 12px;font:16px Arial;}
#portal-login .portal-submit,#portal-login .portal-google {box-sizing:border-box;display:block;width:100%;border:1px solid #b89042;border-radius:6px;padding:12px;text-align:center;font:700 16px/1.4 Arial;cursor:pointer;text-decoration:none;}
#portal-login .portal-submit {background:#bd8424;color:#111;}
#portal-login .portal-submit:disabled {opacity:.45;cursor:default;}
#portal-login .portal-google {background:#fff;color:#242424;border-color:#747775;margin:14px 0 20px;}
#portal-login .portal-account-links {display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;}
#portal-login a {color:#ffcc76;}#portal-login .portal-status {font-size:14px;margin:10px 0;}
#portal-captcha {margin:16px 0 0;min-height:0;}
#portal-login :focus-visible {outline:2px solid #ffcf75;outline-offset:3px;}
@media(max-width:370px){#portal-login{padding:24px 12px;}#portal-login h2{font-size:22px;}}

/* Override the legacy global input sizing. */
#header #portal-language {width:82px!important;max-width:82px!important;height:38px!important;appearance:auto!important;text-align:left;flex:0 0 82px;}
#portal-login input:not([type=hidden]) {width:100%!important;max-width:100%!important;height:46px!important;}
#portal-login input[type=hidden] {display:none!important;}
#portal-login {overflow-x:hidden;}

@media(max-width:440px){#portal-login{max-width:calc(100% - 24px)!important;padding:24px 18px;}}

/* Header 40: downloads in navigation; room for additional server rates. */
#header #portal-language {width:78px!important;max-width:78px!important;flex-basis:78px;appearance:none!important;-webkit-appearance:none!important;padding:6px 30px 6px 14px!important;text-align:left;line-height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23ffc456' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:12px 8px;}
#header #portal-signin {min-width:100px;padding-left:20px;padding-right:20px;}
#status .l2topItem {position:static;margin:0 0 16px;}
@media(min-width:1101px){
 #header{grid-template-areas:"nav nav nav" "status logo ." "status social ." "info info info";}
 #header .social{margin:20px 0 30px;gap:20px;}
 #header .social li a{width:72px;height:72px;}
 #header .logo{margin-top:36px;}
 #status{align-self:start;margin-top:26px;}
 #navigation{padding-left:230px;}
}
@media(min-width:641px) and (max-width:1100px){
 #header{grid-template-areas:"nav nav" "logo logo" "status social" "info info";}
 #navigation{padding-left:220px;}
}
@media(max-width:640px){
 #header{grid-template-areas:"nav nav" "lang lang" "logo logo" "status status" "social social" "info info";}
}

/* Downloads must appear above every header layer, with a reachable close button. */
#popup {z-index:5000;background:rgba(0,0,0,.72);}
#popup .popup_content {top:8vh;max-height:84vh;overflow:auto;background:rgba(12,22,26,.98);padding-top:40px;}
#popup .popup_close {top:12px;right:12px;z-index:2;}
#popup .popup_item {overflow-wrap:anywhere;}
#navigation li a {text-transform:uppercase;}

#popup .popup_close {background:none;border:0;color:#f5d8a0;font:30px/30px Arial;width:32px;height:32px;cursor:pointer;}

/* Footer 41: readable prose and consistent navigation labels. */
#footer .copyright a {border:0;background:none;padding:0;text-decoration:underline;text-underline-offset:3px;}
#footer .navi {gap:6px 12px;}
#footer .navi li {float:none;}
#footer .navi li a {display:block;border:0;background:none;padding:6px 0;font:600 13px/1.5 Arial,sans-serif;text-transform:none;letter-spacing:normal;color:#ffd071;}
#footer .navi li a:hover {color:#fff0c6;text-decoration:underline;text-underline-offset:3px;}
#footer a:focus-visible {outline:2px solid #ffc456;outline-offset:4px;}

/* Support card: the whole block opens the cabinet help desk. */
#sideBlock .support-card-link {display:block;color:inherit;text-decoration:none;border:0;background:none;}
#sideBlock .support-card-action {display:block;padding:0 18px 16px;color:#ffc456;font:600 14px/1.5 Arial,sans-serif;}
#sideBlock .support-card-link:hover .support-card-action {color:#fff0c6;text-decoration:underline;}
#sideBlock .support-card-link:focus-visible {outline:2px solid #ffc456;outline-offset:3px;border-radius:12px;}

#portal-login .portal-tabs {display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0;}
#portal-login .portal-tabs button {background:none;border:0;color:#ffcc76;padding:6px 0;cursor:pointer;font:14px/1.5 Arial;}
#portal-login .portal-hint {font:13px/1.5 Arial;color:#c8c8c8;margin:6px 0 12px;}
#portal-login .portal-message {line-height:1.5;color:#ffe0a1;overflow-wrap:anywhere;}

/* Rating 53: readable names and scores; preserve all existing backgrounds. */
#sideBlock .pvp_form td,#sideBlock .pvp_form td a {color:#fff3d6!important;font-weight:600;text-shadow:0 1px 2px #000,0 0 4px #000;}
#sideBlock .pvp_form th {color:#ffd071!important;font-weight:700;text-shadow:0 1px 2px #000,0 0 4px #000;}
#sideBlock .pvp_form td:nth-child(3),#sideBlock .pvp_form td:nth-child(4) {color:#fff!important;font-variant-numeric:tabular-nums;}

/* Rating 54: full ranks and names without changing backgrounds. */
#sideBlock .pvp_form {padding:0 12px;}
#sideBlock .pvp_form table,#sideBlock .pvp_form table thead,#sideBlock .pvp_form table tbody {padding:0;width:100%;box-sizing:border-box;}
#sideBlock .pvp_form tr {grid-template-columns:30px minmax(0,1fr) minmax(40px,max-content) minmax(32px,max-content);}
#sideBlock .pvp_form tr td,#sideBlock .pvp_form tr th {padding:2px 4px;min-width:0;}
#sideBlock .pvp_form tr td:first-child,#sideBlock .pvp_form tr th:first-child {padding-left:0;padding-right:2px;white-space:nowrap;text-overflow:clip;}
#sideBlock .pvp_form tr td:nth-child(2),#sideBlock .pvp_form tr th:nth-child(2),#sideBlock .pvp_form tr td:nth-child(2) a {white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.5;}

/* Footer 66: continuous horizontal prose, text links underneath. */
#footer {margin:8px 0 0;padding:24px 0 34px;box-sizing:border-box;}
#footer_inner {width:100%;display:flex;flex-direction:column;gap:16px;align-items:stretch;}
#footer .copyright {min-width:0;font-size:13px;line-height:1.75;text-align:center;}
#footer .copyright p {display:inline;margin:0;}
#footer .copyright p:first-child {font-size:inherit;font-weight:700;color:#e9e4d8;margin:0;}
#footer .copyright p:last-child {margin:0;}
#footer .copyright p:nth-child(2)::after {content:".";}
#footer .navi {position:static;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 22px;margin:0;padding:0;width:100%;list-style:none;text-align:center;}
#footer .navi li {display:block;float:none;min-width:0;margin:0;padding:0;}
#footer .navi li a,#footer .navi #visitor-map-button {display:inline-block;box-sizing:border-box;width:auto;min-height:0;margin:0;padding:5px 0;border:0;border-radius:0;box-shadow:none;background:none;color:#ffd071;font:600 13px/1.5 'PT Sans',sans-serif !important;text-align:center;text-transform:none;letter-spacing:normal;text-decoration:none;white-space:normal;cursor:pointer;}
#footer .navi li a:hover,#footer .navi #visitor-map-button:hover {color:#fff0c6;text-decoration:underline;text-underline-offset:3px;}
#footer .navi a:focus-visible,#footer .navi button:focus-visible {outline:2px solid #ffc456;outline-offset:3px;}
@media(max-width:800px){#footer {padding:22px 0 28px;}#footer .navi {gap:6px 18px;}}
/* Keep footer text above the fixed desktop rating banners. */
@media(min-width:1101px){#footer{padding-bottom:112px;}}

/* Server tabs above the sidebar ranking. */
.ranking-switch {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(5.1rem, 100%), 1fr));
    gap: 3px;
    margin: 4px 0;
    border-bottom: 1px solid rgba(217, 177, 102, .45);
}
.ranking-switch a {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 28px;
    padding: 4px 5px;
    border-radius: 4px 4px 0 0;
    color: #f3dfb8;
    font: 600 13px/1.2 Georgia, serif;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.ranking-switch a[aria-current] {
    color: #ffe7ae;
    background: linear-gradient(180deg, rgba(214, 167, 81, .06), rgba(214, 167, 81, .19));
    box-shadow: inset 0 -2px #e6b45d;
}
.ranking-switch a:hover { color: #fff4d9; text-decoration: underline; }
.ranking-switch a:focus-visible { outline: 2px solid #ffda83; outline-offset: -2px; }

.realm-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
    gap: 4px;
    margin: 0 0 1rem;
    border-bottom: 1px solid rgba(217, 177, 102, .45);
}
.realm-tabs a {
    padding: .5rem;
    color: #f3dfb8;
    font: 600 15px/1.3 Georgia, serif;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.realm-tabs a[aria-current] {
    color: #ffe7ae;
    background: linear-gradient(180deg, transparent, rgba(214, 167, 81, .19));
    box-shadow: inset 0 -2px #e6b45d;
}
.realm-tabs a:hover { text-decoration: underline; }
.realm-tabs a:focus-visible { outline: 2px solid #ffda83; outline-offset: -2px; }
.realm-info { scroll-margin-top: 4rem; }
.realm-info[hidden] { display: none; }
.realm-info > h3 { margin: 1rem 0 .4rem; }
.realm-specs { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin: 0; }
.realm-specs > div { display: inline-flex; align-items: baseline; gap: .35rem; }
.realm-specs dt { color: #f5d597; }
.realm-specs dd { margin: 0; font-weight: bold; }
.realm-article { margin-top: 1.4rem; }
