/* Attached navigation: a flat edge rail. No classic island selectors. */
@media (min-width: 1025px) and (min-height: 601px) {
    html[data-kinma-nav-island-style='attached'] { --kinma-desktop-nav-content-start: 78px; }
    html[data-kinma-nav-island-style='attached'] body.page-admin #admin-main-content {
        margin-left: max(var(--kinma-desktop-nav-content-start), env(safe-area-inset-left, 0px));
    }
    .kinma-attached-rail {
        --attached-size: clamp(40px, 4.85vh, 70px);
        position: fixed; inset: 0 auto 0 0; z-index: 2100;
        box-sizing: border-box; width: var(--attached-size);
        flex-direction: column; align-items: stretch; overflow: hidden;
        color: #fff; background: var(--kinma-user-dark, #181818);
        border-right: none;
        outline: none;
        box-shadow: 0 2px 12px rgba(0,0,0,.18);
        font-family: Arial, sans-serif;
    }
    .kinma-attached-rail, .kinma-attached-rail *,
    .kinma-attached-rail *::before, .kinma-attached-rail *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .kinma-attached-brand, .kinma-attached-alert, .kinma-attached-tile {
        all: unset; appearance: none; position: relative; box-sizing: border-box;
        width: 100%; min-width: 0; margin: 0; border: 0; border-radius: 0; outline: 0;
        color: #fff; background: transparent; box-shadow: none;
        font: inherit; text-decoration: none; cursor: pointer;
    }
    .kinma-attached-brand { flex: 0 0 var(--attached-size); height: var(--attached-size); }
    .kinma-attached-brand-flag, .kinma-attached-brand-core {
        position: absolute; top: 50%; left: 50%; border-radius: 0;
        transform: translate(-50%,-50%); pointer-events: none;
    }
    .kinma-attached-brand-flag { width: 100%; height: 100%; background-position: center; background-size: cover; }
    .kinma-attached-brand-core { width: 85%; height: 85%; display: grid; place-items: center; border-radius: 12%; background: #fff; }
    .kinma-attached-brand-image { width: 68% !important; height: 68% !important; object-fit: contain; }
    .kinma-attached-alert {
        flex: 0 0 var(--attached-size); height: var(--attached-size); display: grid; place-items: center;
        color: #fff; background: #a7191f;
    }
    .kinma-attached-alert .kinma-hw-accel-warn-icon { width: 25px !important; height: 25px !important; }
    .kinma-attached-alert[hidden] { display: none; }
    .kinma-attached-fill { min-height: 3px; flex: 1 1 auto; }
    .kinma-attached-list { flex: 0 0 auto; width: 100%; display: flex; flex-direction: column; }
    .kinma-attached-tile {
        aspect-ratio: 1 / 1; flex: 0 0 auto; padding: 6px 3px 5px;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        overflow: hidden; contain: layout paint;
    }
    .kinma-attached-symbol {
        all: unset;
        width: clamp(22px,2.05vh,28px); height: clamp(22px,2.05vh,28px); min-height: clamp(22px,2.05vh,28px); display: grid; place-items: center;
        color: currentColor; pointer-events: none;
    }
    .kinma-attached-symbol > svg { width: clamp(22px,2.05vh,28px) !important; height: clamp(22px,2.05vh,28px) !important; min-width: clamp(22px,2.05vh,28px) !important; min-height: clamp(22px,2.05vh,28px) !important; max-width: clamp(22px,2.05vh,28px) !important; max-height: clamp(22px,2.05vh,28px) !important; color: #fff !important; stroke: none !important; }
    .kinma-attached-symbol .nav-profile-avatar {
        all: unset !important; box-sizing: border-box !important;
        width: 26px !important; height: 26px !important; display: grid !important;
        place-items: center !important; overflow: hidden !important; border-radius: 50% !important;
        background: #aab1bc !important; color: #fff !important;
        font: 700 11px/1 Arial, sans-serif !important;
    }
    .kinma-attached-symbol .nav-profile-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
    .kinma-attached-tile[data-attached-key='profile'] .kinma-attached-caption { display: none; }
    .kinma-attached-tile[data-attached-key='profile'] { padding: 0; }
    .kinma-attached-tile[data-attached-key='profile'] .kinma-attached-symbol {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
    }
    .kinma-attached-tile[data-attached-key='profile'] .nav-profile-avatar {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        border: 0 !important;
        border-radius: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }
    .kinma-attached-tile[data-attached-key='profile'] .nav-profile-avatar::before,
    .kinma-attached-tile[data-attached-key='profile'] .nav-profile-avatar::after { display: none !important; content: none !important; }
    .kinma-attached-caption {
        all: unset;
        width: 100%; min-width: 0; display: -webkit-box; overflow: hidden;
        color: inherit; font: 700 clamp(9px,.82vh,11.5px)/1.05 Arial,sans-serif;
        text-align: center; overflow-wrap: anywhere;
        -webkit-box-orient: vertical; -webkit-line-clamp: 2; pointer-events: none;
    }
    .kinma-attached-badge {
        position: absolute; top: 4px; right: 4px; min-width: 14px; height: 14px; padding: 0 3px;
        border-radius: 7px; color: #fff; background: #d82727;
        font: 700 8px/14px Arial,sans-serif; text-align: center;
    }
    .kinma-attached-tile:hover { color: #fff; background: rgba(255,255,255,.14); }
    .kinma-attached-tile:focus-visible, .kinma-attached-brand:focus-visible, .kinma-attached-alert:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
    .kinma-attached-tile[data-attached-key='profile']:focus-visible:not(.is-current) {
        color: #fff;
        background: rgba(255,255,255,.14);
        box-shadow: none;
    }
    .kinma-attached-tile.is-current {
        color: #fff; background: rgba(255,255,255,.2);
        box-shadow: inset 4px 0 0 #fff;
    }
    .kinma-attached-tile:active { background: #dfe3e9; }
}
