body {
    --header-text: #17150f;
    --header-a: rgba(23, 21, 15, 0.62);
    --header-a-hover: #17150f;
    --header-name: #17150f;
    --header-link-hover-bg: rgba(23, 21, 15, 0.06);
    --footer-bgcolor: var(--color-footer-background);
    --footer: rgba(23, 21, 15, 0.55);
    --footer-a: rgba(23, 21, 15, 0.68);
    --footer-table-title: rgba(23, 21, 15, 0.45);
    --footer-text: rgba(23, 21, 15, 0.6);
    --footer-hover: #17150f;
}

html[data-theme=dark] body {
    --header-text: #f5f3ed;
    --header-a: rgba(245, 243, 237, 0.62);
    --header-a-hover: #f5f3ed;
    --header-name: #f5f3ed;
    --header-link-hover-bg: rgba(245, 243, 237, 0.08);
    --footer-bgcolor: var(--color-footer-background);
    --footer: rgba(245, 243, 237, 0.5);
    --footer-a: rgba(245, 243, 237, 0.68);
    --footer-table-title: rgba(245, 243, 237, 0.42);
    --footer-text: rgba(245, 243, 237, 0.55);
    --footer-hover: #f5f3ed;
}

.skip-to-content {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1000000;
    background: var(--color-text-primary);
    color: var(--color-page-background);
    border: none;
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--motion-ease-out), transform 0.25s var(--motion-ease-out);
}

.skip-to-content:focus {
    outline: none;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* header */
#hcont .placeHolder {
    height: 78px;
}

/* Mobile open/close restores the pre-redesign choreography without delaying
   scroll-driven transitions into the transparent header state. */
#hcont .header {
    transition: background-color 0.1s, backdrop-filter 0.05s 0.05s, -webkit-backdrop-filter 0.05s 0.05s, height 0.7s, overflow-y 0s 0.7s;
}

#hcont .header:not([open]).hidden {
    transition: background-color 0.1s, backdrop-filter 0.05s, -webkit-backdrop-filter 0.05s, height 0.7s, overflow-y 0s 0.7s;
}

#hcont .header:not([open]).hidden *:not(.right, .menu-toggle, .menu-toggle .bar) {
    transition: color 0.1s, visibility 0.1s, transform 0.7s !important;
}

#hcont .header:not([open]).hidden .left,
#hcont .header:not([open]).hidden .left * {
    transition: color 0.1s, visibility 0.1s, opacity 0.1s, transform 0.7s !important;
}

/* Preserve the legacy stagger only while the mobile menu is closing. */
@media (max-width: 699.99999px) {
    #hcont .header[data-closing]:not([open]).hidden {
        transition: background-color 0.1s 0.5s, backdrop-filter 0.05s 0.55s, -webkit-backdrop-filter 0.05s 0.55s, height 0.7s, overflow-y 0s 0.7s;
    }

    #hcont .header[data-closing]:not([open]).hidden *:not(.right, .menu-toggle, .menu-toggle .bar) {
        transition: color 0.1s 0.5s, visibility 0.1s 0.5s, transform 0.7s !important;
    }

    #hcont .header[data-closing]:not([open]).hidden .left,
    #hcont .header[data-closing]:not([open]).hidden .left * {
        transition: color 0.1s 0.2s, visibility 0.1s 0.5s, opacity 0.1s 0.5s, transform 0.7s !important;
    }
}

#hcont .header:not([open]) *:not(.right, .menu-toggle, .menu-toggle .bar) {
    transition: color 0.1s, visibility 0.1s 0.5s, opacity 0.1s, transform 0.7s !important;
}

#hcont .header.hidetitle:not([open]) .left {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 700px) {
    #hcont .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 62px;
        padding: 0 10%;
        box-sizing: border-box;
        z-index: 100;
        border-bottom: 1px solid var(--color-border-subtle);
        -webkit-backdrop-filter: blur(24px) saturate(1.8);
        backdrop-filter: blur(24px) saturate(1.8);
        background-color: var(--glass-background);
        color: var(--header-text);
    }

    #hcont .header.hidden {
        background: none;
        border-bottom-color: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    #hcont .header * {
        margin: 0;
        padding: 0;
    }

    #hcont .header .left {
        display: flex;
        align-items: center;
        gap: 9px;
        border: none;
        background: none;
        color: var(--header-a);
        font-weight: normal;
        flex-grow: 0;
        flex-shrink: 0;
        cursor: pointer;
        text-decoration: none;
    }

    #hcont .header .left .logo {
        display: inline-block;
        width: 34px;
        height: 34px;
        background-image: url('https://websiteres.nmteam.xyz/producticon/nmTeam/logo@64.png');
        background-size: 34px;
    }

    #hcont .header .left .name {
        display: inline;
        font-size: 21px;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--header-name);
    }

    #hcont .header .right {
        display: flex;
        flex-direction: row;
        justify-content: end;
        align-items: center;
        gap: 2px;
    }

    #hcont .header .right * {
        font-size: 15px;
        font-weight: 500;
        color: var(--header-a);
        text-decoration: none;
    }

    #hcont .header .right .links {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }

    #hcont .header .right .links a {
        padding: 8px 13px;
        word-break: keep-all;
        border-radius: 999px;
    }

    #hcont .header .right .links a:hover,
    #hcont .header .right .links a:focus-visible {
        color: var(--header-a-hover);
        background: var(--header-link-hover-bg);
        cursor: pointer;
    }

    #hcont .header .right .accountBox {
        display: flex;
        flex-direction: row;
        justify-content: end;
        align-items: center;
        gap: 7px;
        margin-left: 8px;
        padding: 5px 14px 5px 6px;
        border: 1px solid var(--color-border-subtle);
        background: none;
        border-radius: 999px;
        cursor: pointer;
    }

    #hcont .header .right .accountBox:hover,
    #hcont .header .right .accountBox:focus-visible {
        background: var(--header-link-hover-bg);
    }

    #hcont .header .right .accountBox:hover p,
    #hcont .header .right .accountBox:focus-visible p {
        color: var(--header-a-hover);
    }

    #hcont .header .right .accountBox i {
        display: inline-block;
        width: 28px;
        height: 28px;
        background-image: url(https://static.hdslb.com/images/akari.jpg);
        background-size: 28px 28px;
        border-radius: 50%;
    }

    #hcont .header .right .accountBox p {
        display: inline-block;
        max-width: 117px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: break-all;
    }

    #hcont .header .menu-toggle {
        display: none;
    }
}

@media (max-width: 699.99999px) {
    #hcont .header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: hidden;
        padding: 5px 12px;
        z-index: 100;
        -webkit-backdrop-filter: blur(24px) saturate(1.8);
        backdrop-filter: blur(24px) saturate(1.8);
        background-color: var(--glass-background);
        border-bottom: 1px solid var(--color-border-subtle);
        color: var(--header-text);
    }

    #hcont .header[open] {
        height: 100vh;
        height: 100dvh;
    }

    #hcont .header[open] .right {
        overflow-y: auto;
    }

    #hcont .header.hidden:not([open]) {
        background: none;
        border-bottom-color: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    #hcont .header * {
        margin: 0;
        padding: 0;
    }

    #hcont .header .left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-grow: 0;
        flex-shrink: 0;
        margin: 8px 0 0 8px;
        cursor: pointer;
        border: none;
        background: none;
        color: var(--header-a);
        font-weight: normal;
        transition: all 0.7s;
        text-decoration: none;
        transform-origin: left top;
    }

    #hcont .header[open] .left {
        transform: scale(1.2) translate(-1.6px, 8px);
    }

    #hcont .header .left .logo {
        display: inline-block;
        width: 32px;
        height: 32px;
        background-image: url('https://websiteres.nmteam.xyz/producticon/nmTeam/logo@64.png');
        background-size: 32px;
    }

    #hcont .header .left .name {
        display: inline-block;
        font-size: 20px;
        font-weight: 600;
        color: var(--header-name);
    }

    #hcont .header .menu-toggle {
        display: block;
        position: absolute;
        right: 8px;
        top: 5px;
        width: 46px;
        height: 46px;
        background: none;
        border: none;
        border-radius: 50%;
        direction: ltr;
        cursor: pointer;
        transition: all 0.7s;
    }

    #hcont .header[open] .menu-toggle {
        top: 20px;
    }

    #hcont .header .menu-toggle .bar {
        position: absolute;
        display: block;
        top: 0;
        left: 50%;
        pointer-events: none;
        transform: translate(-50%, 0);
        width: 30%;
        height: 1px;
        border-radius: 2px;
        background: var(--header-name);
        transition: all 0.5s !important;
    }

    #hcont .header .menu-toggle .bar-1 {
        top: 40%;
    }

    #hcont .header .menu-toggle .bar-2 {
        top: 50%;
    }

    #hcont .header .menu-toggle .bar-3 {
        top: 60%;
    }

    #hcont .header[open] .menu-toggle .bar-1 {
        top: 50%;
        left: 35%;
        transform: rotate(45deg) translate(0, 0);
    }

    #hcont .header[open] .menu-toggle .bar-2 {
        opacity: 0;
        width: 0;
    }

    #hcont .header[open] .menu-toggle .bar-3 {
        top: 50%;
        left: 35%;
        transform: rotate(-45deg) translate(0, 0);
    }

    #hcont .header .right {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-top: 34px;
        padding: 0 4px 30px;
        width: 100%;
        box-sizing: border-box;
        flex-grow: 1;
        flex-shrink: 1;
        visibility: hidden;
        transform: translateY(-5%) scale(0.995, 0.94);
        filter: blur(4px);
        opacity: 0;
        transition: transform 0.2s, opacity 0.2s, filter 0.2s, visibility 0.2s !important;
    }

    #hcont .header[open] .right {
        visibility: visible;
        transform: none;
        filter: none;
        opacity: 1;
        transition: transform 0.52s 0.18s, opacity 0.52s 0.18s, filter 0.52s 0.18s, visibility 0.52s 0.18s !important;
    }

    #hcont .header .right * {
        font-size: 25.2px;
        font-weight: 600;
        color: var(--header-text);
        text-decoration: none;
        text-align: start;
    }

    #hcont .header .right .links {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-self: stretch;
        margin-left: 42px;
    }

    #hcont .header .right .links a {
        display: block;
        padding: 10px 8px;
        word-break: keep-all;
        border-radius: 3px;
    }

    #hcont .header .right .links a:hover,
    #hcont .header .right .links a:focus-visible,
    #hcont .header .right .accountBox:hover p,
    #hcont .header .right .accountBox:focus-visible p {
        color: var(--header-a-hover);
        cursor: pointer;
    }

    #hcont .header .right .accountBox {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin: 10px 0;
        border: none;
        background: none;
        align-self: stretch;
        text-align: left;
    }

    #hcont .header .right .accountBox i {
        position: absolute;
        top: 1px;
        left: 10px;
        display: inline-block;
        width: 30px;
        height: 30px;
        background-image: url(https://static.hdslb.com/images/akari.jpg);
        background-size: 30px 30px;
        border-radius: 50%;
    }

    #hcont .header .right .accountBox p {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: break-all;
        margin: 0 0 0 50px;
    }
}

/* footer */
#fcont {
    position: relative;
    display: block;
    margin-top: 48px;
    padding: 44px 10% 28px;
    color: var(--footer);
    background-color: var(--footer-bgcolor);
    border-top: 1px solid var(--color-border-subtle);
    font-size: 14px;
}

#fcont * {
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

#fcont a {
    color: var(--footer-a);
    text-decoration: none;
    transition: color 0.25s;
    border-radius: 4px;
}

#fcont a:hover,
#fcont a:focus-visible {
    color: var(--footer-hover);
}

#fcont .footer-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
    margin-bottom: 30px;
    color: var(--footer-text);
}

#fcont .footer-table .row * {
    display: block;
}

#fcont .footer-table .row .rowName {
    color: var(--footer-table-title);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

#fcont .footer-table .row a {
    font-size: 14.5px;
    line-height: 2;
    width: fit-content;
}

#fcont .footer-bottom {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    border-top: 1px solid var(--color-border-subtle);
    padding-top: 20px;
}

#fcont .footer-bottom .left {
    flex-grow: 1;
    flex-shrink: 1;
    width: 100%;
    font-size: 13px;
}

#fcont .footer-bottom .left p {
    line-height: 1.8;
}

#fcont .footer-bottom .right {
    flex-grow: 0;
    flex-shrink: 0;
    text-align: right;
    padding-bottom: 8px;
}

#fcont .footer-bottom .right i {
    display: block;
    background-position: center;
    background-size: 100%;
    margin: 0 10px;
    transition: opacity 0.4s, filter 0.4s;
}

#fcont .footer-bottom .right i:hover {
    opacity: 1 !important;
    filter: none !important;
}

@media (max-width: 1000px) {
    #fcont .footer-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    #fcont {
        padding: 36px 8% 26px;
    }

    #fcont .footer-table {
        grid-template-columns: 1fr;
        gap: 22px 16px;
        margin-bottom: 26px;
    }

    #fcont .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    #fcont .footer-bottom .right {
        margin-top: 18px;
        text-align: center;
    }

    #fcont .footer-bottom .right i {
        margin-inline-start: -3px;
    }
}

/* footer language switch button */
body {
    --footer_selectLanguageButton-border: var(--color-border-subtle);
    --footer_selectLanguageButton-text: var(--color-text-primary);
}

html[data-theme=dark] body {
    --footer_selectLanguageButton-border: var(--color-border-subtle);
    --footer_selectLanguageButton-text: var(--color-text-primary);
}

#footer_selectLanguageButton {
    display: flex !important;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--footer_selectLanguageButton-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    margin: 0 2px;
    padding: 8px 16px;
    flex-shrink: 0;
    text-overflow: ellipsis;
    word-break: keep-all;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    color: var(--footer_selectLanguageButton-text);
    transition: box-shadow 0.3s var(--motion-ease-out), background 0.25s;
}

#footer_selectLanguageButton:hover {
    box-shadow: var(--shadow-md);
}

#footer_selectLanguageButton i {
    display: inline-flex !important;
    width: 18px;
    height: 18px;
    fill: var(--footer_selectLanguageButton-text);
}

#footer_selectLanguageButton i svg {
    width: 18px;
    height: 18px;
    fill: var(--footer_selectLanguageButton-text);
    display: block;
    opacity: 0.7;
}

#footer_selectLanguageButton span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

@media (min-width: 700px) {
    #footer_selectLanguageButton {
        float: right;
    }
}

html[data-theme=dark] .header:not(.hidden),
html[data-theme=dark] .header[open] {
    --header-text: #f5f3ed;
    --header-a: rgba(245, 243, 237, 0.62);
    --header-a-hover: #f5f3ed;
    --header-name: #f5f3ed;
}
