:root {
    --docs-bg: #0A0B0E;
    --docs-surface: #151922;
    --docs-surface-soft: #1B202A;
    --docs-wine: #6B2435;
    --docs-wine-bright: #8A3048;
    --docs-text: #F7F0E4;
    --docs-muted: #C8BEB1;
    --docs-copper: #D19A6E;
    --docs-copper-bright: #E5B189;
    --docs-border: rgba(209, 154, 110, 0.36);
}

.docs-dock {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 145;
    width: 54px;
    height: 54px;
    margin: 0;
    transform: translateX(-50%);
    font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.docs-dock--with-board {
    left: auto;
    right: 448px;
    transform: none;
}

.docs-dock > summary {
    list-style: none;
}

.docs-dock > summary::-webkit-details-marker {
    display: none;
}

.docs-dock-button {
    position: relative;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(229, 177, 137, 0.72);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 24%, rgba(229, 177, 137, 0.18), transparent 38%),
        linear-gradient(145deg, #7D2A3F, #531B2B 68%, #35121D);
    color: var(--docs-text);
    box-shadow:
        0 15px 42px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(107, 36, 53, 0.18),
        0 0 24px rgba(209, 154, 110, 0.17),
        inset 0 1px 0 rgba(247, 240, 228, 0.12);
    cursor: pointer;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}

.docs-dock-button:hover,
.docs-dock[open] .docs-dock-button {
    border-color: var(--docs-copper-bright);
    background:
        radial-gradient(circle at 32% 24%, rgba(247, 240, 228, 0.20), transparent 40%),
        linear-gradient(145deg, #91344D, #642035 68%, #3C1421);
    box-shadow:
        0 18px 46px rgba(0, 0, 0, 0.54),
        0 0 0 1px rgba(229, 177, 137, 0.13),
        0 0 31px rgba(209, 154, 110, 0.24),
        inset 0 1px 0 rgba(247, 240, 228, 0.16);
    transform: translateY(-2px);
}

.docs-dock-button:focus-visible {
    outline: 2px solid var(--docs-copper-bright);
    outline-offset: 3px;
}

.docs-dock-icon {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.34));
}

.docs-dropup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    width: min(300px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid var(--docs-border);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(21, 25, 34, 0.995), rgba(10, 11, 14, 0.995));
    color: var(--docs-text);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        0 0 34px rgba(107, 36, 53, 0.15),
        inset 0 1px 0 rgba(247, 240, 228, 0.035);
    transform: translateX(-50%) translateY(7px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 140ms ease,
        transform 170ms ease,
        visibility 0s linear 170ms;
}

.docs-dock--with-board .docs-dropup {
    left: 0;
    transform: translateY(7px);
}

.docs-dock[open] .docs-dropup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition:
        opacity 140ms ease,
        transform 170ms ease,
        visibility 0s linear 0s;
}

.docs-dock--with-board[open] .docs-dropup {
    transform: translateY(0);
}

.docs-dropup-header {
    min-height: 68px;
    padding: 13px 14px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(209, 154, 110, 0.20);
    background:
        linear-gradient(100deg, rgba(107, 36, 53, 0.25), rgba(21, 25, 34, 0.72) 58%, rgba(10, 11, 14, 0.35));
}

.docs-dropup-header > div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.docs-dropup-kicker {
    color: var(--docs-copper);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.docs-dropup-header strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 600;
}

.docs-dropup-age {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(229, 177, 137, 0.42);
    border-radius: 50%;
    background: rgba(107, 36, 53, 0.22);
    color: var(--docs-copper-bright);
    font-size: 11px;
    font-weight: 800;
}

.docs-dropup-links {
    padding: 7px;
    display: grid;
    gap: 1px;
}

.docs-dropup-links a {
    min-height: 38px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--docs-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.docs-dropup-links a:hover,
.docs-dropup-links a:focus-visible {
    border-color: rgba(209, 154, 110, 0.14);
    background: rgba(247, 240, 228, 0.045);
    color: var(--docs-text);
    outline: 0;
}

.docs-dropup-links a.is-active {
    border-color: rgba(209, 154, 110, 0.28);
    background: linear-gradient(90deg, rgba(107, 36, 53, 0.28), rgba(209, 154, 110, 0.045));
    color: var(--docs-copper-bright);
}

.docs-dropup-separator {
    height: 1px;
    margin: 5px 4px;
    background: rgba(209, 154, 110, 0.16);
}

.docs-dropup-footer {
    padding: 10px 14px 11px;
    border-top: 1px solid rgba(209, 154, 110, 0.16);
    color: rgba(200, 190, 177, 0.72);
    font-size: 10px;
    line-height: 1.35;
}

.docs-dropup-footer strong {
    color: rgba(229, 177, 137, 0.88);
    font-weight: 650;
}

/* Cuando existe Pizarra, el botón ocupa el módulo izquierdo de la barra inferior. */
@media (max-width: 760px) {
    .docs-dock {
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .docs-dock--with-board {
        left: 10px;
        right: auto;
    }

    .docs-dock--with-board ~ .catalog-board-widget {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 84px);
        transform: none;
    }

    .docs-dock--with-board ~ .profile-shell .profile-sequence-control {
        bottom: max(74px, calc(64px + env(safe-area-inset-bottom)));
    }

    .docs-dropup {
        width: min(300px, calc(100vw - 20px));
    }
}

@media (max-width: 480px) {
    .docs-dock {
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .docs-dock--with-board {
        left: 8px;
    }

    .docs-dock--with-board ~ .catalog-board-widget,
    .docs-dock--with-board ~ .catalog-board-widget.is-open {
        right: 0;
        bottom: 0;
        width: calc(100vw - 70px);
        transform: none;
        border-width: 1px 0 0 1px;
        border-radius: 16px 0 0 0;
    }

    .docs-dock--with-board ~ .profile-shell .profile-sequence-control {
        bottom: max(72px, calc(64px + env(safe-area-inset-bottom)));
    }

    .docs-dock--with-board .docs-dropup {
        left: -2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .docs-dock-button,
    .docs-dropup {
        transition: none;
    }
}

/* L0D3B — acceso de sesión móvil para visitante.
   El header conserva el botón textual en escritorio y usa la llave junto al
   catálogo cuando el ancho obliga a compactar las acciones. */
.visitor-global-login-key {
    display: none;
}

.visitor-global-login-key-icon {
    -webkit-mask: url("/static/profiles/icons/key.27f45a1de43f.svg") center / contain no-repeat;
    mask: url("/static/profiles/icons/key.27f45a1de43f.svg") center / contain no-repeat;
}

@media (max-width: 760px) {
    .visitor-global-login-key {
        display: grid;
        border-color: rgba(209, 154, 110, 0.34);
        color: var(--docs-copper-bright);
        background: rgba(107, 36, 53, 0.16);
    }

    .visitor-global-login-key:hover,
    .visitor-global-login-key:focus-visible {
        border-color: rgba(229, 177, 137, 0.72);
        color: var(--docs-text);
        background: rgba(107, 36, 53, 0.28);
    }
}

/* L0D3B — perfil móvil: una sola barra inferior.
   Orden visual: anterior · documentos · pizarra · siguiente.
   En catálogo se mantiene la geometría anterior docs + pizarra. */
@media (max-width: 760px) {
    body.public-profile-page .docs-dock--with-board {
        left: 60px;
        right: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
    }

    body.public-profile-page .docs-dock--with-board .docs-dock-button {
        width: 48px;
        height: 48px;
    }

    body.public-profile-page .docs-dock--with-board .docs-dock-icon {
        width: 27px;
        height: 27px;
    }

    body.public-profile-page .docs-dock--with-board ~ .profile-shell .profile-sequence-control {
        bottom: max(10px, calc(8px + env(safe-area-inset-bottom)));
        width: 42px;
        height: 44px;
        border-radius: 13px;
        font-size: 26px;
    }

    body.public-profile-page .docs-dock--with-board ~ .profile-shell .profile-sequence-control-previous {
        left: 8px;
    }

    body.public-profile-page .docs-dock--with-board ~ .profile-shell .profile-sequence-control-next {
        right: 8px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) {
        right: 60px;
        bottom: max(8px, env(safe-area-inset-bottom));
        width: calc(100vw - 176px);
        min-width: 0;
        height: 48px;
        border-width: 1px;
        border-radius: 14px;
        transform: none;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-bar {
        height: 48px;
        padding: 0 9px;
        gap: 7px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-title {
        gap: 5px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-title strong {
        font-size: 16px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-location {
        font-size: 11px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-status {
        gap: 5px;
    }

    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-chevron {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-separator,
    body.public-profile-page .docs-dock--with-board ~ .catalog-board-widget:not(.is-open) .catalog-board-widget-location {
        display: none;
    }
}



/* 2026-09-25 — escritorio: el acceso legal es global y vive siempre
   en el margen izquierdo. La presencia de Pizarra no altera su posición. */
@media (min-width: 761px) {
    .docs-dock,
    .docs-dock.docs-dock--with-board {
        left: max(34px, calc((100vw - 1180px) / 4));
        right: auto;
        transform: translateX(-50%);
    }

    .docs-dock .docs-dropup,
    .docs-dock.docs-dock--with-board .docs-dropup {
        left: 0;
        right: auto;
        transform: translateY(7px);
    }

    .docs-dock[open] .docs-dropup,
    .docs-dock.docs-dock--with-board[open] .docs-dropup {
        transform: translateY(0);
    }
}
