.fkm-promo {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: min(720px, calc(100% - 32px));
    z-index: 30;
}

.fkm-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(17, 17, 24, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f0f0f3;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fkm-tile:hover,
.fkm-tile:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.fkm-tile-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.fkm-tile-icon svg {
    width: 22px;
    height: 22px;
}

.fkm-tile-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.fkm-tile-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fkm-tile-hint {
    font-size: 0.64rem;
    color: #9a9aaf;
    font-weight: 500;
}

.fkm-tile-notes:hover,
.fkm-tile-notes:focus-visible {
    border-color: rgba(66, 133, 244, 0.55);
    background: rgba(66, 133, 244, 0.12);
}

.fkm-tile-lectures {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.22), rgba(17, 17, 24, 0.78));
    color: #fee2e2;
}

.fkm-tile-lectures .fkm-tile-hint { color: #fecaca; }

.fkm-tile-lectures:hover,
.fkm-tile-lectures:focus-visible {
    border-color: rgba(248, 113, 113, 0.85);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.38), rgba(17, 17, 24, 0.86));
}

.fkm-tile-mcqs:hover,
.fkm-tile-mcqs:focus-visible {
    border-color: rgba(225, 48, 108, 0.6);
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.22), rgba(253, 29, 29, 0.12), rgba(252, 176, 69, 0.1));
}

.fkm-tile-papers:hover,
.fkm-tile-papers:focus-visible {
    border-color: rgba(37, 211, 102, 0.55);
    background: rgba(37, 211, 102, 0.12);
}

/* Chat: quiet text links — not big tiles */
.app-main > .fkm-promo {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: auto;
    margin: 2px 16px 0;
    padding: 2px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-main > .fkm-promo .fkm-tile {
    min-height: unset;
    padding: 4px 10px;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    gap: 6px;
    color: #8b8b9e;
}

.app-main > .fkm-promo .fkm-tile:hover,
.app-main > .fkm-promo .fkm-tile:focus-visible {
    transform: none;
    color: #c8c8d6;
    background: transparent;
}

.app-main > .fkm-promo .fkm-tile-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
}

.app-main > .fkm-promo .fkm-tile-hint { display: none; }

.app-main > .fkm-promo .fkm-tile-icon {
    width: 15px;
    height: 15px;
}

.app-main > .fkm-promo .fkm-tile-icon svg {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

.app-main > .fkm-promo .fkm-tile-lectures {
    background: transparent;
    border: none;
    color: #c4a5a5;
}

.app-main > .fkm-promo .fkm-tile + .fkm-tile::before {
    content: "·";
    color: #4a4a58;
    margin-right: 2px;
    font-weight: 700;
    pointer-events: none;
}

/* Landing / login: in-flow under the hero or card */
.fkm-promo-inline .fkm-promo {
    position: relative;
    margin: 28px auto 0;
}

.hero .fkm-promo {
    position: relative;
    margin-top: 28px;
    width: min(680px, 100%);
}

.landing-dock .fkm-promo {
    position: relative;
    width: min(720px, calc(100% - 24px));
    margin: 0 auto;
}

.landing-dock .fkm-tile {
    background: rgba(8, 8, 14, 0.55);
}

.hero .fkm-tile {
    min-height: 56px;
    padding: 12px 14px;
}

/* Chat, usage, admin: compact bar under the page header */
.admin-app > .fkm-promo,
.page > .fkm-promo,
.wrap > .fkm-promo,
.login-container > .fkm-promo {
    position: relative;
    width: auto;
    margin: 0 16px 0;
}

.wrap > .fkm-promo {
    margin: 0 0 22px;
}

.login-container > .fkm-promo {
    margin-top: 18px;
    width: 100%;
}

.admin-app > .fkm-promo,
.page > .fkm-promo {
    margin: 12px 24px 0;
}

@media (max-width: 780px) {
    .landing-dock .fkm-promo {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        width: 100%;
    }
    .landing-dock .fkm-tile {
        min-height: 40px;
        padding: 5px 6px;
        border-radius: 10px;
        gap: 5px;
        align-items: flex-start;
    }
    .landing-dock .fkm-tile-icon {
        width: 20px;
        height: 20px;
    }
    .landing-dock .fkm-tile-icon svg {
        width: 16px;
        height: 16px;
    }
    .landing-dock .fkm-tile-label {
        font-size: 0.58rem;
        font-weight: 700;
        white-space: normal;
        line-height: 1.15;
        overflow: visible;
        text-overflow: unset;
    }
    .landing-dock .fkm-tile-hint {
        display: block;
        font-size: 0.5rem;
        line-height: 1.1;
        opacity: 0.9;
    }
}

@media (max-width: 720px) {
    .fkm-promo {
        grid-template-columns: 1fr 1fr;
        width: calc(100% - 24px);
        gap: 7px;
    }
    .fkm-tile {
        min-height: 46px;
        padding: 9px 10px;
        border-radius: 12px;
    }
    .fkm-tile-hint { display: none; }

    .app-main > .fkm-promo {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        overflow: hidden;
        width: auto;
        margin: 0 8px;
        gap: 0;
        padding: 0 0 4px;
    }
    .app-main > .fkm-promo .fkm-tile {
        flex: 1 1 0;
        min-width: 0;
        min-height: unset;
        padding: 4px 2px;
        justify-content: center;
        gap: 4px;
    }
    .app-main > .fkm-promo .fkm-tile-label {
        font-size: 0.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .app-main > .fkm-promo .fkm-tile + .fkm-tile::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fkm-tile { transition: none; }
    .fkm-tile:hover { transform: none; }
}
