/* Empire redesign layer. Loaded after the legacy stylesheet. */

.em #langCurrent {
    height: 44px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tx2);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.em #langCurrent:hover {
    background: var(--s2);
    color: var(--tx);
}

.em .lang-dropdown {
    position: relative;
}

.em .lang-menu {
    top: calc(100% + 8px);
    right: 0;
    min-width: 148px;
    padding: 6px;
    border-radius: 16px;
    background: var(--solid);
    border: 1px solid var(--line2);
    box-shadow: var(--sh2);
}

.em .lang-menu .lang-option {
    color: var(--tx2);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.em .lang-menu .lang-option:hover,
.em .lang-menu .lang-option.active {
    color: var(--tx);
    background: var(--s2);
}

.em #themeSlider .icon-sun,
.em #themeSlider .icon-moon {
    display: block;
}

html[data-theme='dark'] .em #themeSlider .icon-moon,
html[data-theme='light'] .em #themeSlider .icon-sun {
    display: none;
}

.em #notifBell {
    position: relative;
}

.em #notifBell .bell-icon {
    display: grid;
    place-items: center;
}

.em #notifBell .bell-icon.hidden {
    display: none;
}

.em #notifBell .bell-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em #notifBadge {
    position: absolute;
    top: 6px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ac);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 2px solid var(--solid);
}

.em #notifBadge.hidden {
    display: none;
}

.em .island-brand {
    order: 0;
    flex: 0 0 auto;
    color: var(--tx);
    font-size: 18px;
    letter-spacing: -.02em;
}

.em .isl-link.active {
    color: var(--tx);
    background: var(--s3);
}

.em .content-wrap {
    width: 100%;
    max-width: 1232px;
    padding: 0 32px;
}

.em .d4 {
    margin: 0;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.em .d5 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.em .eyebrow {
    color: var(--tx3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.em .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.em #pricing {
    scroll-margin-top: 100px;
}

.em .eye .i-eye-on {
    display: none;
}

.em .eye.show .i-eye-off {
    display: none;
}

.em .eye.show .i-eye-on {
    display: block;
}

.em #panel-auth {
    width: 100%;
    margin-left: 0;
}

.em .inp input:focus-visible,
.em .inp select:focus-visible,
.em .inp textarea:focus-visible {
    box-shadow: none;
}

.em .inp input:-webkit-autofill,
.em .inp input:-webkit-autofill:hover,
.em .inp input:-webkit-autofill:focus,
.em .inp input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 100px var(--solid) inset;
    box-shadow: 0 0 0 100px var(--solid) inset;
    -webkit-text-fill-color: var(--tx);
    caret-color: var(--tx);
    border: 0;
    outline: none;
    transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

.em .brand-logo {
    height: 26px;
    width: auto;
    display: block;
}

.em .auth-tab.active {
    background: var(--solid2);
    color: var(--tx);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 4px 14px -6px rgba(0, 0, 0, .5);
}

.em .auth-card-em {
    padding: 28px;
}

/* Auth layout */

.em .au {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 72px;
    align-items: center;
    padding: 72px 0 40px;
}

.em .au-side {
    position: relative;
}

.em .why {
    display: flex;
    flex-direction: column;
    gap: 22px;
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
}

.em .why li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.em .why .fi {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--acbg);
    color: var(--ac2);
    flex: none;
}

.em .seal {
    position: absolute;
    right: -40px;
    top: -50px;
    width: 460px;
    height: auto;
    opacity: .08;
    pointer-events: none;
}

@media (max-width:960px) {
    .em .au {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 0;
    }

    .em .au-side {
        order: 2;
    }

    .em .seal {
        display: none;
    }
}

.em-page > main {
    min-height: 0;
    flex: 1;
}

html[data-theme='light'] .em .mock,
html[data-theme='light'] .em .mock-mod span,
html[data-theme='light'] .em .mock .row {
    color: #F3F1F6;
}

/* Home */

.em .hero {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: 40px;
    align-items: center;
    padding: 96px 0 64px;
}

.em .hero h1 {
    font-size: clamp(42px, 5.6vw, 78px);
}

.em .hero.solo {
    grid-template-columns: minmax(0, 840px);
}

.em .facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 28px;
    color: var(--tx2);
    font-size: 14px;
}

.em .facts span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.em .stage {
    position: relative;
    height: 600px;
    perspective: 1800px;
}

.em .stage .mock {
    position: absolute;
    inset: 30px 0 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    transform: rotateY(-9deg) rotateX(5deg);
    transform-origin: left center;
    animation: rise .8s var(--ease) both;
}

.em .mods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.em .bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.em .bento .card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 280px;
}

.em .bento .vis {
    margin-top: auto;
}

.em .bento .card {
    min-height: 0;
    padding: 24px;
    gap: 8px;
}

.em .fi {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--acbg);
    color: var(--ac2);
}

.em .ft {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 64px;
}

.em .ft span {
    flex: 1;
    border-radius: 3px;
    background: color-mix(in srgb, var(--ok) 55%, transparent);
}

.em .thoughts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.em .plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.em .plan {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.em .faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.em .faq details {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--s1);
    padding: 0 18px;
}

.em .faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    font-weight: 600;
}

.em .faq summary::-webkit-details-marker {
    display: none;
}

.em .faq summary .i {
    transition: transform .2s var(--ease);
}

.em .faq details[open] summary .i {
    transform: rotate(180deg);
}

.em .faq details p {
    margin: 0 0 18px;
    color: var(--tx2);
    font-size: 14.5px;
}

.em .faq-answer {
    padding: 0 0 18px;
}

.em .faq-answer p:last-child {
    margin-bottom: 0;
}

.em .sec {
    padding: 72px 0;
}

.em .sec-h {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
    max-width: 720px;
}

/* Screenshot gallery */

.em .gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 16px;
    align-items: stretch;
}

.em .gallery-stage {
    position: relative;
    min-width: 0;
    aspect-ratio: 2560 / 1369;
    border-radius: 24px;
    overflow: hidden;
    background: #0e0d13;
    border: 1px solid var(--line2);
    box-shadow: var(--sh2);
}

.em .gallery-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    background: #0e0d13;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.em .gallery-label {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(12, 11, 17, .72);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #F3F1F6;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.em .gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(12, 11, 17, .62);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background .16s, border-color .16s;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: manipulation;
}

.em .gallery-arrow:hover {
    background: rgba(12, 11, 17, .86);
    border-color: rgba(255, 255, 255, .4);
}

.em .gallery-arrow.prev {
    left: 14px;
}

.em .gallery-arrow.next {
    right: 14px;
}

.em .gallery-arrow .i {
    width: 20px;
    height: 20px;
}

.em .gallery-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 24px;
    background: var(--glass);
    border: 1px solid var(--line);
    box-shadow: var(--sh);
}

.em .gallery-themes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.em .gallery-theme {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--s1);
    color: var(--tx2);
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .16s, color .16s, border-color .16s;
}

.em .gallery-theme:hover {
    color: var(--tx);
    background: var(--s2);
}

.em .gallery-theme.on {
    color: var(--tx);
    background: var(--acbg);
    border-color: var(--acline);
}

.em .gallery-theme .sw {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background: var(--sw, var(--ac));
    border: 1px solid rgba(255, 255, 255, .28);
    flex: none;
}

.em .gallery-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.em .gallery-modes .tab {
    justify-content: center;
}

@media (max-width:1100px) {
    .em .hero {
        grid-template-columns: 1fr;
        padding-top: 56px;
    }

    .em .stage {
        height: 520px;
    }

    .em .gallery {
        grid-template-columns: 1fr;
    }

    .em .gallery-themes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width:860px) {
    .em .content-wrap {
        padding: 0 16px;
    }

    .em .hero {
        padding: 40px 0 24px;
        gap: 28px;
    }

    .em .stage {
        height: auto;
        perspective: none;
    }

    .em .stage .mock {
        position: relative;
        inset: auto;
        transform: none;
    }

    .em .mods {
        grid-template-columns: 1fr;
    }

    .em .bento {
        grid-template-columns: 1fr;
    }

    .em .bento .card {
        grid-column: auto !important;
        min-height: 0;
    }

    .em .thoughts,
    .em .plans,
    .em .faq {
        grid-template-columns: 1fr;
    }

    .em .sec {
        padding: 48px 0;
    }

    .em .gallery-themes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em .gallery-arrow {
        width: 38px;
        height: 38px;
    }
}

@media (max-width:520px) {
    .em .gallery-themes {
        grid-template-columns: 1fr;
    }

    .em .gallery-label {
        left: 12px;
        bottom: 12px;
    }
}

/* ---------------------------------------------------------------
   Two-factor auth (ported from TwoFactor.dc.html)
   --------------------------------------------------------------- */

.em .tf-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 72px 32px 64px;
}

.em .tf-card {
    width: 100%;
    max-width: 440px;
}

.em .tf-card.tf-center {
    text-align: center;
}

.em .tf-form {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.em .meth {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 68px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid var(--line2);
    background: var(--s1);
    color: var(--tx);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s, background .16s;
}

.em .meth:hover {
    border-color: color-mix(in srgb, var(--tx) 26%, transparent);
}

.em .meth:disabled {
    opacity: .55;
    cursor: default;
}

.em .meth .mi {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--s2);
    color: var(--tx2);
}

.em .meth .mi svg {
    width: 20px;
    height: 20px;
}

.em .meth .mt {
    flex: 1;
    min-width: 0;
}

.em .meth .mt strong {
    display: block;
    font-size: 14.5px;
    font-weight: 650;
}

.em .meth .mt small {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--tx3);
}

.em .meth > svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--tx3);
}

.em .otp1 {
    width: 100%;
    height: 60px;
    padding: 0 0 0 .5em;
    border-radius: 16px;
    border: 1px solid var(--line2);
    background: var(--s1);
    color: var(--tx);
    font: 650 26px/1 "Inter Tight", Inter, sans-serif;
    letter-spacing: .5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.em .otp1:focus {
    border-color: var(--ac2);
    box-shadow: var(--focus);
}

.em .otp1.err {
    border-color: var(--bad);
}

.em .ring {
    position: relative;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    margin: 4px auto 0;
}

.em .ring .spinner {
    position: absolute;
    inset: 0;
    width: 96px;
    height: 96px;
    border-width: 3px;
}

.em .ring .ti {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--acbg);
    color: var(--ac2);
}

/* ---------------------------------------------------------------
   Admin panel (ported from AdminNav / AdminUsers etc.)
   --------------------------------------------------------------- */

body.admin-view .isl-wrap,
body.admin-view .em-page > .foot {
    display: none;
}

body.admin-view .em-page > main {
    min-height: 100vh;
}

.em .adm-side {
    position: sticky;
    top: 0;
    align-self: start;
}

.em .adm-side .adm-link {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.em .adm-side .adm-link:hover {
    background: var(--s2);
    color: var(--tx);
}

.em .adm-side .adm-link.on {
    background: var(--acbg);
    color: var(--ac2);
}

.em .adm-brand .brand-logo {
    flex: none;
}

.em .adm-brand small {
    margin-top: 1px;
}

.em .adm-main > .admin-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.em .adm-main > .admin-panel.active {
    display: flex;
}

.em .adm-main .section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.em .adm-main .section-head h2 {
    margin: 0;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 22px;
    letter-spacing: -.02em;
}

.em .adm-main .section-head p {
    margin: 4px 0 0;
    color: var(--tx2);
    font-size: 14px;
}

.em .adm-main .admin-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.em .adm-main .admin-search-wrap .search-icon {
    display: none;
}

.em .adm-main .admin-search,
.em .adm-main input[type="text"],
.em .adm-main input[type="number"],
.em .adm-main input[type="email"],
.em .adm-main input[type="password"],
.em .adm-main select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--line2);
    background: var(--s1);
    color: var(--tx);
    font-size: 14px;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}

.em .adm-main .admin-search:focus,
.em .adm-main input:focus,
.em .adm-main select:focus {
    border-color: var(--ac2);
}

.em .adm-main .admin-search::placeholder {
    color: var(--tx3);
}

.em .adm-main form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tx2);
}

.em .adm-main .form-row,
.em .adm-main .stack-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.em .adm-main .form-row > label {
    flex: 1 1 160px;
    min-width: 0;
}

.em .adm-main .stack-form {
    flex-direction: column;
    align-items: flex-start;
}

.em .adm-main .stack-form .form-row {
    width: 100%;
}

.em .adm-main .admin-log-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.em .adm-main .admin-log-filter label {
    flex: 1 1 200px;
}

.em .adm-main .maintenance-status {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.em .adm-main .maintenance-stat-label {
    display: block;
    font-size: 12px;
    color: var(--tx3);
    margin-bottom: 4px;
}

.em .adm-main .maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.em .adm-main .sub-label,
.em .adm-main .role-badge,
.em .adm-main .ban-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--s2);
    color: var(--tx2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.em .adm-main .ban-tag.ok {
    border-color: color-mix(in srgb, var(--ok) 34%, transparent);
    background: color-mix(in srgb, var(--ok) 14%, transparent);
    color: var(--ok);
}

.em .adm-main .cell-muted {
    color: var(--tx3);
}

.em .adm-main .promo-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    padding: 3px 7px;
    border-radius: 7px;
    background: var(--s2);
}

.em .adm-main .icon-btn {
    border: 0;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 7px;
}

.em .adm-main .icon-btn:hover {
    background: var(--s2);
    color: var(--tx);
}

.em .adm-main .btn-soft {
    border: 1px solid var(--line2);
    background: var(--s2);
    color: var(--tx2);
}

.em .adm-main .btn-soft:hover {
    border-color: var(--line2);
    background: var(--s3);
    color: var(--tx);
}

.em .adm-main .result-box {
    margin-top: 14px;
    font-size: 13px;
}

.em .adm-main .result-box.hidden {
    display: none;
}

.em .adm-main #monitorDetail .tbl-box {
    padding: 18px;
}

.em .edit-modal-body {
    display: grid;
    gap: 14px;
}

.em .edit-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tx2);
}

.em .edit-input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border-radius: 12px;
    border: 1px solid var(--line2);
    background: var(--s1);
    color: var(--tx);
    font-size: 14px;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}

.em .edit-input:focus {
    border-color: var(--ac2);
}

.em .edit-email-row,
.em .edit-hwid-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--s1);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.em .edit-email-row .icon-btn,
.em .edit-hwid-row .icon-btn {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
}

.em .edit-duration {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.em .edit-duration-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 92px;
}

.em .edit-duration-item .edit-input {
    padding-right: 34px;
}

.em .edit-duration-item span {
    position: absolute;
    right: 12px;
    font-size: 12px;
    color: var(--tx3);
    pointer-events: none;
}

.em .reset-link-box {
    display: flex;
    gap: 8px;
}

.em .reset-link-box .edit-input {
    flex: 1;
    min-width: 0;
}

.em .btn-full {
    width: 100%;
}

@media (max-width: 860px) {
    .em .tf-wrap {
        padding: 40px 16px 48px;
    }

    .em .adm-main {
        padding: 18px 16px 48px;
    }

    .em .adm-main .tbl-box {
        overflow-x: auto;
    }

    .em .adm-nav .adm-link {
        width: auto;
        flex: none;
    }
}

.em .tf-h {
    margin: 0;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.em .tf-sub {
    margin: 10px 0 0;
    color: var(--tx2);
    font-size: 14.5px;
    line-height: 1.55;
}

.em .tf-methods {
    gap: 10px;
    margin-top: 22px;
}

.em .tf-divider {
    margin: 4px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tx3);
}

.em .adm-side .i {
    display: grid;
    place-items: center;
}

.em .adm-side .i svg {
    width: 18px;
    height: 18px;
}

.em .tf-card .auth-error {
    margin: 0;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--bad) 32%, transparent);
    background: color-mix(in srgb, var(--bad) 10%, transparent);
    color: var(--bad);
    font-size: 13px;
}

.em .tf-card .auth-error:empty {
    display: none;
}

.em .adm-main .admin-search-wrap.table-attached-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.em .adm-main .admin-search-wrap.table-attached-search .admin-search {
    max-width: 420px;
}

@media (max-width: 860px) {
    .em .adm-side .adm-nav .adm-link {
        width: auto;
        flex: none;
    }
}

.em .adm-side .admin-nav-tab.active {
    background: var(--acbg);
    color: var(--ac2);
}

/* Profile dashboard */
.em .profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 38px 0 12px !important;
}

.em .profile-ready {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.em .profile-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px 28px;
}

.em .profile-summary-copy {
    min-width: 180px;
}

.em .profile-name-line h1 {
    margin: 0;
    font-size: 26px;
}

.em .profile-summary-actions {
    margin-left: auto;
}

.em .profile-identity {
    gap: 4px 16px;
}

.em .profile-tabs {
    align-self: flex-start;
    max-width: 100%;
}

.em .profile-tabs .prof-tab.active {
    background: var(--solid2);
    color: var(--tx);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 14px -6px rgba(0,0,0,.5);
}

html[data-theme=light] .em .profile-tabs .prof-tab.active {
    background: #fff;
    box-shadow: 0 2px 10px -4px rgba(50,25,80,.25);
}

.em .profile-content .prof-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: rise .22s var(--ease);
}

.em .profile-content .prof-panel.active {
    display: flex;
}

.em .profile-account-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
    align-items: start;
}

.em .profile-time-left {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin: 6px 0 10px;
}

.em .profile-time-left .big-num {
    font-size: 48px;
    line-height: 1;
}

.em .profile-progress {
    height: 8px;
    margin: 2px 0 10px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--s2);
}

.em .profile-progress > span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--ac);
    transition: width .45s var(--ease);
}

.em .profile-progress.is-frozen > span {
    background: var(--ice);
}

.em .profile-sub-until {
    gap: 8px 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.em .profile-download {
    margin-top: 22px;
}

.em .profile-version,
.em .profile-freeze-hint {
    display: block;
    margin-top: 8px;
    text-align: center;
}

.em .profile-no-sub {
    padding: 22px 0 26px;
}

.em .srow {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.em .srow .si {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--s2);
    color: var(--tx2);
    flex: none;
}

.em .srow .si .i {
    width: 19px;
    height: 19px;
}

.em .srow .sb {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em .profile-kv {
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
}

.em .profile-security-head {
    margin-bottom: 4px;
}

.em .profile-tab-stack,
.em .profile-tab-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.em .profile-key-card {
    max-width: 760px;
}

.em .profile-key-hint {
    margin: 0 0 16px;
}

.em .profile-key-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.em .profile-key-form .field {
    flex: 1 1 260px;
    min-width: 0;
}

.em .profile-section-heading h2 {
    margin: 0;
}

.em .profile-promo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.em .profile-promo-code {
    display: block;
    margin: 3px 0;
    font-size: 32px;
    letter-spacing: .08em;
}

.em .profile-promo-discount {
    height: 32px;
    padding: 0 14px;
    font-size: 14px;
}

.em .met3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.em .profile-partner-stats .stat .big-num {
    font-size: 30px;
}

.em .profile-analytics .bars {
    margin-top: 12px;
}

.em .profile-empty-promo {
    max-width: 760px;
}

.em .profile-maintenance {
    width: 100%;
}

/* Legal pages */
.em .legal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    padding: 72px 0 32px;
}

.em .legal-layout .legal {
    max-width: 76ch;
    min-width: 0;
}

.em .legal-layout .legal > .eyebrow {
    display: block;
    margin-bottom: 12px;
}

.em .legal-content h1 {
    margin: 0 0 20px;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.em .legal-content h2 {
    margin: 44px 0 12px;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -.025em;
    scroll-margin-top: 110px;
}

.em .legal-content h2:first-of-type {
    margin-top: 32px;
}

.em .legal-content p,
.em .legal-content li {
    color: var(--tx2);
    font-size: 15.5px;
    line-height: 1.75;
}

.em .legal-content p {
    margin: 0 0 14px;
}

.em .legal-content ul {
    display: grid;
    gap: 8px;
    padding-left: 22px;
    margin: 10px 0 18px;
}

.em .legal-content a {
    color: var(--ac2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.em .legal-related {
    margin-top: 48px;
    gap: 14px;
}

.em .legal-toc [data-legal-toc] {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em .legal-toc a {
    display: block;
    line-height: 1.4;
}

@media (max-width: 860px) {
    .em .profile-content {
        padding-top: 24px !important;
    }

    .em .profile-account-grid,
    .em .met3 {
        grid-template-columns: 1fr;
    }

    .em .profile-summary {
        padding: 20px;
        gap: 14px;
    }

    .em .profile-summary-actions {
        width: 100%;
        margin-left: 0;
    }

    .em .profile-key-form {
        flex-direction: column;
        align-items: stretch;
    }

    .em .profile-key-form .btn {
        width: 100%;
    }

    .em .legal-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 38px 0 24px;
    }

    .em .legal-toc {
        position: static;
    }

    .em .legal-toc [data-legal-toc] {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .em .legal-toc a {
        background: var(--s1);
        border: 1px solid var(--line);
    }
}

.em .adm-main .btn-delete-key,
.em #editUserResetProfileBtn,
.em #editUserDeleteBtn,
.em #editPromoDeleteBtn,
.em #monitorKillBtn,
.em #monitorBlockBtn {
    color: var(--bad);
    border-color: color-mix(in srgb, var(--bad) 30%, var(--line));
    background: transparent;
}

.em .adm-main .btn-delete-key:hover,
.em #editUserResetProfileBtn:hover,
.em #editUserDeleteBtn:hover,
.em #editPromoDeleteBtn:hover,
.em #monitorKillBtn:hover,
.em #monitorBlockBtn:hover {
    color: var(--bad);
    border-color: var(--bad);
    background: color-mix(in srgb, var(--bad) 9%, transparent);
}

.em .otp1:-webkit-autofill,
.em .otp1:-webkit-autofill:hover,
.em .otp1:-webkit-autofill:focus,
.em .otp1:-webkit-autofill:active,
.em .adm-main input:-webkit-autofill,
.em .adm-main input:-webkit-autofill:hover,
.em .adm-main input:-webkit-autofill:focus,
.em .adm-main input:-webkit-autofill:active,
.em .edit-input:-webkit-autofill,
.em .edit-input:-webkit-autofill:hover,
.em .edit-input:-webkit-autofill:focus,
.em .edit-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 100px var(--solid) inset !important;
    box-shadow: 0 0 0 100px var(--solid) inset !important;
    -webkit-text-fill-color: var(--tx) !important;
    caret-color: var(--tx);
    transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

/* Keep autofilled credentials visually inside the existing field, with one outline. */
.em .inp:has(input:-webkit-autofill),
.em .inp:has(input:autofill) {
    background: var(--solid);
}

.em .inp input:-webkit-autofill,
.em .inp input:-webkit-autofill:hover,
.em .inp input:-webkit-autofill:focus,
.em .inp input:-webkit-autofill:active,
.em .inp input:autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--solid) inset !important;
    box-shadow: 0 0 0 1000px var(--solid) inset !important;
    -webkit-text-fill-color: var(--tx) !important;
    caret-color: var(--tx);
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
}

/* Settings: prices and maintenance are adjacent columns on desktop. */
.em .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: start;
    gap: 18px;
}

.em .settings-grid > .section {
    min-width: 0;
    gap: 12px;
}

.em .settings-grid .section-head {
    margin-bottom: 0;
}

.em .settings-grid #adminPricesForm {
    width: 100%;
    max-width: none;
    margin: 0;
}

.em .settings-prices .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.em .settings-prices .form-row > label {
    min-width: 0;
}

.em .settings-maintenance .maintenance-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.em .settings-maintenance .maintenance-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.em .settings-maintenance .maintenance-stat {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--s1);
}

.em .settings-maintenance #maintenanceElapsed {
    display: block;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: clamp(24px, 2.3vw, 34px);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* User edit is a full-height right drawer, not a centered dialog. */
.em #userEditModal.modal-overlay {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    overflow: hidden;
    padding: 0;
    background: rgba(5, 4, 8, .64);
    backdrop-filter: blur(7px);
}

.em #userEditModal .edit-user-drawer {
    display: flex;
    flex-direction: column;
    width: min(560px, 100vw);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 26px 0 0 26px;
    border: 1px solid var(--line);
    border-right: 0;
    background: var(--solid);
    opacity: 1;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.2, .75, .2, 1);
}

.em #userEditModal.open .edit-user-drawer {
    opacity: 1;
    transform: translateX(0);
}

.em #userEditModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    min-height: 76px;
    margin: 0;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--solid);
}

.em #userEditModal .modal-header h3 {
    margin: 0;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 22px;
    letter-spacing: -.025em;
}

.em #userEditModal .edit-modal-body {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 20px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.em #userEditModal .edit-modal-body > * {
    min-width: 0;
}

.em #userEditModal .edit-hwid-row {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.em #userEditModal .edit-hwid-val {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

.em #userEditModal .edit-hwid-row .btn {
    flex: none;
    max-width: 142px;
}

.em #userEditModal .edit-email-val {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em #userEditModal .edit-duration {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
}

.em #userEditModal .edit-duration-item,
.em #userEditModal .edit-duration-item .edit-input {
    min-width: 0;
}

.em #userEditModal .edit-danger-zone {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.em #userEditModal .edit-danger-zone .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
}

.em #userEditModal .edit-modal-footer {
    flex: none;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--solid);
}

.em #userEditModal .edit-modal-footer .btn {
    min-height: 48px;
}

/* Native select menus inherit the active theme instead of opening white-on-white. */
.em .adm-main select,
.em #userEditModal select {
    color-scheme: dark;
}

html[data-theme=light] .em .adm-main select,
html[data-theme=light] .em #userEditModal select {
    color-scheme: light;
}

.em .adm-main select option,
.em #userEditModal select option {
    background-color: var(--solid);
    color: var(--tx);
}

/* The sidebar stays viewport-height while long tables scroll in the main column. */
.em .adm {
    align-items: start;
}

.em .adm-side {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 1100px) {
    .em .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .em .adm-side {
        height: auto;
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .em .settings-prices .form-row,
    .em .settings-maintenance .maintenance-status {
        grid-template-columns: 1fr;
    }

    .em #userEditModal .edit-user-drawer {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border: 0;
    }

    .em #userEditModal .modal-header,
    .em #userEditModal .edit-modal-body,
    .em #userEditModal .edit-modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

.em #userEditModal .edit-duration {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

/* Purchase and sign-in verification use the same Empire modal system. */
.em.modal-overlay.empire-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 4, 8, .68);
    backdrop-filter: blur(9px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.em.modal-overlay.empire-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.em.modal-overlay.empire-overlay > .modal {
    position: relative;
    width: min(100%, 500px);
    max-width: min(100%, 500px);
    max-height: min(88vh, 820px);
    max-height: min(88dvh, 820px);
    margin: auto;
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--line2);
    border-radius: 26px;
    background: var(--solid);
    color: var(--tx);
    box-shadow: var(--sh2);
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: transform .24s var(--ease), opacity .24s ease;
}

.em.modal-overlay.empire-overlay.open > .modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.em.modal-overlay.empire-overlay .modal-h {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.em.modal-overlay.empire-overlay .modal-h .icb {
    margin: -9px -9px 0 0;
}

.em .purchase-modal-em {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    padding: 28px;
    border-radius: 30px;
}

.em .purchase-modal-head {
    position: relative;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 0 22px !important;
    text-align: center;
}

.em .purchase-modal-head .col {
    align-items: center;
}

.em .purchase-modal-head h2 {
    margin: 0;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 25px;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.em .purchase-modal-head p {
    max-width: 34ch;
    line-height: 1.5;
}

.em .purchase-modal-head .icb {
    position: absolute;
    top: -3px;
    right: -3px;
    margin: 0 !important;
}

.em .purchase-modal-brand {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid var(--acline);
    border-radius: 19px;
    background: var(--acbg);
    box-shadow: 0 8px 26px -15px var(--ac);
}

.em .purchase-modal-brand img {
    display: block;
    width: 38px;
    height: 34px;
    object-fit: contain;
}

.em .purchase-form-em {
    display: grid;
    gap: 16px;
    padding: 0;
}

.em .purchase-product-line {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 80px;
    padding: 14px 16px;
    border: 1px solid var(--line2);
    border-radius: 19px;
    background: linear-gradient(135deg,var(--s1),color-mix(in srgb,var(--acbg) 50%,var(--solid)));
}

.em .purchase-product-line .m-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 15px;
}

.em .purchase-product-line strong {
    font-weight: 650;
}

.em .purchase-product-price {
    flex: none;
    font-size: 21px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.em .purchase-product-line .col {
    align-items: flex-start;
    justify-content: center;
}

.em .purchase-product-line strong {
    font-size: 15px;
    line-height: 1.35;
}

.em .purchase-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.em .purchase-total-row .big-num {
    font-size: 30px;
}

.em .purchase-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
}

.em .purchase-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 0;
}

.em .purchase-actions .btn-p {
    flex: 1;
}

.em .purchase-actions .btn-gh {
    padding-inline: 18px;
}

.em .purchase-legal {
    margin: -4px 0 0;
    text-align: center;
}

.em .auth-step-card {
    width: min(100%, 460px) !important;
    max-width: 460px !important;
}

.em .auth-step-card.tf-center {
    text-align: center;
}

.em .auth-step-card .modal-h {
    align-items: flex-start;
}

.em .auth-step-card .tf-h {
    font-size: 26px;
}

.em .auth-step-card .tf-sub {
    margin-top: 4px;
}

.em .auth-step-note {
    margin: 18px 0 14px;
    text-align: left;
}

.em .auth-step-card .ring {
    margin-bottom: 18px;
}

.em .auth-step-card .tf-form {
    margin-top: 20px;
}

.em .tf-form[hidden] {
    display: none !important;
}

.em .tf-error {
    display: block;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--bad) 32%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bad) 10%, transparent);
    color: var(--bad);
    font-size: 13px;
    text-align: left;
}

.em .tf-error:empty {
    display: none;
}

.em .tf-confirm-card {
    max-width: 520px;
}

.em .tf-confirm-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid var(--acline);
    border-radius: 24px;
    background: var(--acbg);
    color: var(--ac2);
}

.em .tf-request {
    display: flex;
    flex-direction: column;
    margin: 20px 0 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--s1);
    text-align: left;
}

.em .tf-request > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.em .tf-request > div:last-child {
    border-bottom: 0;
}

.em .tf-request dt {
    flex: none;
    color: var(--tx3);
}

.em .tf-request dd {
    min-width: 0;
    margin: 0;
    color: var(--tx);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.em .tf-confirm-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    text-align: left;
}

.em .tf-error:not(:empty) {
    margin: 0 0 14px;
}

.em .tf-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Password reset invalid/expired state. */
.em .reset-expired-card {
    max-width: 460px;
}

.em .reset-expired-help {
    margin: 14px 0 22px;
}

.em .reset-valid-card {
    max-width: 500px;
}

.em .reset-valid-card .auth-card-head {
    margin-bottom: 20px;
}

.em .reset-valid-card .auth-card-head h2 {
    margin: 0;
    color: var(--tx2);
    font-size: 14px;
    font-weight: 500;
}

.em .reset-valid-card .auth-panel {
    display: grid;
    gap: 16px;
}

.em .reset-valid-card .auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--tx2);
    font-size: 13px;
    font-weight: 600;
}

.em .reset-valid-card .auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line2);
    border-radius: 14px;
    background: var(--s1);
    color: var(--tx3);
}

.em .reset-valid-card .auth-input-wrap:focus-within {
    border-color: var(--ac2);
    box-shadow: var(--focus);
}

.em .reset-valid-card .auth-input-wrap input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tx);
    box-shadow: none;
}

.em .reset-valid-card .pw-eye {
    flex: none;
    width: 34px;
    height: 34px;
    margin: 0;
    color: var(--tx3);
}

.em .reset-valid-card .btn-auth {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--ac);
    color: #fff;
    font-weight: 650;
}

/* Profile: show the design-system skeleton briefly while the profile view enters. */
.em .profile-loading {
    display: none;
    gap: 16px;
}

.em .profile-loading-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
}

.em .profile-loading-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
}

.em .profile-skel-avatar { width: 64px; height: 64px; border-radius: 22px; flex:none; }
.em .profile-skel-name { width: min(220px, 60%); height: 24px; }
.em .profile-skel-meta { width: min(320px, 82%); height: 14px; }
.em .profile-skel-title { width: 45%; height: 22px; }
.em .profile-skel-number { width: 55%; height: 52px; }
.em .profile-skel-line { width: 100%; height: 14px; }
.em .profile-skel-line.short { width: 68%; }
.em .profile-skel-button { width: 100%; height: 50px; border-radius: 14px; }
.em .profile-skel-row { width: 100%; height: 62px; }

.em-page[data-initial-page="profile"]:not([data-profile-loaded="true"]) #profileReady {
    display: none;
}

.em-page[data-initial-page="profile"]:not([data-profile-loaded="true"]) #profileLoading {
    display: grid;
}

@media (max-width: 860px) {
    .em.modal-overlay.empire-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .em.modal-overlay.empire-overlay > .modal {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        max-height: 92dvh;
        margin: 0;
        padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
        border-radius: 26px 26px 0 0;
        animation: sheet .32s var(--ease);
    }

    .em .purchase-actions {
        flex-direction: column-reverse;
    }

    .em .purchase-actions .btn {
        width: 100%;
    }

    .em .profile-loading-grid {
        grid-template-columns: 1fr;
    }

    .em .profile-loading-summary {
        padding: 20px;
    }

    .em .tf-confirm-actions {
        grid-template-columns: 1fr;
    }

    .em .purchase-product-line {
        padding: 13px;
    }

    .em .purchase-modal-em {
        padding: 24px 18px calc(22px + env(safe-area-inset-bottom));
    }

    .em .purchase-modal-head h2 {
        font-size: 23px;
    }
}

/* Profile pictures: DiceBear default, replaceable from the account page. */
.em .av {
    position: relative;
    overflow: hidden;
}

.em .avatar-fallback {
    position: relative;
    z-index: 0;
}

.em .avatar-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    background: var(--s2);
}

.em .avatar-image[hidden] {
    display: none;
}

.em .profile-avatar-button {
    position: relative;
    flex: none;
    padding: 0;
    border: 0;
    cursor: pointer;
    box-shadow: 0 8px 24px -12px rgba(214,68,138,.55);
    transition: transform .18s var(--ease), box-shadow .18s;
}

.em .profile-avatar-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -12px rgba(214,68,138,.7);
}

.em .profile-avatar-button:focus-visible {
    outline: 0;
    box-shadow: var(--focus);
}

.em .profile-avatar-button .avatar-image {
    transition: opacity .2s ease;
}

.em .profile-avatar-button.is-loading .avatar-image {
    opacity: .42;
}

.em .avatar-change-mark {
    position: absolute;
    z-index: 2;
    right: 4px;
    bottom: 4px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 9px;
    background: rgba(20,18,27,.82);
    color: #fff;
    opacity: .92;
    backdrop-filter: blur(8px);
}

.em .avatar-change-mark .i {
    width: 15px;
    height: 15px;
}

.em .profile-avatar-button.is-loading::after {
    content: "";
    position: absolute;
    z-index: 3;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.em #userEditModal .edit-email-row {
    width: 100%;
    min-width: 0;
}

.em #userEditModal .edit-email-row .edit-email-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.em #userEditModal .edit-email-row .edit-email-input:focus {
    box-shadow: none;
}

/* Promo verification and before/after price display. */
.em .purchase-prices {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 10px;
    flex: none;
}

.em #purchaseBasePrice.is-discounted {
    color: var(--tx3);
    font-size: 14px;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.em .purchase-discount-price:not([hidden]) {
    display: inline;
    color: var(--ac2);
}

.em .purchase-promo-status {
    margin: -8px 0 0;
    color: var(--tx3);
    font-size: 12.5px;
    line-height: 1.4;
}

.em .purchase-promo-status[hidden] {
    display: none;
}

.em .purchase-promo-status.is-success {
    color: var(--ok);
}

.em .purchase-promo-status.is-error {
    color: var(--bad);
}

.em #purchaseInfo[hidden] {
    display: none;
}

/* Notification popover integrated with the dynamic island. */
.em.modal-overlay.notif-island-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    padding: 0;
    overflow: visible;
    background: transparent;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
}

.em.modal-overlay.notif-island-overlay.open {
    visibility: visible;
    pointer-events: none;
}

.em .notif-island-panel {
    position: fixed;
    top: 58px;
    right: 16px;
    left: auto;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 24px));
    max-width: 390px;
    max-height: min(72vh, 600px);
    max-height: min(72dvh, 600px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line2);
    border-radius: 22px;
    background: var(--solid);
    color: var(--tx);
    box-shadow: var(--sh2), 0 16px 52px rgba(0,0,0,.26);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px) scale(.985);
    transform-origin: top right;
    transition: opacity .18s ease, transform .2s var(--ease), visibility .2s;
}

.em.modal-overlay.notif-island-overlay.open .notif-island-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.em .notif-island-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--solid) 92%, var(--ac) 8%);
}

.em .notif-head-icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--acline);
    border-radius: 14px;
    background: var(--acbg);
    color: var(--ac2);
}

.em .notif-head-icon .i {
    width: 20px;
    height: 20px;
}

.em .notif-island-head .col {
    min-width: 0;
    gap: 2px;
}

.em .notif-island-head strong {
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 17px;
    line-height: 1.25;
}

.em .notif-island-head small {
    color: var(--tx3);
    font-size: 12px;
}

.em .notif-island-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--s1);
}

.em .notif-category-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--s2);
}

.em .notif-category-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--tx3);
    font: inherit;
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.em .notif-category-tab.on {
    background: var(--solid);
    color: var(--tx);
    box-shadow: 0 2px 8px rgba(0,0,0,.16);
}

.em .notif-category-count {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--acbg);
    color: var(--ac2);
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.em .notif-category-count.is-zero {
    background: var(--s2);
    color: var(--tx3);
}

.em .notif-read-all {
    padding: 6px 4px;
    border: 0;
    background: transparent;
    color: var(--ac2);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.em .notif-read-all:hover {
    color: var(--tx);
}

.em .notif-island-list {
    flex: 1 1 0%;
    min-height: 0;
    max-height: 100%;
    padding: 5px 8px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}

.em #notifModal .notif-island-panel.has-scroll {
    height: min(600px, calc(100dvh - 88px));
}

.em #notifModal .notif-island-panel.has-scroll .notif-island-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    touch-action: pan-y;
}

body.notif-island-open {
    overflow: hidden;
}

html.notif-island-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.em .notif-empty {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    color: var(--tx2);
    text-align: center;
}

.em .notif-empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--s2);
    color: var(--tx3);
}

.em .notif-empty-icon .i {
    width: 22px;
    height: 22px;
}

.em #notifModal .notif-item {
    padding: 13px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    margin: 3px 0;
    transition: background .14s, border-color .14s;
}

.em #notifModal .notif-item:hover {
    background: var(--s2);
    border-color: var(--line);
}

.em #notifModal .notif-item.unread {
    background: var(--acbg);
    box-shadow: inset 3px 0 0 var(--ac);
}

.em #notifModal .notif-item.unread .notif-item-title {
    color: var(--ac2);
}

.em #notifModal .notif-item-title {
    color: var(--tx);
    font-size: 13.5px;
    font-weight: 650;
}

.em #notifModal .notif-item-preview {
    color: var(--tx2);
    font-size: 12.5px;
}

.em #notifModal .notif-item-date {
    color: var(--tx3);
}

/* Win against the legacy ID-based notification popover rules. */
.em #notifModal .notif-island-panel {
    position: fixed;
    top: 58px;
    right: 16px;
    left: auto;
    width: min(390px, calc(100vw - 24px));
    max-width: 390px;
    max-height: min(72vh, 600px);
    max-height: min(72dvh, 600px);
    padding: 0;
    border: 1px solid var(--line2);
    border-radius: 22px;
    background: var(--solid);
    color: var(--tx);
    box-shadow: var(--sh2), 0 16px 52px rgba(0,0,0,.26);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px) scale(.985);
    transform-origin: top right;
}

.em #notifModal.open .notif-island-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.em #notifModal #notifList {
    padding: 5px 8px 8px !important;
    overflow-y: auto;
}

@media (max-width: 620px) {
    .em #notifModal .notif-island-panel {
        top: 62px !important;
        right: 12px !important;
        width: min(390px, calc(100vw - 24px));
        max-height: min(68vh, 560px);
        max-height: min(68dvh, 560px);
        border-radius: 20px;
    }

    .em .notif-island-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .em #notifModal .notif-island-panel.has-scroll {
        height: min(68dvh, 560px);
    }
}

/* Give game screenshots the full content width and an optional native-size viewer. */
.em .gallery {
    grid-template-columns: minmax(0, 1fr);
}

.em .gallery-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 18px;
}

.em .gallery-themes {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.em .gallery-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 13px;
    background: rgba(12,11,17,.72);
    color: #fff;
    cursor: zoom-in;
    backdrop-filter: blur(10px);
    user-select: none;
    -webkit-user-select: none;
}

.em .gallery-zoom:hover {
    background: rgba(12,11,17,.92);
}

.em .gallery-lightbox[hidden] {
    display: none !important;
}

.em .gallery-lightbox:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    place-items: center;
    padding: 44px 24px 24px;
    background: rgba(4,3,7,.94);
    backdrop-filter: blur(14px);
}

.em .gallery-lightbox figure {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    margin: 0;
}

.em .gallery-lightbox figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(96vw, 2560px);
    max-height: calc(100dvh - 94px);
    object-fit: contain;
    object-position: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    box-shadow: 0 24px 100px rgba(0,0,0,.6);
    user-select: none;
    -webkit-user-drag: none;
}

.em .gallery-lightbox figcaption {
    color: #F3F1F6;
    font-size: 13px;
    font-weight: 600;
}

.em .gallery-lightbox-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
}

body.gallery-view-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .em .gallery-side {
        grid-template-columns: 1fr;
    }

    .em .gallery-themes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .em .gallery-lightbox:not([hidden]) {
        padding: 58px 12px 16px;
    }

    .em .gallery-lightbox figure img {
        max-width: 100%;
        max-height: calc(100dvh - 100px);
        border-radius: 8px;
    }
}

.em .customization-preview {
    display: grid;
    gap: 11px;
    width: 100%;
}

.em .customization-setting {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 14px;
    color: var(--tx2);
    font-size: 12px;
}

.em .customization-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--s3);
}

.em .customization-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,var(--ac),var(--ac2));
}

.em .security-preview {
    width: 100%;
}

.em .security-preview .mock-mod {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* Admin announcement manager. */
.em .admin-notifications-card {
    padding: 0;
    overflow: hidden;
}

.em .admin-notifications-empty {
    padding: 34px 24px;
    color: var(--tx3);
    text-align: center;
}

.em .admin-notifications-empty[hidden],
.em #adminNotificationsTableWrap[hidden] {
    display: none !important;
}

.em .notif-admin-title {
    min-width: 180px;
    font-weight: 650;
}

.em .notif-admin-message {
    min-width: 280px;
    max-width: 640px;
    white-space: normal !important;
}

.em .btn-delete-notification {
    color: var(--bad);
    white-space: nowrap;
}
