/*
 * Phones and tablets: below 1100px, and touch-only devices (tablets, no mouse) below 1500px,
 * where the 1500px desktop layout would be cut off. Loaded last (css_ausgabe sorts by file name).
 * The desktop layout (1100px and wider) is not touched by this file, except for the
 * mobile-only navigation elements, which stay hidden there.
 */

nav .nav-toggle,
nav .nav-account,
nav > a.m-nav-only,
.m-rule-index,
.m-rw,
.m-vote-cta,
.m-scroll-top,
.m-pm-short {
    display: none;
}

/* Payment tab label wrapper (buy.php): transparent for the layout on desktop */
.m-pm-full {
    display: contents;
}

@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    :root {
        --m-parchment: #f1e4d8;
        --m-parchment-dark: #e6d5c4;
        --m-stone: #5d5b5b;
        --m-gold: #e0c39c;
        --m-gold-dark: #b8976d;
        --m-text: #5f5a57;
        --m-heading: #a2826d;
        --m-gap: 12px;
        --m-header-h: clamp(170px, 46vw, 401px);
        --m-logo-w: min(42vw, 250px);
    }

    /* Native page scrolling instead of the fixed-height scroll container */
    html,
    body {
        height: auto;
        overflow: visible;
    }

    body {
        overflow-x: hidden;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body::before {
        height: 100vh;
        height: 100lvh;
        transform: none;
        will-change: auto;
    }

    #page-scroll {
        height: auto;
        overflow: visible;
        overflow-x: clip;
    }

    div.layout_bottom {
        display: none;
    }

    .site_content {
        width: auto;
        padding-bottom: calc(var(--m-gap) + env(safe-area-inset-bottom, 0px));
    }

    /* Header artwork */
    header {
        width: 100%;
        /* 24px more than the artwork: the menu bar overlaps that part, as on desktop */
        height: calc(var(--m-header-h) + 24px);
        background-size: auto var(--m-header-h); /* = cover for the artwork height */
        background-position: center top;
        /* The artwork fades into the page background behind and above the menu bar instead of
           ending in a hard edge */
        -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 66px), transparent calc(100% - 12px));
        mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 66px), transparent calc(100% - 12px));
    }

    header .logo {
        width: var(--m-logo-w);
        height: auto;
        aspect-ratio: 350 / 217;
        margin: calc(clamp(14px, 6vw, 60px) + 5px) auto 0;
        /* Same spot in the artwork as on desktop: the artwork is centered here, on desktop the
           logo sits 13px (of 1265) right of its center; the logo image itself is 2.5px off. */
        transform: translateX(calc(var(--m-header-h) * 13 / 401 + var(--m-logo-w) * 2.5 / 350));
        background-size: contain;
    }

    /* Navigation: sticky bar with a menu button */
    nav {
        position: sticky;
        top: 0;
        z-index: 1030;
        width: auto;
        height: auto;
        margin: -30px var(--m-gap) 0;
        padding: 6px 8px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        line-height: 1.2;
        text-align: left;
        background: linear-gradient(to bottom, #f6e8d0 0%, #e3c9a4 100%);
        border: 2px solid var(--m-gold-dark);
        border-radius: 12px;
        box-shadow: 0 0 0 2px rgba(93, 91, 91, .85), 0 6px 18px rgba(0, 0, 0, .35);
    }

    nav > a,
    nav > span,
    nav > div.dropdown {
        display: none;
    }

    nav .nav-toggle,
    nav .nav-account {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 12px;
        font-family: 'Penumbra Serif', serif;
        font-size: 17px;
        font-weight: 600;
        color: #7d6555;
        text-transform: uppercase;
        background: transparent;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    nav .nav-account {
        font-size: 15px;
        background: rgba(255, 255, 255, .35);
        box-shadow: inset 0 0 0 1px rgba(127, 100, 49, .35);
    }

    nav .nav-toggle:focus-visible,
    nav .nav-account:focus-visible,
    nav.is-open > a:focus-visible {
        outline: 2px solid #8b6a3e !important;
        outline-offset: 2px;
    }

    .nav-toggle__icon {
        position: relative;
        width: 22px;
        height: 16px;
    }

    .nav-toggle__icon::before,
    .nav-toggle__icon::after,
    .nav-toggle__icon > span {
        content: "";
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease;
    }

    .nav-toggle__icon::before { top: 0; }
    .nav-toggle__icon > span { top: 7px; }
    .nav-toggle__icon::after { top: 14px; }

    nav.is-open .nav-toggle__icon::before { transform: translateY(7px) rotate(45deg); }
    nav.is-open .nav-toggle__icon > span { opacity: 0; }
    nav.is-open .nav-toggle__icon::after { transform: translateY(-7px) rotate(-45deg); }

    nav.is-open {
        padding-bottom: 10px;
    }

    nav.is-open > a,
    nav.is-open > div.dropdown {
        display: block;
        flex: 1 1 50%;
        max-width: 50%;
    }

    nav.is-open > .nav-account {
        display: inline-flex;
        flex: 0 0 auto;
        max-width: none;
    }

    nav.is-open > .nav-toggle {
        flex: 1 0 auto;
        margin-bottom: 6px;
    }

    nav.is-open > a:not(.nav-account),
    nav.is-open > .dropdown > a {
        display: block;
        padding: 11px 12px;
        font-size: 17px;
        line-height: 1.3;
        color: #7d6555;
        border-top: 1px solid rgba(127, 100, 49, .25);
        text-shadow: none;
    }

    nav.is-open > a:not(.nav-account):active,
    nav.is-open > .dropdown > a:active {
        background: rgba(255, 255, 255, .4);
    }

    nav a:hover,
    nav a:focus,
    nav a:active {
        text-shadow: none;
    }

    nav div.dropdown .dropdown-content,
    nav div.dropdown:hover .dropdown-content {
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        transition: none;
    }

    nav div.dropdown .dropdown-content:has(> a:only-child) {
        display: none;
    }

    nav div.dropdown-content a {
        padding: 8px 12px 8px 24px;
        font-size: 15px;
    }

    /* Main column */
    main {
        width: auto;
        margin: var(--m-gap) var(--m-gap) 0;
        color: var(--m-text);
    }

    main .content_left,
    main .content_right {
        display: block;
        float: none;
        width: auto;
    }

    /* Slider */
    main .content_left .slider .slider_bg {
        display: none;
    }

    main .content_left .slider #home_slider {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 736 / 288;
        border: 2px solid var(--m-gold);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 0 0 2px rgba(93, 91, 91, .85), 0 8px 22px rgba(0, 0, 0, .4);
    }

    #home_slider .carousel-item {
        background-size: cover !important;
        background-position: center !important;
    }

    /* Slider videos fill the slide like the background image (loaded per slide by zz_custom.js) */
    #home_slider .carousel-item video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    main .content_left .slider #home_slider .carousel-inner .carousel-item .carousel-description {
        padding: 6px 10px 7px;
        font-size: clamp(11px, 3.2vw, 18px);
        line-height: 1.3;
    }

    .carousel-indicators {
        top: 8px;
        right: 8px;
    }

    /* Content card */
    main .content_left .content_left_inner {
        width: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        margin-top: var(--m-gap);
        padding: 16px 14px 22px;
        background: var(--m-parchment);
        border-radius: 14px;
        box-shadow: 0 0 0 2px var(--m-stone), 0 0 0 4px rgba(224, 195, 156, .55), 0 10px 28px rgba(0, 0, 0, .45);
        font-size: 15px;
        overflow-wrap: break-word;
    }

    main .content_left .content_left_inner > h1,
    main .content_left .content_left_inner h1 {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    main .content_left .content_left_inner h2 {
        font-size: 21px;
        line-height: 1.25;
    }

    .content_left_inner img,
    .content_left_inner video,
    .content_left_inner iframe {
        max-width: 100%;
    }

    .content_left_inner img {
        height: auto;
    }

    /* Images with a fixed inline size (CMS content) keep their aspect ratio */
    .content_left_inner img[style*="height"] {
        height: auto !important;
    }

    /* Bootstrap tables with a fixed inline width use the full card width */
    .content_left_inner table.table[style*="width"] {
        width: 100% !important;
    }

    .m-table-scroll > table {
        margin-left: 0;
    }

    /* Footer */
    main .content_left .content_left_footer {
        height: auto;
        margin: var(--m-gap) 0 0;
        padding: 14px 12px;
        background: rgba(4, 15, 21, .78);
        border: 1px solid rgba(224, 195, 156, .35);
        border-radius: 12px;
        color: #e9d9c4;
        font-weight: 500;
    }

    main .content_left .content_left_footer a {
        color: var(--m-gold);
        display: inline-block;
        padding: 6px 2px;
    }

    main .content_left .content_left_footer .footer_copyright {
        margin-bottom: 4px;
    }

    /* Sidebar */
    main .content_right {
        margin-top: var(--m-gap);
        padding: 18px 14px 8px;
        background: var(--m-parchment);
        border-radius: 14px;
        box-shadow: 0 0 0 2px var(--m-stone), 0 0 0 4px rgba(224, 195, 156, .55), 0 10px 28px rgba(0, 0, 0, .45);
    }

    main .content_right:before,
    main .content_right:after {
        display: none;
    }

    main .content_right .content_right_inner {
        margin: 0 auto;
        max-width: 460px;
        padding: 0;
        border-left: 0;
    }

    .sidebar_vote .box .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 44px;
        padding: 8px 14px;
        font-size: 14px !important;
    }

    main .content_right .content_right_inner hr {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        background-position: center;
    }

    main .content_right .content_right_inner .box_content {
        padding: 0;
    }

    main .content_right .content_right_inner .box_content form {
        max-width: 300px;
        margin: 0 auto;
        text-align: center;
    }

    main .content_right .content_right_inner .box_content form label {
        text-align: left;
        margin-left: 33px;
    }

    main .content_right .content_right_inner img {
        max-width: 100%;
        height: auto;
    }

    main .content_right .content_right_inner .discord_banner {
        margin: 0 auto;
    }

    .content_right_inner a.btn-gold,
    .content_right_inner button.btn-gold {
        display: block;
        margin: 6px auto 0;
    }

    main .content_right .content_right_inner .box_content ul.box_list li {
        padding: 11px 12px;
    }

    main .content_right .content_right_inner .box_content ul.box_list li a {
        color: #a4611a;
        font-weight: 600;
    }

    /* Generic: buttons, forms, tables */
    .d-flex .button {
        min-width: 0;
    }

    .button {
        white-space: normal;
    }

    .button__inner__label {
        height: auto;
        min-height: 2.6em;
        padding: .55em .6em;
        line-height: 1.25;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-control {
        font-size: 16px; /* below 16px iOS zooms into the field */
    }

    input.form-input {
        font-size: 16px;
    }

    .btn {
        white-space: normal;
    }

    .content_left_inner .table-responsive-auto,
    .content_left_inner figure.table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-dialog {
        margin: 10px auto;
        max-width: calc(100vw - 20px);
    }

    /* Vote shortcut above the news (logged in, see news.php) */
    .m-vote-cta {
        display: grid;
        gap: 8px;
        margin: 2px 0 18px;
    }

    .m-vote-cta__btn {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 60px;
        padding: 10px 14px;
        border-radius: 12px;
        border: 1px solid #b8862f;
        background: linear-gradient(180deg, #ffe9b0 0%, #f3c86f 55%, #dea849 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 0 2px rgba(224, 195, 156, .45), 0 6px 14px rgba(120, 80, 20, .25);
        color: #5a3b12;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: transform .1s ease, filter .1s ease;
    }

    .m-vote-cta__btn:hover,
    .m-vote-cta__btn:focus {
        color: #5a3b12;
        filter: brightness(1.03);
    }

    .m-vote-cta__btn:active {
        transform: translateY(1px);
        filter: brightness(.96);
    }

    .m-vote-cta__btn:focus-visible {
        outline: 2px solid #8b6a3e !important;
        outline-offset: 2px;
    }

    .m-vote-cta__icon {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 30%, #fff8dc 0%, #f0c35a 65%, #d29a35 100%);
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 2px 6px rgba(120, 80, 20, .35);
        color: #a4611a;
        font-size: 19px;
    }

    .m-vote-cta__icon .fa-star {
        animation: m-vote-star 2.4s ease-in-out infinite;
    }

    .m-vote-cta__text {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .m-vote-cta__title {
        font-family: 'Penumbra Serif', serif;
        font-size: 18px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .m-vote-cta__sub {
        margin-top: 2px;
        font-size: 13px;
        font-weight: 600;
        color: #6e4d1f;
    }

    .m-vote-cta__arrow {
        flex: 0 0 auto;
        color: #8a5d1f;
    }

    @keyframes m-vote-star {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.15); }
    }

    @media (prefers-reduced-motion: reduce) {
        .m-vote-cta__icon .fa-star {
            animation: none;
        }
    }

    /* Wide tables (wrapped by zz_custom.js) */
    .m-table-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }

    .m-table-scroll > table {
        margin-bottom: 0;
    }

    .m-table-scroll.has-more {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), rgba(0, 0, 0, .15));
        mask-image: linear-gradient(to right, #000 calc(100% - 40px), rgba(0, 0, 0, .15));
    }

    /* Ranking */
    .ranking_nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-bottom: 18px;
    }

    .ranking_nav span {
        display: none;
    }

    .ranking_nav a,
    .ranking_nav.ranking_nav_toplist a {
        display: inline-block;
        padding: 7px 13px;
        font-size: 14px;
        line-height: 1.3;
        border-radius: 999px;
        background: rgba(255, 255, 255, .55);
        box-shadow: inset 0 0 0 1px rgba(127, 100, 49, .3);
    }

    .ranking_nav a:active {
        background: rgba(255, 255, 255, .85);
    }

    /* Keep rank and name in view while the other columns scroll */
    table.table-ranking tbody tr td:nth-child(1),
    table.table-ranking thead tr th:nth-child(1) {
        position: sticky;
        left: 0;
        z-index: 1;
    }

    table.table-ranking tbody tr td:nth-child(2),
    table.table-ranking thead tr th:nth-child(2) {
        position: sticky;
        left: 40px;
        z-index: 1;
    }

    table.table-ranking thead tr th:nth-child(-n+2) {
        background: var(--m-parchment);
    }

    table.table-ranking th {
        white-space: normal;
        line-height: 1.2;
        padding-bottom: 4px;
        vertical-align: bottom;
    }

    .ranking_online_legend {
        margin: 12px 0;
    }

    .ranking_online_legend .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    table.table-ranking {
        font-size: 12.5px;
        width: max-content;
        min-width: 100%;
    }

    table.table-ranking th,
    table.table-ranking td {
        padding: 0 6px;
        white-space: nowrap;
    }

    table.table-ranking tbody tr td:first-child {
        width: 40px;
        padding-right: 4px;
    }

    /* Downloads */
    .download_box,
    .download_box.download_box_right {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 auto 12px;
    }

    table.table-download {
        font-size: 13px;
    }

    table.table-download tbody tr th {
        width: auto;
        padding-right: 8px;
    }

    /* Login: the user panel right below has the same form, so the page keeps only its
       message and the register / reset password buttons. The menu's login button jumps
       to the user panel (#userpanel). */
    .content_left_inner img[src*="LoginMessage.png"],
    .content_left_inner form[name="login"] .form-group,
    .content_left_inner form[name="login"] button[name="loginSend"] {
        display: none;
    }

    .content_left_inner .row > [class*="col-"]:has(> img[src*="LoginMessage.png"]) {
        display: none;
    }

    .content_left_inner .row > [class*="col-"]:has(> img[src*="LoginMessage.png"]) + [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #userpanel {
        scroll-margin-top: 76px; /* below the sticky menu bar */
    }

    form[name="login"] .float-right {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    form[name="login"] .float-right .btn {
        flex: 1 1 0;
    }

    .content_left_inner .btn {
        min-height: 44px;
    }

    .content_left_inner .btn-sm {
        min-height: 36px;
    }

    /* Tabs (information page, donation page) */
    .content_left_inner .nav-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .content_left_inner .nav-tabs .nav-link {
        padding: 8px 10px;
    }

    .download_box .db_title {
        font-size: 24px;
    }

    .rewardForm {
        flex-direction: column;
    }

    .rewardForm form .headline {
        width: auto;
    }

    .rewardForm div.or {
        line-height: 2;
    }

    /* Vote and donation pages */
    .site_vote .vote_content,
    .site_buy .buy_content {
        margin: 0;
    }

    .site_vote .vote_content .vote_middle img,
    .site_vote .vote_content .vote_bottom img {
        position: static;
        max-width: 160px;
    }

    .donation-info-container {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
        padding: 0;
    }

    #paymentProviders.nav-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }

    #paymentProviders .nav-item {
        flex: 1 1 140px;
    }

    #paymentProviders .nav-link {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: 10px 12px;
        text-align: center;
    }

    #paymentProviders .m-pm-full {
        display: none;
    }

    #paymentProviders .m-pm-short {
        display: inline;
        font-weight: 600;
    }

    .modern-render {
        margin-top: 20px;
        padding: 10px 0;
    }

    .site_buy .buy_content .donate_bottom {
        padding-top: 10px;
    }

    .site_buy .buy_content .donate_bottom img {
        position: static;
    }

    /* News list */
    .site_news .article {
        padding: .6em .2em;
    }

    .article__image__frame {
        width: 220px;
        height: auto;
        aspect-ratio: 272 / 141;
    }

    .article__image__frame img {
        width: 100%;
        height: 100%;
        margin: 0;
        object-fit: cover;
    }

    .article__details__heading {
        line-height: 1.3;
    }

    .article__details__body {
        font-size: 13px;
        line-height: 1.45;
    }

    .site_news .news_article {
        font-size: 14px;
    }

    .site_news .news_article--display.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .site_news .news_heading {
        font-size: 1.35em;
    }

    /* ---- Buttons in the site's colours: gold for main actions, brown for the rest ---- */
    :root {
        --m-btn-gold: linear-gradient(180deg, #ffe9b0 0%, #f3c86f 55%, #dea849 100%);
        --m-btn-gold-border: #b8862f;
        --m-btn-gold-text: #5a3b12;
        --m-btn-brown: linear-gradient(180deg, #9a7a58 0%, #7b5c40 100%);
        --m-btn-brown-border: #5e452f;
        --m-btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 8px rgba(80, 50, 20, .22);
    }

    /* Sidebar: login, logout and vote buttons (image buttons / grey Bootstrap button on desktop) */
    .content_right_inner a.btn-gold,
    .content_right_inner button.btn-gold,
    main .content_right .content_right_inner .box_content a.btn-gold, /* beats display:block in 03_template.css */
    .content_left_inner a.btn-gold,
    .sidebar_vote .box .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 280px;
        height: auto;
        min-height: 46px;
        margin: 10px auto 0;
        padding: 10px 16px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 12px;
        background: var(--m-btn-gold);
        box-shadow: var(--m-btn-shadow);
        color: var(--m-btn-gold-text);
        font-family: 'Penumbra Serif', serif;
        font-size: 16px !important;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: .02em;
        text-transform: uppercase;
        text-decoration: none !important;
        white-space: normal !important;
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar_vote .box .btn {
        max-width: none;
        margin-top: 0;
        font-family: inherit;
        font-size: 14px !important;
        text-transform: none;
        letter-spacing: 0;
    }

    .sidebar_vote .box .btn .fa-star {
        color: #a4611a;
    }

    .content_right_inner a.btn-gold:hover,
    .content_right_inner a.btn-gold:focus,
    .content_right_inner button.btn-gold:hover,
    .content_right_inner button.btn-gold:focus,
    .content_left_inner a.btn-gold:hover,
    .sidebar_vote .box .btn:hover,
    .sidebar_vote .box .btn:focus {
        background: var(--m-btn-gold);
        color: var(--m-btn-gold-text);
        filter: brightness(1.03);
    }

    .content_right_inner a.btn-gold:active,
    .content_right_inner button.btn-gold:active,
    .content_left_inner a.btn-gold:active,
    .sidebar_vote .box .btn:active {
        filter: brightness(.95);
        transform: translateY(1px);
    }

    /* Logout: quieter than login and vote */
    main .content_right .content_right_inner .box_content a.btn-gold[href*="logout"] {
        background: var(--m-btn-brown);
        border-color: var(--m-btn-brown-border);
        color: #fff8ec;
        /* Text 2px lower, same button height */
        padding-top: 12px;
        padding-bottom: 8px;
    }

    main .content_right .content_right_inner .box_content a.btn-gold[href*="logout"]:hover,
    main .content_right .content_right_inner .box_content a.btn-gold[href*="logout"]:focus {
        background: var(--m-btn-brown);
        color: #fff8ec;
    }

    /* Bootstrap buttons in the content */
    .content_left_inner a.btn,
    .content_left_inner button.btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .content_left_inner .btn {
        border-radius: 10px;
        font-weight: 600;
        padding: .55rem 1.1rem;
        box-shadow: var(--m-btn-shadow);
    }

    .content_left_inner .btn-secondary,
    .content_left_inner .btn-info,
    .content_left_inner .btn-dark {
        background: var(--m-btn-brown);
        border-color: var(--m-btn-brown-border);
        color: #fff8ec;
    }

    .content_left_inner .btn-primary,
    .content_left_inner .btn-warning,
    .content_left_inner .btn-success {
        background: var(--m-btn-gold);
        border-color: var(--m-btn-gold-border);
        color: var(--m-btn-gold-text);
    }

    .content_left_inner .btn-danger {
        background: linear-gradient(180deg, #c95a4f 0%, #a8403a 100%);
        border-color: #8a332e;
        color: #fff;
    }

    .content_left_inner .btn:active {
        filter: brightness(.95);
    }

    /* Language / server switches above news, donation and donor lists: pills */
    .content_left_inner .d-flex > a.button {
        margin: 0 4px;
        padding: 0;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, .55);
        box-shadow: 0 2px 6px rgba(80, 50, 20, .15);
    }

    .content_left_inner .d-flex > a.button:first-child { margin-left: 0; }
    .content_left_inner .d-flex > a.button:last-child { margin-right: 0; }

    .content_left_inner .d-flex > a.button .button__inner {
        padding: 0;
        border-radius: 999px;
        background: transparent;
        box-shadow: none;
    }

    .content_left_inner .d-flex > a.button .button__inner::before,
    .content_left_inner .d-flex > a.button .button__inner::after,
    .content_left_inner .d-flex > a.button .button__inner__highlight {
        display: none;
    }

    .content_left_inner .d-flex > a.button .button__inner__label {
        min-height: 42px;
        padding: 8px 12px;
        color: #8a6d57;
        font-size: 14px;
        letter-spacing: .03em;
    }

    .content_left_inner .d-flex > a.button.active {
        background: var(--m-btn-gold);
        box-shadow: var(--m-btn-shadow);
    }

    .content_left_inner .d-flex > a.button.active .button__inner__label {
        color: var(--m-btn-gold-text);
    }

    /* Hint above wide tables (set by zz_custom.js while more columns are hidden) */
    .m-table-hint {
        display: none;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin: 0 0 6px;
        font-size: 12px;
        font-weight: 600;
        color: #8a6d57;
    }

    .m-table-hint.is-visible {
        display: flex;
    }

    .m-table-hint .fa-arrows-alt-h {
        animation: m-table-hint 1.6s ease-in-out infinite;
    }

    @keyframes m-table-hint {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(4px); }
    }

    @media (prefers-reduced-motion: reduce) {
        .m-table-hint .fa-arrows-alt-h {
            animation: none;
        }
    }

    /* Current page in the menu */
    nav.is-open > a.is-current,
    nav.is-open > div.dropdown > a.is-current {
        color: var(--m-btn-gold-text);
        background: rgba(255, 233, 176, .7);
        border-radius: 8px;
        box-shadow: inset 3px 0 0 #c9973e;
    }

    /* Back to top (created by zz_custom.js) */
    .m-scroll-top {
        position: fixed;
        right: 15px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        z-index: 1040;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid rgba(184, 134, 47, .55);
        border-radius: 50%;
        background: rgba(246, 232, 208, .72);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
        color: #7d6555;
        font-size: 15px;
        opacity: 0;
        transform: translateY(12px);
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    /* With reCAPTCHA on the page its badge takes the bottom right corner (60px high, 14px from
       the bottom): the button sits right above it, centred on the visible part of the badge */
    html:has(.grecaptcha-badge) .m-scroll-top {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .m-scroll-top.is-visible {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .m-scroll-top:active {
        background: rgba(246, 232, 208, .95);
    }

    .m-scroll-top:focus-visible {
        outline: 2px solid #8b6a3e;
        outline-offset: 2px;
    }
}

/* One column: the footer goes below the sidebar */
@media (max-width: 899.98px) {
    main > .row {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap; /* with wrap, the line takes the width of the widest content */
    }

    main .content_left {
        display: contents;
    }

    main > .row > *,
    main .content_left > * {
        min-width: 0;
    }

    main .content_left .slider { order: 1; }
    main .content_left .content_left_inner { order: 2; }
    main .content_right { order: 3; }
    main .content_left .content_left_footer { order: 4; }
    main > .row > .clearfix { display: none; }
}

/* Tablet: content and sidebar side by side */
@media (min-width: 900px) and (max-width: 1099.98px),
       (min-width: 900px) and (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    main > .row {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: var(--m-gap);
    }

    main .content_left {
        flex: 1 1 0;
        min-width: 0;
    }

    main .content_right {
        flex: 0 0 300px;
        margin-top: 0;
    }

    main > .row > .clearfix {
        display: none;
    }
}

/* Below Bootstrap's md breakpoint: toggle switches stay next to their text */
@media (max-width: 767.98px) {
    .content_left_inner .row > .col-md-1 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        padding-right: 0;
    }

    .content_left_inner .row > .col-md-1 + .col-md-11 {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Phones */
@media (max-width: 599.98px) {
    /* The slider stays on the start page; sub pages start with their content */
    body:not(.site_):not(.site_news) main .content_left .slider {
        display: none;
    }

    /* Ranking as cards: rank and name on top, the other columns as labelled values
       (labels from the table head, set by zz_custom.js) - no sideways swiping */
    .m-table-scroll > table.table-ranking,
    table.table-ranking,
    table.table-ranking tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    table.table-ranking thead {
        display: none;
    }

    .ranking_online_legend .rol_content span {
        background-color: #ddd3c9;
        border-radius: 4px;
    }

    .ranking_online_legend .rol_content.online span {
        background-color: #cfe1c2;
    }

    table.table-ranking tbody tr {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 12px;
        min-height: 56px;
        margin-bottom: 8px;
        padding: 9px 12px 9px 54px;
        border: 1px solid #beb4aa;
        border-radius: 12px;
        background: #ddd3c9;
    }

    table.table-ranking tbody tr.state_online {
        background: #cfe1c2;
        border-color: #a9c495;
    }

    table.table-ranking tbody tr td,
    table.table-ranking tbody tr td:first-child,
    table.table-ranking tbody tr td:last-child,
    table.table-ranking tbody tr.state_online td {
        position: static;
        display: block;
        width: auto;
        height: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-align: left;
        white-space: normal;
        font-size: 12.5px;
    }

    table.table-ranking tbody tr td:first-child {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        border-right: 1px solid rgba(0, 0, 0, .08);
        font-weight: 700;
        font-size: 14px;
    }

    table.table-ranking tbody tr td:nth-child(2) {
        position: static;
        flex: 1 0 100%;
        font-size: 15px;
        font-weight: 600;
    }

    table.table-ranking tbody tr td:nth-child(n+3)[data-label]::before {
        content: attr(data-label) ": ";
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .02em;
        opacity: .65;
    }

    .site_news .article {
        flex-direction: column;
    }

    .article__image {
        flex: none;
    }

    .article__image__frame {
        display: block;
        width: 100%;
        margin: 0 0 .6em;
        border-radius: 8px;
    }

    .article__image__frame .ribbon {
        transform: scale(.75);
        transform-origin: top right;
    }

    .site_news .article:hover .article__image__frame {
        transform: none;
    }

    .article__details__body {
        max-height: none;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .article__details__meta {
        flex: none;
        margin-top: 4px;
    }
}

/* Reward page (accountpanel&page=rewards): bar, milestone cards and tap previews (zz_custom.js) */
@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    #entropiaReward {
        width: calc(100% - 28px) !important;
        margin: 18px auto 34px !important;
        text-align: left;
        display: block !important; /* the plugin makes it inline-block: extra line gap */
        min-height: 48px; /* height of the finished bar: no jump when the bar script runs */
    }

    /* Keep the bar margins inside its box before and after the plugin runs (same height) */
    .text-center:has(> #entropiaReward) {
        display: flow-root;
    }

    #entropiaReward .bi-titleSpan {
        font-weight: 600;
    }

    #entropiaReward .bi-bar {
        height: 14px !important;
        border-radius: 999px;
        background: #e6d5c4;
    }

    #entropiaReward .bi-barInner {
        border-radius: 999px;
    }

    /* Hover labels are replaced by the preview sheet; one round marker per level */
    #entropiaReward .bi-mlst-label,
    #entropiaReward .bi-mlst-innerLine,
    #entropiaReward .bi-milestone.bottom {
        display: none !important;
    }

    #entropiaReward .bi-milestone {
        width: 28px !important;
        height: 28px !important;
        margin-left: -14px !important;
        margin-top: -14px !important;
        -webkit-tap-highlight-color: transparent;
    }

    #entropiaReward .bi-milestone::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        height: 16px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: #cbb9a6;
        border: 2px solid #fff8ec;
        box-shadow: 0 1px 3px rgba(80, 50, 20, .35);
    }

    #entropiaReward .bi-milestone.is-claimed::after {
        background: #5cb85c;
    }

    #entropiaReward .bi-milestone.is-open::after {
        background: #f3c86f;
        box-shadow: 0 0 0 3px rgba(243, 200, 111, .45), 0 1px 3px rgba(80, 50, 20, .35);
    }

    .m-rw {
        display: block;
        margin: 0 -12px 18px;
    }

    /* Server-rendered placeholder: same height as the filled strip, so nothing jumps */
    .m-rw:empty {
        min-height: 184px;
    }

    /* "Claim" in the preview jumps here: keep the form clear of the sticky menu */
    .rewardForm {
        scroll-margin-top: 76px;
    }

    .m-rw__hint {
        margin: 0 12px 8px;
        font-size: 13px;
        color: #8a7a6d;
        text-align: center;
    }

    .m-rw__track {
        display: flex;
        gap: 10px;
        padding: 4px 12px 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding-left: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .m-rw__track::-webkit-scrollbar {
        display: none;
    }

    .m-rw__item {
        flex: 0 0 108px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 8px 6px 10px;
        scroll-snap-align: start;
        background: #fff8ec;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 14px;
        box-shadow: 0 2px 6px rgba(80, 50, 20, .12);
        color: var(--m-text);
        font: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .m-rw__item:active {
        transform: translateY(1px);
    }

    .m-rw__item.is-open {
        border-color: #b8862f;
        box-shadow: 0 0 0 2px rgba(243, 200, 111, .6), 0 2px 6px rgba(80, 50, 20, .15);
    }

    .m-rw__thumb {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 92px;
        height: 76px;
        overflow: hidden;
        border-radius: 10px;
        background: radial-gradient(circle at 50% 55%, #fffaf0 0%, #f0e2cf 75%);
    }

    .m-rw__thumb--t5,
    .m-rw__thumb--t6 {
        background: radial-gradient(circle at 50% 55%, #fff6d8 0%, #f3dca6 80%);
    }

    .m-rw__thumb svg {
        width: 70px;
        height: 70px;
        filter: drop-shadow(0 2px 2px rgba(80, 50, 20, .25));
    }

    .m-rw__item.is-locked .m-rw__thumb svg {
        filter: saturate(.7) drop-shadow(0 2px 2px rgba(80, 50, 20, .2));
    }

    .m-rw__item.is-claimed .m-rw__thumb svg {
        opacity: .75;
    }

    /* Reward claim: character select and Claim button with the same height and rounding */
    .rewardForm .input-group > .custom-select {
        height: 44px;
        font-size: 14px;
    }

    .rewardForm .input-group > .custom-select:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .rewardForm .input-group > .input-group-append > .btn {
        height: 44px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .m-rw__pts {
        font-family: 'Penumbra Serif', serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1;
        color: #a4611a;
    }

    .m-rw__chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
    }

    .m-rw__chip.is-claimed { background: #dcefd5; color: #2f6b2f; }
    .m-rw__chip.is-open { background: #fbe7b8; color: #6b4612; }
    .m-rw__chip.is-locked { background: #ece2d7; color: #7d6d60; }

    /* Preview sheet */
    html.m-rw-locked,
    html.m-rw-locked body {
        overflow: hidden;
    }

    .m-rw-sheet {
        position: fixed;
        inset: 0;
        z-index: 2000;
    }

    .m-rw-sheet[hidden] {
        display: none;
    }

    .m-rw-sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(10, 8, 6, .6);
        animation: m-rw-fade .2s ease;
    }

    .m-rw-sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 560px;
        max-height: 90vh;
        max-height: 90dvh;
        margin: 0 auto;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--m-parchment);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
        color: var(--m-text);
        text-align: center;
        animation: m-rw-up .25s ease;
    }

    .m-rw-sheet__close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 50%;
        background: rgba(127, 100, 49, .12);
        color: #7d6555;
        font-size: 18px;
    }

    .m-rw-sheet__title {
        margin: 4px 44px 6px;
        font-size: 16px;
    }

    .m-rw-sheet__title b {
        color: #2f8f3a;
    }

    .m-rw-sheet__status {
        margin: 0 0 10px;
        font-size: 13px;
        font-weight: 600;
    }

    .m-rw-sheet__status.is-claimed { color: #2f6b2f; }
    .m-rw-sheet__status.is-locked { color: #a4611a; }

    .m-rw-sheet__opt {
        margin: 0;
    }

    .m-rw-sheet__opt img {
        display: block;
        max-width: 100%;
        max-height: 34vh;
        max-height: 34dvh;
        margin: 0 auto;
        border-radius: 12px;
    }

    .m-rw-sheet__opt figcaption {
        margin-top: 6px;
        font-family: 'Penumbra Serif', serif;
        font-size: 15px;
        font-weight: 600;
        color: #7d6555;
    }

    .m-rw-sheet__or {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 10px 0;
        font-size: 12px;
        font-weight: 700;
        color: #a2826d;
    }

    .m-rw-sheet__or::before,
    .m-rw-sheet__or::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(127, 100, 49, .3);
    }

    .m-rw-sheet__opts.is-single .m-rw-sheet__opt img {
        max-height: 58vh;
        max-height: 58dvh;
    }

    .m-rw-sheet__go {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 160px;
        min-height: 46px;
        margin-top: 14px;
        padding: 10px 20px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 12px;
        background: var(--m-btn-gold);
        box-shadow: var(--m-btn-shadow);
        color: var(--m-btn-gold-text);
        font-family: 'Penumbra Serif', serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
        text-transform: uppercase;
    }

    @keyframes m-rw-up {
        from { transform: translateY(100%); }
        to { transform: none; }
    }

    @keyframes m-rw-fade {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @media (prefers-reduced-motion: reduce) {
        .m-rw-sheet__panel,
        .m-rw-sheet__backdrop {
            animation: none;
        }
    }
}

/* Account management menu (accountpanel): rounded tiles with icons instead of grey blocks */
@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    .account_info_nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        font-size: 14px;
    }

    @media (min-width: 600px) {
        .account_info_nav {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    .account_info_nav a,
    .account_info_nav a[style] {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 48px;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid rgba(127, 100, 49, .35);
        border-radius: 12px;
        background: #fff8ec !important;
        box-shadow: 0 2px 6px rgba(80, 50, 20, .12);
        color: #6b4a2e;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
    }

    .account_info_nav a::before {
        flex: none;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 15px;
        color: #a4611a;
        content: "\f007"; /* My Account */
    }

    .account_info_nav a[href*="page=transactions"]::before { content: "\f543"; }
    .account_info_nav a[href*="page=purchases"]::before { content: "\f290"; }
    .account_info_nav a[href*="page=logins"]::before { content: "\f1da"; }
    .account_info_nav a[href*="page=promocode"]::before { content: "\f3ff"; }
    .account_info_nav a[href*="page=rewards"]::before { content: "\f06b"; }
    .account_info_nav a[href*="page=loyaltyreward"]::before { content: "\f521"; }

    .account_info_nav a:hover,
    .account_info_nav a:focus {
        background: #fff8ec !important;
        color: #6b4a2e;
    }

    .account_info_nav a:active {
        transform: translateY(1px);
    }

    /* Current page: gold like the main buttons */
    .account_info_nav a.active,
    .account_info_nav a.active:hover,
    .account_info_nav a.active:focus {
        border-color: var(--m-btn-gold-border);
        background: var(--m-btn-gold) !important;
        box-shadow: var(--m-btn-shadow);
        color: var(--m-btn-gold-text);
    }

    .account_info_nav a.active::before {
        color: var(--m-btn-gold-text);
    }

    /* Loyalty Reward keeps its own row and its accent (inline red-brown on desktop) */
    .account_info_nav a[href*="page=loyaltyreward"] {
        grid-column: 1 / -1;
    }

    .account_info_nav a[href*="page=loyaltyreward"]:not(.active) {
        border-color: #7a3f3f;
        background: linear-gradient(180deg, #b0706a 0%, #8f4f4b 100%) !important;
        color: #fff8ec;
    }

    .account_info_nav a[href*="page=loyaltyreward"]:not(.active)::before {
        color: #ffe3a3;
    }
}

/* Open mobile menu: an icon in front of every entry */
@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    nav.is-open > a:not(.nav-account),
    nav.is-open > .dropdown > a {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    nav.is-open > a:not(.nav-account)::before,
    nav.is-open > .dropdown > a::before {
        flex: none;
        width: 1.25em;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 15px;
        line-height: 1;
        text-align: center;
        color: #a4611a;
        content: "\f105"; /* fallback: angle-right */
    }

    nav.is-open > a[href*="site=news"]::before { content: "\f015"; }          /* home */
    nav.is-open > a[href*="wiki."]::before { content: "\f02d"; }              /* book */
    nav.is-open > a[href*="site=downloads"]::before { content: "\f019"; }     /* download */
    nav.is-open > a[href*="site=ranking"]::before { content: "\f091"; }       /* trophy */
    nav.is-open > a[href*="site=faq"]::before { content: "\f059"; }           /* question */
    nav.is-open > a[href*="site=rules"]::before { content: "\f70e"; }         /* scroll */
    nav.is-open > .dropdown > a[href*="site=buy"]::before { content: "\f3a5"; } /* gem */
    nav.is-open > a[href*="page=rewards"]::before { content: "\f06b"; }       /* gift */
    nav.is-open > a[href*="site=donorOfTheMonth"]::before { content: "\f521"; } /* crown */
    nav.is-open > a[href*="site=support"]::before { content: "\f590"; }       /* headset */
    nav.is-open > a[href*="site=register"]::before { content: "\f234"; }      /* user-plus */
    nav.is-open > a[href*="logout"]::before { content: "\f2f5"; }             /* sign-out */

    nav.is-open > a.is-current::before,
    nav.is-open > .dropdown > a.is-current::before {
        color: inherit;
    }
}

/* ---- Content pages on small screens: user panel server title, downloads, FAQ, rules, top donators ---- */
@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    /* Empty spacer paragraphs (&nbsp;) between blocks, marked by zz_custom.js */
    .content_left_inner .m-spacer,
    .site_downloads .content_left_inner > p:has(+ ul),
    .site_downloads .content_left_inner > ul + p,
    .site_downloads .content_left_inner > ul + p + p,
    .site_downloads .content_left_inner > .row + p,
    .site_downloads .content_left_inner > .row + p + p,
    .site_donorOfTheMonth .content_left_inner > p:has(+ hr) {
        display: none;
    }

    /* User panel: server name as a badge instead of a dashed rule */
    #userpanel .box_list > li > h2.dashed {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin: 2px 0 10px;
        padding: 7px 12px;
        overflow: visible;
        border: 1px solid rgba(127, 100, 49, .35);
        border-radius: 999px;
        background: linear-gradient(180deg, #fbf1df 0%, #f0dfc4 100%);
        font-family: 'Penumbra Serif', serif;
        font-size: 15px !important;
        font-weight: 700;
        line-height: 1.2;
        color: #6b4a2e;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    #userpanel .box_list > li > h2.dashed::before {
        content: "\f233"; /* server */
        position: static;
        display: inline;
        width: auto;
        height: auto;
        margin: 0;
        background: none;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 13px;
        color: #a4611a;
    }

    #userpanel .box_list > li > h2.dashed::after {
        display: none;
    }

    #userpanel .box_list > li > h2.dashed .up-cluster-sub {
        font-size: 0; /* hides " (" and ")" around the tag */
    }

    #userpanel .box_list > li > h2.dashed .m-sub {
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(164, 97, 26, .14);
        font-size: 11px;
        letter-spacing: .02em;
        color: #8a5a22;
    }

    /* ---- Downloads ---- */
    .site_downloads .content_left_inner > ul {
        margin: 0 0 16px;
        padding: 0;
        list-style: none !important;
    }

    .site_downloads .content_left_inner > ul li {
        margin: 0 0 8px;
    }

    .site_downloads .content_left_inner > ul li a {
        position: relative;
        display: block;
        min-height: 52px;
        padding: 15px 34px 15px 56px;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 12px;
        background: #fff8ec;
        box-shadow: 0 2px 6px rgba(80, 50, 20, .1);
        color: #6b4a2e;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        text-decoration: none !important;
    }

    .site_downloads .content_left_inner > ul li a::before {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #f7dcd6;
        color: #b5372c;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 14px;
        content: "\f019"; /* download: required runtimes */
    }

    .site_downloads .content_left_inner > ul li a[href*="gameerror"]::before {
        background: #d9e8f7;
        color: #1f6fb5;
        content: "\f059"; /* question: start problems */
    }

    .site_downloads .content_left_inner > ul li a::after {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 12px;
        color: #b8976d;
        content: "\f054"; /* chevron right */
    }

    .site_downloads .download_box,
    .site_downloads .download_box.download_box_right {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 12px;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 72px;
        margin: 0 0 10px;
        padding: 12px 14px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 14px;
        background: var(--m-btn-gold);
        box-shadow: var(--m-btn-shadow);
        color: var(--m-btn-gold-text);
        text-align: left;
    }

    .site_downloads .download_box::before {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .55);
        box-shadow: inset 0 0 0 1px rgba(127, 100, 49, .25);
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 18px;
        content: "\f019";
    }

    .site_downloads .download_box:active {
        transform: translateY(1px);
        filter: brightness(.97);
    }

    .site_downloads .download_box .db_title {
        flex: 1 1 auto;
        padding: 0;
        font-family: 'Penumbra Serif', serif;
        font-size: 20px;
        line-height: 1.1;
    }

    .site_downloads .download_box .db_server,
    .site_downloads .download_box .db_date {
        padding: 0;
        font-size: 12px;
    }

    .site_downloads .download_box .db_server {
        order: 3;
        flex: 1 1 calc(100% - 56px);
        margin-left: 56px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .site_downloads .download_box .db_date {
        flex: none;
        padding: 3px 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .5);
        font-weight: 600;
    }

    /* System requirements: rounded table; cards on phones (below) */
    table.table-download {
        border-collapse: separate;
        border-spacing: 0;
        overflow: hidden;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 12px;
        background: #fff8ec;
        font-size: 13px;
    }

    table.table-download thead th {
        padding: 8px;
        background: #efe0c9;
        color: #6b4a2e;
    }

    table.table-download tbody th,
    table.table-download tbody td {
        padding: 8px;
        border-top: 1px solid rgba(127, 100, 49, .15);
    }

    /* ---- FAQ: accordion, styled from the first paint; zz_custom.js only makes the questions
       clickable (role=button), so the page does not flash the plain list first ---- */
    .site_faq .content_left_inner > ul.list-links,
    .site_faq .content_left_inner > article + p {
        display: none;
    }

    .site_faq .content_left_inner > article {
        margin: 0 0 10px;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 14px;
        background: #fff8ec;
        box-shadow: 0 2px 6px rgba(80, 50, 20, .1);
        overflow: hidden;
        scroll-margin-top: 76px;
    }

    .site_faq .content_left_inner > article > h4 {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 54px;
        margin: 0;
        padding: 12px 14px;
        color: #6b4a2e;
        font-family: inherit;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .site_faq .content_left_inner > article > h4:focus-visible {
        outline: 2px solid #8b6a3e;
        outline-offset: -2px;
    }

    .site_faq .content_left_inner > article > h4::before {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #f3e3c7;
        color: #a4611a;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 13px;
        content: "\f128"; /* question */
    }

    .site_faq .content_left_inner > article > h4::after {
        flex: none;
        margin-left: auto;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 13px;
        color: #b8976d;
        content: "\f078"; /* chevron down */
        transition: transform .2s ease;
    }

    .site_faq .content_left_inner > article.is-open > h4::after {
        transform: rotate(180deg);
    }

    .site_faq .content_left_inner > article > hr {
        display: none;
    }

    .site_faq .content_left_inner > article > p {
        display: none;
        margin: 0;
        padding: 0 16px 14px 52px;
        font-size: 14px;
        line-height: 1.55;
    }

    .site_faq .content_left_inner > article.is-open > p {
        display: block;
    }

    /* ---- Rules: one card per paragraph, index chips on top ---- */
    .m-rule-index {
        display: flex;
        gap: 6px;
        margin: 0 -12px 14px;
        padding: 2px 12px 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .m-rule-index::-webkit-scrollbar {
        display: none;
    }

    .m-rule-index a {
        flex: none;
        padding: 6px 12px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, .6);
        color: #6b4a2e;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
        text-decoration: none !important;
    }

    .site_rules .rule-item {
        margin: 0 0 12px;
        padding: 14px 14px 12px;
        border: 1px solid rgba(127, 100, 49, .3);
        border-left: 4px solid #d8ae5e;
        border-radius: 14px;
        background: #fff8ec;
        box-shadow: 0 2px 6px rgba(80, 50, 20, .1);
        scroll-margin-top: 76px;
    }

    .site_rules .rule-item > h4 {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 8px;
        font-family: 'Penumbra Serif', serif;
        font-size: 18px;
        line-height: 1.25;
        color: #6b4a2e;
    }

    .site_rules .rule-item__no {
        flex: none;
        padding: 4px 10px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 999px;
        background: var(--m-btn-gold);
        color: var(--m-btn-gold-text);
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
    }

    .site_rules .rule-item__sep,
    .site_rules .rule-item__spacer {
        display: none;
    }

    .site_rules .rule-item__text {
        font-size: 14px;
        line-height: 1.6;
    }

    .site_rules .rule-item__text p:last-child {
        margin-bottom: 0;
    }

    /* ---- Top donators ---- */
    .site_donorOfTheMonth .content_left_inner p[style*="1.5em"] {
        font-size: 1em !important;
    }

    .site_donorOfTheMonth .content_left_inner p > a[href$="site=buy"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        padding: 10px 20px;
        border: 1px solid var(--m-btn-gold-border);
        border-radius: 12px;
        background: var(--m-btn-gold);
        box-shadow: var(--m-btn-shadow);
        color: var(--m-btn-gold-text);
        font-family: 'Penumbra Serif', serif;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none !important;
    }

    .site_donorOfTheMonth .content_left_inner p > a[href$="site=buy"]::before {
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        content: "\f3a5"; /* gem */
    }

    .site_donorOfTheMonth .content_left_inner p[style*=".9em"] {
        font-size: 14px !important;
        line-height: 1.55;
    }

    /* The page's own <style> sets every table to 694px with black borders */
    .site_donorOfTheMonth .content_left_inner table,
    .site_donorOfTheMonth .content_left_inner table.table {
        width: 100% !important;
        margin: 14px 0 !important;
        border-collapse: separate;
        border-spacing: 0;
        overflow: hidden;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 14px;
        background: #fff8ec;
        font-size: 13px;
    }

    .site_donorOfTheMonth .content_left_inner th,
    .site_donorOfTheMonth .content_left_inner td {
        padding: 8px 10px;
        border: 0;
        border-top: 1px solid rgba(127, 100, 49, .15);
        background: transparent;
    }

    .site_donorOfTheMonth .content_left_inner thead th {
        border-top: 0;
        background: #efe0c9;
        color: #6b4a2e;
        font-weight: 700;
    }

    /* Donator of last month / this month: podium list with medals */
    .site_donorOfTheMonth .content_left_inner table.table-striped thead th {
        padding: 10px 12px;
        background: linear-gradient(180deg, #5b4636 0%, #3f3027 100%);
        color: #fbe7b8;
        font-family: 'Penumbra Serif', serif;
        font-size: 16px;
    }

    .site_donorOfTheMonth .content_left_inner table.table-striped thead.thead-light th {
        background: #efe0c9;
        color: #6b4a2e;
    }

    .site_donorOfTheMonth table.table-striped thead th::before {
        margin-right: 8px;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        content: "\f521"; /* crown */
    }

    .site_donorOfTheMonth table.table-striped thead.thead-light th::before {
        content: "\f201"; /* chart */
    }

    .site_donorOfTheMonth .content_left_inner table.table-striped tbody tr:nth-of-type(odd) {
        background: transparent;
    }

    .site_donorOfTheMonth .content_left_inner table.table-striped tbody td {
        padding: 10px 8px;
        vertical-align: middle;
        font-size: 14px;
    }

    .site_donorOfTheMonth .content_left_inner table.table-striped tbody td:first-child {
        width: 56px;
        font-size: 0 !important; /* "#01" is shown as a medal */
        text-align: center;
    }

    .site_donorOfTheMonth table.table-striped tbody td:first-child::before {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #efe0c9;
        color: #6b4a2e;
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 14px;
        content: "\f5a2"; /* medal */
    }

    .site_donorOfTheMonth table.table-striped tbody tr:nth-child(1) td:first-child::before { background: linear-gradient(180deg, #ffe9a8, #e1b03f); color: #6b4612; }
    .site_donorOfTheMonth table.table-striped tbody tr:nth-child(2) td:first-child::before { background: linear-gradient(180deg, #f1f3f6, #b9c0ca); color: #4b5563; }
    .site_donorOfTheMonth table.table-striped tbody tr:nth-child(3) td:first-child::before { background: linear-gradient(180deg, #f3c9a0, #c4834a); color: #5e3512; }

    .site_donorOfTheMonth .content_left_inner table.table-striped tbody td:nth-child(2) {
        font-weight: 700;
        color: #5f4a3a;
    }

    .site_donorOfTheMonth .content_left_inner table.table-striped tbody td:last-child {
        text-align: right;
        white-space: normal;
        font-size: 13px;
        line-height: 1.3;
        color: #a4611a;
        font-weight: 600;
    }

    .site_donorOfTheMonth h4.text-info {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 8px 0;
        padding: 10px 14px;
        border-radius: 12px;
        background: #e7f1f8;
        color: #1f5f8b !important;
        font-size: 15px;
        line-height: 1.3;
    }

    .site_donorOfTheMonth .content_left_inner img[style*="706px"] {
        width: 100% !important;
        height: auto !important;
        border-radius: 12px;
    }

    .site_donorOfTheMonth .content_left_inner div[style*="margin-left: -6px"] {
        margin-left: 0 !important;
    }
}

/* Phones: requirement and pet tables as cards (column labels from zz_custom.js) */
@media (max-width: 599.98px) {
    table.table-download,
    table.table-download tbody,
    .site_donorOfTheMonth .content_left_inner table.m-cards,
    .site_donorOfTheMonth .content_left_inner table.m-cards tbody {
        display: block;
        width: 100% !important;
    }

    table.table-download,
    .site_donorOfTheMonth .content_left_inner table.m-cards {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    table.table-download thead,
    .site_donorOfTheMonth .content_left_inner table.m-cards thead {
        display: none;
    }

    table.table-download tbody tr,
    .site_donorOfTheMonth .content_left_inner table.m-cards tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: auto;
        margin: 0 0 8px;
        overflow: hidden;
        border: 1px solid rgba(127, 100, 49, .3);
        border-radius: 12px;
        background: #fff8ec;
    }

    table.table-download tbody tr th,
    .site_donorOfTheMonth .content_left_inner table.m-cards tbody td:first-child {
        grid-column: 1 / -1;
        width: auto;
        padding: 8px 12px !important;
        border: 0 !important;
        background: #efe0c9 !important;
        color: #6b4a2e;
        font-weight: 700;
        text-align: left;
    }

    table.table-download tbody tr td,
    .site_donorOfTheMonth .content_left_inner table.m-cards tbody td {
        padding: 8px 12px !important;
        border: 0 !important;
        text-align: left !important;
    }

    .site_donorOfTheMonth .content_left_inner table.m-cards tbody td:last-child:not(:first-child) {
        grid-column: 1 / -1;
    }

    .site_donorOfTheMonth .content_left_inner table.m-cards tbody td:empty {
        display: none;
    }

    table.table-download tbody td[data-label]::before,
    .site_donorOfTheMonth .content_left_inner table.m-cards tbody td[data-label]:not(:first-child)::before {
        display: block;
        margin-bottom: 2px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
        color: #a2826d;
        content: attr(data-label);
    }
}

/* Guild sieges (ranking&page=sieges): guilds and players one below the other instead of side by side */
@media (max-width: 1099.98px), (max-width: 1499.98px) and (hover: none) and (pointer: coarse) {
    .guildSiege .results {
        flex-direction: column;
    }

    .guildSiege .results .guilds,
    .guildSiege .results .players {
        flex-basis: auto;
        width: 100%;
    }

    .guildSiege .results .guilds {
        margin-bottom: 18px;
    }

    .guildSiege table thead td,
    .guildSiege table tbody td {
        padding: 4px 6px;
    }

    /* Long guild names may break anywhere; the siege info table (No., mode, dates) keeps whole words */
    .guildSiege .results td {
        overflow-wrap: anywhere;
    }

    .guildSiege table.general td.w15 {
        width: auto;
    }
}

/* Phones: one card per player - rank, name, then guild, job and points with labels */
@media (max-width: 599.98px) {
    .guildSiege .results .players table,
    .guildSiege .results .players tbody {
        display: block;
    }

    .guildSiege .results .players thead {
        display: none;
    }

    .guildSiege .results .players tbody tr {
        display: grid;
        grid-template-columns: 40px 1.4fr 1fr;
        grid-template-areas:
            "rank name name"
            "rank guild guild"
            "rank job points";
        column-gap: 8px;
        row-gap: 2px;
        height: auto;
        margin: 0 0 6px;
        padding: 8px 10px;
        border-radius: 10px;
        background-color: rgba(1, 1, 1, .05);
    }

    .guildSiege .results .players tbody td {
        padding: 0;
        border-radius: 0 !important;
        background: transparent;
        text-align: left;
    }

    .guildSiege .results .players tbody td:nth-child(1) {
        grid-area: rank;
        align-self: center;
        text-align: center;
    }

    .guildSiege .results .players tbody td:nth-child(2) {
        grid-area: name;
        font-weight: 700;
        font-size: 15px;
    }

    .guildSiege .results .players tbody td:nth-child(3) { grid-area: guild; }
    .guildSiege .results .players tbody td:nth-child(4) { grid-area: job; }
    .guildSiege .results .players tbody td:nth-child(5) { grid-area: points; }

    .guildSiege .results .players tbody td[data-label]::before {
        content: attr(data-label) ": ";
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
        color: #a2826d;
    }
}
