.account-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-guest,
.account-signed {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-button {
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.055);
    color: #fff;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.account-button:hover {
    border-color: rgba(74,163,255,.45);
    background: rgba(74,163,255,.09);
}

.account-button-primary {
    background: #4aa3ff;
    border-color: #4aa3ff;
    color: #07101d;
}

.account-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
}

.account-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(74,163,255,.14);
    font-size: 14px;
}

.account-user-text {
    line-height: 1.15;
}

.account-user-text strong {
    display: block;
    font-size: 12px;
}

.account-save-status {
    display: block;
    color: #8da0b7;
    font-size: 10px;
    margin-top: 2px;
}

.account-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 18px;
}

.account-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(7px);
}

.account-card {
    position: relative;
    z-index: 2;
    width: min(480px,100%);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 24px;
    padding: 29px;
    background: #101b2b;
    box-shadow: 0 30px 90px rgba(0,0,0,.6);
}

.account-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.account-card-header h2 {
    margin: 5px 0 0;
    font-size: 28px;
}

.account-close {
    width: 39px;
    height: 39px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: white;
    cursor: pointer;
    font-size: 22px;
}

.account-intro {
    color: #8da0b7;
    line-height: 1.55;
    margin: 18px 0 21px;
}

.account-field {
    display: block;
    margin-top: 14px;
}

.account-field span {
    display: block;
    margin-bottom: 7px;
    color: #a8b6c8;
    font-size: 12px;
    font-weight: 800;
}

.account-field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 12px;
    padding: 13px 14px;
    background: rgba(255,255,255,.045);
    color: white;
    font: inherit;
    outline: none;
}

.account-field input:focus {
    border-color: rgba(74,163,255,.65);
    box-shadow: 0 0 0 3px rgba(74,163,255,.1);
}

.account-code-input {
    text-align: center;
    letter-spacing: .3em;
    font-size: 25px !important;
    font-weight: 900;
}

.account-submit {
    width: 100%;
    margin-top: 20px;
    min-height: 50px;
    border: 0;
    border-radius: 13px;
    background: #4aa3ff;
    color: #07101d;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.account-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.account-error {
    margin-top: 15px;
    padding: 11px 13px;
    border: 1px solid rgba(255,100,100,.28);
    border-radius: 11px;
    background: rgba(255,80,80,.08);
    color: #ffaaaa;
    font-size: 13px;
}

.account-code-message {
    margin: 18px 0 4px;
    color: #a8b6c8;
    line-height: 1.55;
}

.account-code-message strong {
    color: white;
}

.account-back-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #77baff;
    cursor: pointer;
    margin-top: 14px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.account-privacy {
    margin: 18px 0 0;
    color: #718399;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.account-save-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 0;
    padding: 17px 19px;
    border: 1px solid rgba(74,163,255,.2);
    border-radius: 16px;
    background: rgba(74,163,255,.055);
}

.account-save-callout strong {
    display: block;
}

.account-save-callout span {
    display: block;
    margin-top: 3px;
    color: #8da0b7;
    font-size: 12px;
}

@media (max-width: 760px) {
    .account-user-text {
        display: none;
    }

    .account-button {
        padding: 0 11px;
    }

    .account-save-callout {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ========================================================
   SIGNED-IN ACCOUNT MENU
   ======================================================== */

.account-signed {
    position: relative;
}

.account-menu-button {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: rgba(255,255,255,.04);
    color: white;
    font: inherit;
    cursor: pointer;
}

.account-menu-button:hover {
    border-color: rgba(74,163,255,.4);
    background: rgba(74,163,255,.07);
}

.account-menu-arrow {
    color: #8295ab;
    font-size: 11px;
    margin-left: 3px;
}

.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    width: 285px;
    z-index: 250;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: #121f31;
    box-shadow: 0 18px 55px rgba(0,0,0,.45);
}

.account-menu-profile {
    padding: 17px;
}

.account-menu-profile strong {
    display: block;
    font-size: 14px;
}

.account-menu-profile span {
    display: block;
    margin-top: 4px;
    color: #8da0b7;
    font-size: 12px;
    word-break: break-word;
}

.account-menu-divider {
    height: 1px;
    background: rgba(255,255,255,.09);
}

.account-menu-status {
    display: flex;
    gap: 10px;
    padding: 14px 17px;
}

.account-menu-status > span {
    font-size: 20px;
}

.account-menu-status strong {
    display: block;
    font-size: 12px;
}

.account-menu-status small {
    display: block;
    margin-top: 3px;
    color: #8295ab;
    font-size: 10px;
    line-height: 1.4;
}

.account-menu-logout {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.09);
    background: transparent;
    color: #ff9a9a;
    padding: 14px 17px;
    text-align: left;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.account-menu-logout:hover {
    background: rgba(255,90,90,.07);
}

/* ========================================================
   VISIBILITY SAFETY
   Keep this at the END of account.css.
   ======================================================== */

.hidden {
    display: none !important;
}

.account-modal.hidden,
#accountRequestStep.hidden,
#accountVerifyStep.hidden,
#accountError.hidden,
#accountSignedIn.hidden,
#accountMenu.hidden {
    display: none !important;
}
