@font-face {
    font-family: "Geist";
    src: url("/sonora/geist-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Geist Mono";
    src: url("/sonora/geist-mono-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --sonora-ink: #171916;
    --sonora-ink-soft: #3c3f39;
    --sonora-paper: #f7f7f4;
    --sonora-paper-warm: #f1f0eb;
    --sonora-line: rgba(23, 25, 22, 0.14);
    --sonora-sage: #b8c9bb;
    --sonora-acid: #d8f94b;
    --sonora-blue: #0878e8;
    --sonora-radius: 28px;
}

html,
body,
button,
input,
textarea,
select,
#matrixchat {
    font-family: "Geist", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

code,
pre,
.mx_EventTile_pre_container {
    font-family: "Geist Mono", monospace !important;
}

::selection {
    color: white;
    background: var(--sonora-blue);
}

/* Acceso: tarjeta editorial inspirada en la web corporativa de Sonora. */
.mx_AuthPage {
    position: relative;
    min-height: 100dvh;
    background-position: center !important;
    background-size: cover !important;
}

.mx_AuthPage::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(23, 25, 22, 0.12), rgba(23, 25, 22, 0.28)),
        linear-gradient(180deg, rgba(247, 247, 244, 0.08), rgba(23, 25, 22, 0.35));
}

.mx_AuthPage_modal {
    z-index: 1;
    width: min(1120px, calc(100vw - 80px));
    min-height: min(650px, calc(100dvh - 100px));
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 32px !important;
    background: rgba(247, 247, 244, 0.96) !important;
    box-shadow: 0 36px 110px rgba(23, 25, 22, 0.26) !important;
}

.mx_AuthPage_modalBlur {
    display: none;
}

.mx_AuthPage_modalContent {
    width: 100%;
    background: transparent !important;
}

.mx_AuthHeader {
    position: relative;
    width: 47%;
    flex: 0 0 47%;
    padding: 46px;
    overflow: hidden;
    color: white;
    background:
        linear-gradient(180deg, rgba(23, 25, 22, 0.15) 10%, rgba(23, 25, 22, 0.78) 100%),
        url("/sonora/sonora-team-2026.png") 30% center / cover no-repeat;
}

.mx_AuthHeader::before {
    position: absolute;
    top: 52px;
    right: 46px;
    width: 13px;
    height: 13px;
    content: "";
    border-radius: 999px;
    background: var(--sonora-acid);
    box-shadow: 0 0 0 8px rgba(216, 249, 75, 0.14);
}

.mx_AuthHeader::after {
    position: absolute;
    right: 46px;
    bottom: 112px;
    left: 46px;
    content: "Donde el equipo\A trabaja en sintonía.";
    white-space: pre-line;
    color: white;
    font-size: clamp(36px, 3.8vw, 58px);
    font-weight: 570;
    line-height: 0.92;
    letter-spacing: -0.065em;
}

.mx_AuthHeaderLogo {
    z-index: 1;
    flex: 0 0 auto;
    width: 225px;
    margin: 0;
    padding: 0;
}

.mx_AuthHeaderLogo::after {
    display: block;
    margin-top: 19px;
    content: "ESPACIO INTERNO · SONORA";
    color: rgba(255, 255, 255, 0.74);
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.12em;
}

.mx_AuthHeaderLogo img {
    width: 225px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
    filter: invert(1) brightness(2);
}

.mx_AuthHeader .mx_AuthBody_language {
    z-index: 1;
    width: max-content;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.9) !important;
}

.mx_AuthHeader .mx_Dropdown_input,
.mx_AuthHeader .mx_Dropdown_option {
    color: white !important;
}

.mx_AuthHeader .mx_Dropdown_arrow {
    fill: white !important;
}

.mx_AuthBody {
    width: 53%;
    flex: 1 1 53%;
    padding: 74px clamp(48px, 6vw, 86px);
    color: var(--sonora-ink-soft) !important;
    border-radius: 0 !important;
    background: var(--sonora-paper) !important;
}

.mx_AuthBody h1 {
    margin: 22px 0 34px;
    color: var(--sonora-ink) !important;
    font-size: clamp(42px, 4vw, 62px) !important;
    font-weight: 560 !important;
    line-height: 0.94;
    letter-spacing: -0.06em;
}

.mx_AuthBody h1::after {
    display: block;
    max-width: 340px;
    margin-top: 18px;
    content: "Conversaciones, archivos y llamadas en un único lugar seguro.";
    color: #6e716c;
    font-size: 14px;
    font-weight: 460;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.mx_ServerPicker {
    margin-bottom: 30px;
    padding: 13px 15px;
    border: 1px solid var(--sonora-line);
    border-radius: 14px;
    background: var(--sonora-paper-warm);
}

.mx_ServerPicker h2 {
    margin: 0 0 5px;
    color: #777b74 !important;
    font-family: "Geist Mono", monospace !important;
    font-size: 9px !important;
    font-weight: 650 !important;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.mx_ServerPicker_server {
    color: var(--sonora-ink) !important;
    font-size: 13px;
    font-weight: 620;
}

.mx_AuthBody .mx_Field {
    margin: 12px 0;
}

.mx_AuthBody .mx_Field input,
.mx_AuthBody .mx_Field select {
    min-height: 54px;
    padding-right: 17px;
    padding-left: 17px;
    color: var(--sonora-ink) !important;
    border: 1px solid var(--sonora-line) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(23, 25, 22, 0.03);
}

.mx_AuthBody .mx_Field input:focus,
.mx_AuthBody .mx_Field select:focus {
    border-color: var(--sonora-blue) !important;
    box-shadow: 0 0 0 3px rgba(8, 120, 232, 0.12) !important;
}

.mx_AuthBody .mx_Field label {
    color: #6e716c !important;
}

.mx_AuthBody .mx_Field_labelAlwaysTopLeft label,
.mx_AuthBody .mx_Field input:focus + label,
.mx_AuthBody .mx_Field input:not(:placeholder-shown) + label {
    background: #fff !important;
}

.mx_Login_submit {
    min-height: 51px !important;
    margin: 20px 0 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: white !important;
    background: var(--sonora-ink) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    transition: transform 160ms ease, background 160ms ease !important;
}

.mx_Login_submit:hover {
    background: var(--sonora-blue) !important;
    transform: translateY(-1px);
}

.mx_AuthFooter {
    z-index: 1;
    width: auto;
    margin: 0 auto;
    padding: 20px;
    background: transparent;
    font-family: "Geist Mono", monospace !important;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mx_AuthFooter a:link,
.mx_AuthFooter a:hover,
.mx_AuthFooter a:visited {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* Aplicación: papel cálido, navegación oscura y superficies sobrias. */
.mx_MatrixChat,
.mx_RoomView,
.mx_MainSplit,
.mx_RoomView_body,
.mx_RoomView_MessageList {
    background: var(--sonora-paper) !important;
}

.mx_SpacePanel {
    background: var(--sonora-ink) !important;
}

.mx_LeftPanel,
.mx_LeftPanel_roomListContainer,
.mx_LeftPanel .mx_LeftPanel_roomListContainer {
    background: var(--sonora-paper-warm) !important;
}

.mx_LeftPanel {
    border-right: 1px solid var(--sonora-line);
}

.mx_RoomHeader {
    border-bottom: 1px solid var(--sonora-line) !important;
    background: rgba(247, 247, 244, 0.94) !important;
    backdrop-filter: blur(20px);
}

.mx_RoomHeader:hover {
    background: #fff !important;
}

.mx_MessageComposer_wrapper,
.mx_MessageComposer {
    border-color: var(--sonora-line) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 28px rgba(23, 25, 22, 0.05);
}

.mx_EventTile:hover .mx_EventTile_line,
.mx_EventTile_selected .mx_EventTile_line {
    background: rgba(184, 201, 187, 0.16) !important;
}

.mx_RoomTile_selected,
.mx_RoomTile_selected:hover {
    background: #fff !important;
    box-shadow: inset 3px 0 0 var(--sonora-blue);
}

.mx_SearchBox,
.mx_RoomSearch,
.mx_RoomListSearch {
    border-radius: 999px !important;
}

@media (max-width: 820px) {
    .mx_AuthPage_modal {
        width: min(720px, calc(100vw - 36px));
    }

    .mx_AuthHeader {
        width: 38%;
        flex-basis: 38%;
        padding: 30px;
    }

    .mx_AuthHeader::after {
        right: 30px;
        bottom: 100px;
        left: 30px;
        font-size: 38px;
    }

    .mx_AuthHeaderLogo,
    .mx_AuthHeaderLogo img {
        width: 170px;
    }

    .mx_AuthBody {
        width: 62%;
        padding: 52px 40px;
    }
}

@media (max-width: 620px) {
    .mx_AuthPage {
        background: var(--sonora-paper) !important;
    }

    .mx_AuthPage::before,
    .mx_AuthHeader {
        display: none;
    }

    .mx_AuthPage_modal {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .mx_AuthBody {
        width: 100%;
        padding: 46px 24px;
    }

    .mx_AuthBody::before {
        display: block;
        width: 185px;
        height: 48px;
        margin-bottom: 58px;
        content: "";
        background: url("/sonora/sonora-logo.svg") left center / contain no-repeat;
    }

    .mx_AuthBody h1 {
        font-size: 46px !important;
    }

    .mx_AuthFooter {
        display: none;
    }
}

@container homepage (max-width: 760px) {
    .mx_HomePage_body > div > div:nth-child(2) {
        padding: 54px 8px 38px;
    }

    .mx_HomePage_body > div > div:nth-child(2) > h1 {
        font-size: clamp(56px, 13cqw, 78px);
    }

    .mx_HomePage_body > div > div:nth-child(3) {
        grid-template-columns: 1fr;
    }

    .mx_HomePage_body > div > div:nth-child(3) > div {
        min-height: 142px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* Estructura permitida por el sanitizador de la portada de Element. */
.mx_HomePage_body > div {
    width: 100%;
}

.mx_HomePage_body > div > div:first-child {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.mx_HomePage_body > div > div:first-child img {
    width: 172px;
    height: auto;
}

.mx_HomePage_body > div > div:first-child span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #596059;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.mx_HomePage_body > div > div:first-child span::before {
    width: 9px;
    height: 9px;
    content: "";
    border-radius: 50%;
    background: var(--sonora-acid);
    box-shadow: 0 0 0 6px rgba(216, 249, 75, 0.20);
}

.mx_HomePage_body > div > div:nth-child(2) {
    padding: clamp(58px, 8vh, 96px) 18px 46px;
}

.mx_HomePage_body > div > div:nth-child(2) > span {
    display: block;
    margin-bottom: 20px;
    color: #727870;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mx_HomePage_body > div > div:nth-child(2) > h1 {
    max-width: 900px;
    margin: 0;
    color: var(--sonora-ink);
    font-size: clamp(62px, 7.5vw, 112px);
    font-weight: 560;
    line-height: 0.84;
    letter-spacing: -0.078em;
}

.mx_HomePage_body > div > div:nth-child(2) > h1 em {
    color: #71857a;
    font-style: normal;
}

.mx_HomePage_body > div > div:nth-child(2) > p {
    max-width: 700px;
    margin: 30px 0 0;
    color: #4e554f;
    font-size: clamp(16px, 1.8vw, 21px);
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.mx_HomePage_body > div > div:nth-child(3) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mx_HomePage_body > div > div:nth-child(3) > div {
    min-height: 190px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.44);
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.mx_HomePage_body > div > div:nth-child(3) > div:nth-child(2) {
    background: rgba(232, 239, 232, 0.62);
}

.mx_HomePage_body > div > div:nth-child(3) > div:nth-child(3) {
    color: white;
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), transparent 45%), rgba(23, 25, 22, 0.88);
}

.mx_HomePage_body > div > div:nth-child(3) span {
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.10em;
    opacity: 0.58;
}

.mx_HomePage_body > div > div:nth-child(3) strong {
    margin-top: auto;
    font-size: 24px;
    font-weight: 590;
    letter-spacing: -0.04em;
}

.mx_HomePage_body > div > div:nth-child(3) p {
    margin: 10px 0 0;
    color: #656c65;
    font-size: 13px;
    line-height: 1.45;
}

.mx_HomePage_body > div > div:nth-child(3) > div:nth-child(3) p {
    color: rgba(255, 255, 255, 0.64);
}

.mx_HomePage_body > div > div:nth-child(4) {
    margin-top: 34px;
    padding: 20px 5px 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(23, 25, 22, 0.12);
    color: #747a73;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mx_ToastContainer .mx_Toast_toast {
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    border-radius: 20px !important;
    background: rgba(247, 248, 244, 0.70) !important;
    box-shadow: 0 22px 64px rgba(23, 25, 22, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(30px) saturate(185%);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
}

@media (max-width: 900px) {
    .mx_HomePage_body > div > div:nth-child(2) {
        padding: 54px 8px 36px;
    }

    .mx_HomePage_body > div > div:nth-child(2) > h1 {
        font-size: clamp(54px, 10vw, 84px);
    }

    .mx_HomePage_body > div > div:nth-child(3) {
        grid-template-columns: 1fr;
    }

    .mx_HomePage_body > div > div:nth-child(3) > div {
        min-height: 150px;
    }
}

@media (max-width: 620px) {
    .mx_HomePage_body > div > div:first-child {
        padding: 15px 17px;
        border-radius: 19px;
    }

    .mx_HomePage_body > div > div:first-child img {
        width: 145px;
    }

    .mx_HomePage_body > div > div:first-child span {
        display: none;
    }

    .mx_HomePage_body > div > div:nth-child(2) > h1 {
        font-size: 52px;
    }

    .mx_HomePage_body > div > div:nth-child(4) {
        gap: 16px;
        flex-direction: column;
    }
}

/*
 * Sonora Liquid Glass
 * El vidrio se reserva para navegación, controles y capas temporales. El
 * contenido mantiene superficies más calmadas para preservar la legibilidad.
 */
:root {
    --sonora-glass: rgba(255, 255, 255, 0.56);
    --sonora-glass-strong: rgba(252, 252, 248, 0.76);
    --sonora-glass-dark: rgba(20, 23, 20, 0.82);
    --sonora-glass-line: rgba(255, 255, 255, 0.72);
    --sonora-glass-shadow: 0 24px 70px rgba(37, 47, 40, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    --sonora-glass-shadow-soft: 0 12px 34px rgba(37, 47, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.mx_MatrixChat {
    padding: 0;
    background:
        radial-gradient(circle at 78% 5%, rgba(171, 198, 212, 0.55), transparent 34%),
        radial-gradient(circle at 20% 96%, rgba(216, 249, 75, 0.23), transparent 28%),
        radial-gradient(circle at 52% 60%, rgba(184, 201, 187, 0.42), transparent 42%),
        linear-gradient(145deg, #e8ede9 0%, #f8f8f4 48%, #e8eeee 100%) !important;
}

.mx_MatrixChat_wrapper {
    background: #e8ede9;
}

.mx_SpacePanel {
    margin: 10px 0 10px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 28px;
    color: white;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.10), transparent 38%),
        var(--sonora-glass-dark) !important;
    box-shadow: 0 24px 60px rgba(23, 25, 22, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(34px) saturate(180%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
}

.mx_SpacePanel .mx_SpaceButton_selectionWrapper,
.mx_SpacePanel [class*="_triggerButton_"] {
    border: 1px solid transparent;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.mx_SpacePanel .mx_SpaceButton:hover .mx_SpaceButton_selectionWrapper,
.mx_SpacePanel .mx_SpaceButton_active .mx_SpaceButton_selectionWrapper,
.mx_SpacePanel [class*="_triggerButton_"]:hover {
    border-color: rgba(255, 255, 255, 0.24) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.mx_SpacePanel .mx_SpaceButton_icon {
    color: white !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.mx_LeftPanel_outerWrapper {
    min-height: 0;
    margin: 10px 0 10px 8px;
    overflow: hidden;
    border: 1px solid var(--sonora-glass-line);
    border-radius: 28px;
    background: var(--sonora-glass);
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(34px) saturate(170%);
    -webkit-backdrop-filter: blur(34px) saturate(170%);
}

.mx_LeftPanel,
.mx_LeftPanel_roomListContainer,
.mx_LeftPanel .mx_LeftPanel_roomListContainer,
.mx_RoomListPanel {
    background: transparent !important;
}

.mx_RoomListPanel > div:first-child,
.mx_RoomListPanel header {
    border-bottom-color: rgba(23, 25, 22, 0.08) !important;
    background: rgba(255, 255, 255, 0.18);
}

.mx_RoomListPanel button,
.mx_RoomListPanel [role="option"] {
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mx_RoomListPanel [role="search"] button,
.mx_RoomListPanel [role="search"] + button,
.mx_RoomListPanel [role="listbox"] [role="option"] {
    border-color: rgba(255, 255, 255, 0.74) !important;
    background: rgba(255, 255, 255, 0.44) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 16px rgba(37, 47, 40, 0.05);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.mx_RoomListPanel [role="listbox"] [role="option"][aria-selected="true"] {
    color: white !important;
    border-color: rgba(23, 25, 22, 0.82) !important;
    background: rgba(23, 25, 22, 0.88) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 7px 18px rgba(23, 25, 22, 0.14);
}

.mx_RoomListPanel [class*="_genericPlaceholder_"] {
    margin: 22px;
    padding: 30px 22px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mx_RoomListPanel [class*="_genericPlaceholder_"] > button {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.58) !important;
    box-shadow: var(--sonora-glass-shadow-soft);
    text-decoration: none !important;
}

.mx_Separator {
    margin: 18px 2px !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38) !important;
}

.mx_RoomView_wrapper {
    min-width: 0;
    margin: 10px;
    overflow: hidden;
    border: 1px solid var(--sonora-glass-line);
    border-radius: 30px;
    background: rgba(247, 247, 244, 0.72) !important;
    box-shadow: var(--sonora-glass-shadow);
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
}

.mx_RoomView,
.mx_MainSplit,
.mx_RoomView_body,
.mx_RoomView_MessageList,
.mx_HomePage {
    background: transparent !important;
}

.mx_RoomHeader {
    margin: 10px 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.50) !important;
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.mx_RoomHeader:hover {
    background: rgba(255, 255, 255, 0.66) !important;
}

.mx_MessageComposer_wrapper,
.mx_MessageComposer {
    border: 1px solid rgba(255, 255, 255, 0.80) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.58) !important;
    box-shadow: 0 14px 44px rgba(37, 47, 40, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

/* Portada insertada por Element: el CSS del documento embebido no se conserva. */
.mx_HomePage {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: auto;
}

.mx_HomePage_body {
    width: min(1180px, calc(100% - 64px));
    min-height: 100%;
    margin: 0 auto;
    padding: 34px 0 44px;
    box-sizing: border-box;
}

.mx_HomePage_body > main {
    width: 100%;
}

.mx_HomePage_body header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.mx_HomePage_body header img {
    width: 172px;
    height: auto;
}

.mx_HomePage_body header span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #596059;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.mx_HomePage_body header span::before {
    width: 9px;
    height: 9px;
    content: "";
    border-radius: 50%;
    background: var(--sonora-acid);
    box-shadow: 0 0 0 6px rgba(216, 249, 75, 0.20);
}

.mx_HomePage_body section {
    padding: clamp(58px, 8vh, 96px) 18px 46px;
}

.mx_HomePage_body section > small {
    display: block;
    margin-bottom: 20px;
    color: #727870;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mx_HomePage_body section > h1 {
    max-width: 900px;
    margin: 0;
    color: var(--sonora-ink);
    font-size: clamp(62px, 7.5vw, 112px);
    font-weight: 560;
    line-height: 0.84;
    letter-spacing: -0.078em;
}

.mx_HomePage_body section > h1 em {
    color: #71857a;
    font-style: normal;
}

.mx_HomePage_body section > p {
    max-width: 700px;
    margin: 30px 0 0;
    color: #4e554f;
    font-size: clamp(16px, 1.8vw, 21px);
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.mx_HomePage_body .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mx_HomePage_body article {
    min-height: 190px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.44);
    box-shadow: var(--sonora-glass-shadow-soft);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.mx_HomePage_body article:nth-child(2) {
    background: rgba(232, 239, 232, 0.62);
}

.mx_HomePage_body article:nth-child(3) {
    color: white;
    border-color: rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.10), transparent 45%),
        rgba(23, 25, 22, 0.88);
}

.mx_HomePage_body article > span {
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.10em;
    opacity: 0.58;
}

.mx_HomePage_body article strong {
    margin-top: auto;
    font-size: 24px;
    font-weight: 590;
    letter-spacing: -0.04em;
}

.mx_HomePage_body article p {
    margin: 10px 0 0;
    color: #656c65;
    font-size: 13px;
    line-height: 1.45;
}

.mx_HomePage_body article:nth-child(3) p {
    color: rgba(255, 255, 255, 0.64);
}

.mx_HomePage_body footer {
    margin-top: 34px;
    padding: 20px 5px 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(23, 25, 22, 0.12);
    color: #747a73;
    font-family: "Geist Mono", monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Menús flotantes y menús contextuales. */
[role="menu"],
.mx_ContextualMenu {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    border-radius: 20px !important;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.38), transparent 42%),
        rgba(247, 248, 244, 0.70) !important;
    box-shadow: 0 24px 70px rgba(23, 25, 22, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: blur(34px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(34px) saturate(190%) !important;
    animation: sonora-glass-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

[role="menu"] [role^="menuitem"] {
    margin: 4px 7px;
    border-radius: 13px;
    transition: background 140ms ease, transform 140ms ease;
}

[role="menu"] [role^="menuitem"]:hover,
[role="menu"] [role^="menuitem"]:focus-visible {
    background: rgba(255, 255, 255, 0.62) !important;
    transform: translateY(-1px);
}

[role="menu"] h3 {
    color: #747b74 !important;
    font-family: "Geist Mono", monospace !important;
    font-size: 9px !important;
    font-weight: 650 !important;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

[class*="_tooltip_"] {
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    border-radius: 12px !important;
    background: rgba(23, 25, 22, 0.82) !important;
    box-shadow: 0 12px 34px rgba(23, 25, 22, 0.18);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* Diálogos y popups de flujo. */
.mx_Dialog_background {
    opacity: 1 !important;
    background:
        radial-gradient(circle at 50% 35%, rgba(171, 198, 212, 0.18), transparent 34%),
        rgba(18, 21, 18, 0.36) !important;
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.mx_Dialog_border {
    padding: 1px !important;
    border: 0 !important;
    border-radius: 34px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.18)) !important;
    box-shadow: 0 34px 100px rgba(16, 21, 17, 0.26), 0 0 0 7px rgba(255, 255, 255, 0.12) !important;
    animation: sonora-glass-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mx_Dialog {
    overflow: hidden;
    border: 0 !important;
    border-radius: 33px !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 38%),
        rgba(247, 248, 244, 0.74) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(44px) saturate(190%);
    -webkit-backdrop-filter: blur(44px) saturate(190%);
}

.mx_Dialog_header {
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(23, 25, 22, 0.09);
}

.mx_Dialog_title {
    color: var(--sonora-ink) !important;
    font-size: 28px !important;
    font-weight: 590 !important;
    letter-spacing: -0.045em;
}

.mx_Dialog_content {
    color: var(--sonora-ink-soft) !important;
}

.mx_Dialog .mx_Field input,
.mx_Dialog .mx_Field textarea,
.mx_Dialog .mx_Field select,
.mx_Dialog input[type="text"],
.mx_Dialog input[type="password"],
.mx_Dialog textarea,
.mx_Dialog select {
    border: 1px solid rgba(255, 255, 255, 0.76) !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.46) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 5px 18px rgba(37, 47, 40, 0.05);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.mx_Dialog .mx_Field input:focus,
.mx_Dialog .mx_Field textarea:focus,
.mx_Dialog input[type="text"]:focus,
.mx_Dialog input[type="password"]:focus {
    border-color: rgba(8, 120, 232, 0.72) !important;
    box-shadow: 0 0 0 4px rgba(8, 120, 232, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
}

.mx_Dialog_buttons {
    padding-top: 24px;
    border-top: 1px solid rgba(23, 25, 22, 0.08);
}

.mx_Dialog_buttons button,
.mx_Dialog_buttons [role="button"] {
    min-height: 44px !important;
    padding: 0 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.46) !important;
    box-shadow: var(--sonora-glass-shadow-soft) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.mx_Dialog_buttons .mx_Dialog_primary,
.mx_Dialog button.mx_Dialog_primary {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 46%),
        rgba(23, 25, 22, 0.90) !important;
    box-shadow: 0 12px 28px rgba(23, 25, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.mx_Dialog_buttons .mx_Dialog_primary:hover,
.mx_Dialog button.mx_Dialog_primary:hover {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 46%),
        rgba(8, 120, 232, 0.90) !important;
}

.mx_Dialog_cancelButton {
    top: 17px !important;
    right: 17px !important;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--sonora-glass-shadow-soft);
}

/* El acceso también adopta el material, manteniendo el panel fotográfico. */
.mx_AuthPage_modal {
    border-color: rgba(255, 255, 255, 0.72) !important;
    background: rgba(247, 247, 244, 0.58) !important;
    box-shadow: 0 42px 120px rgba(23, 25, 22, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(38px) saturate(175%);
    -webkit-backdrop-filter: blur(38px) saturate(175%);
}

.mx_AuthBody {
    border-left: 1px solid rgba(255, 255, 255, 0.70);
    background: rgba(247, 247, 244, 0.74) !important;
    backdrop-filter: blur(34px) saturate(165%);
    -webkit-backdrop-filter: blur(34px) saturate(165%);
}

.mx_AuthBody .mx_Field input,
.mx_AuthBody .mx_Field select,
.mx_ServerPicker {
    border-color: rgba(255, 255, 255, 0.78) !important;
    background: rgba(255, 255, 255, 0.46) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 24px rgba(37, 47, 40, 0.06);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

@keyframes sonora-glass-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.975);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 900px) {
    .mx_SpacePanel {
        margin: 6px 0 6px 6px !important;
        border-radius: 22px;
    }

    .mx_LeftPanel_outerWrapper {
        margin: 6px 0 6px 6px;
        border-radius: 22px;
    }

    .mx_RoomView_wrapper {
        margin: 6px;
        border-radius: 24px;
    }

    .mx_HomePage_body {
        width: min(100% - 36px, 760px);
        padding-top: 22px;
    }

    .mx_HomePage_body section {
        padding: 54px 8px 36px;
    }

    .mx_HomePage_body section > h1 {
        font-size: clamp(54px, 10vw, 84px);
    }

    .mx_HomePage_body .grid {
        grid-template-columns: 1fr;
    }

    .mx_HomePage_body article {
        min-height: 150px;
    }
}

@media (max-width: 620px) {
    .mx_AuthPage_modal,
    .mx_AuthBody {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .mx_HomePage_body {
        width: calc(100% - 24px);
    }

    .mx_HomePage_body header {
        padding: 15px 17px;
        border-radius: 19px;
    }

    .mx_HomePage_body header img {
        width: 145px;
    }

    .mx_HomePage_body header span {
        display: none;
    }

    .mx_HomePage_body section > h1 {
        font-size: 52px;
    }

    .mx_HomePage_body footer {
        gap: 16px;
        flex-direction: column;
    }

    .mx_Dialog_border {
        max-width: calc(100vw - 20px) !important;
        border-radius: 27px !important;
    }

    .mx_Dialog {
        border-radius: 26px !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .mx_SpacePanel,
    .mx_LeftPanel_outerWrapper,
    .mx_RoomView_wrapper,
    .mx_RoomHeader,
    .mx_MessageComposer,
    .mx_MessageComposer_wrapper,
    [role="menu"],
    .mx_ContextualMenu,
    .mx_Dialog,
    .mx_AuthPage_modal,
    .mx_AuthBody {
        background: var(--sonora-paper) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .mx_SpacePanel {
        color: white;
        background: var(--sonora-ink) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    [role="menu"],
    .mx_ContextualMenu,
    .mx_Dialog_border {
        animation: none !important;
    }
}

/* Debe ir después de las reglas generales: responde al ancho del panel, no al de la ventana. */
@container homepage (max-width: 760px) {
    .mx_HomePage_body > div > div:nth-child(2) {
        padding: 54px 8px 38px;
    }

    .mx_HomePage_body > div > div:nth-child(2) > h1 {
        font-size: clamp(56px, 13cqw, 78px);
    }

    .mx_HomePage_body > div > div:nth-child(3) {
        grid-template-columns: 1fr;
    }

    .mx_HomePage_body > div > div:nth-child(3) > div {
        min-height: 142px;
    }
}
