.k360-fab{
    position:fixed;
    z-index:9997;
    display:flex;
    gap:var(--k360-fab-gap,10px);
    pointer-events:none;
}
.k360-fab--column{flex-direction:column;}
.k360-fab--row{flex-direction:row;}
.k360-fab--t{top:var(--k360-fab-y,20px);bottom:auto;}
.k360-fab--m{top:50%;bottom:auto;transform:translateY(-50%);}
.k360-fab--b{bottom:var(--k360-fab-y,20px);top:auto;}
.k360-fab--l{left:var(--k360-fab-x,20px);right:auto;align-items:flex-start;}
.k360-fab--c{left:50%;right:auto;align-items:center;}
.k360-fab--r{right:var(--k360-fab-x,20px);left:auto;align-items:flex-end;}
.k360-fab--c:not(.k360-fab--m){transform:translateX(-50%);}
.k360-fab--c.k360-fab--m{transform:translate(-50%,-50%);}
.k360-fab--l.k360-fab--m,.k360-fab--r.k360-fab--m{transform:translateY(-50%);}

.k360-fab--b.k360-fab--column{flex-direction:column-reverse;}
.k360-fab--t.k360-fab--column{flex-direction:column;}
.k360-fab--r.k360-fab--row{flex-direction:row-reverse;}
.k360-fab--l.k360-fab--row{flex-direction:row;}
.k360-fab--c.k360-fab--row{flex-direction:row;justify-content:center;}

.k360-fab__item{
    pointer-events:auto;
    display:flex;
    gap:var(--k360-fab-gap,10px);
    align-items:inherit;
    position:relative;
}
.k360-fab--column .k360-fab__item{flex-direction:column;}
.k360-fab--row .k360-fab__item{flex-direction:row;}
.k360-fab--b.k360-fab--column .k360-fab__item{flex-direction:column-reverse;}
.k360-fab--r.k360-fab--row .k360-fab__item{flex-direction:row-reverse;}

.k360-fab__subs{
    display:flex;
    gap:var(--k360-fab-gap,10px);
    align-items:inherit;
    flex-direction:inherit;
}
.k360-fab__subs[hidden]{display:none!important;}

.k360-fab__btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    text-decoration:none!important;
    font:700 13px/1.2 system-ui,-apple-system,Segoe UI,sans-serif;
    box-shadow:0 10px 24px rgba(15,23,42,.18);
    cursor:pointer;
    transition:transform .15s ease,box-shadow .15s ease;
    white-space:nowrap;
    appearance:none;
    -webkit-appearance:none;
}
.k360-fab__btn:hover{
    transform:translateY(-1px);
    box-shadow:0 14px 28px rgba(15,23,42,.22);
    text-decoration:none!important;
}
.k360-fab__btn--vertical{
    flex-direction:column;
    white-space:normal;
    text-align:center;
}
.k360-fab__btn--vdown .k360-fab__label,
.k360-fab__btn--vertical .k360-fab__label{
    writing-mode:vertical-rl;
    text-orientation:mixed;
    letter-spacing:.04em;
}
.k360-fab__btn--vup{
    flex-direction:column;
    white-space:normal;
    text-align:center;
}
.k360-fab__btn--vup .k360-fab__label{
    writing-mode:vertical-rl;
    text-orientation:mixed;
    letter-spacing:.04em;
    transform:rotate(180deg);
}
.k360-fab__btn--vdown,
.k360-fab__btn--vertical{
    flex-direction:column;
    white-space:normal;
    text-align:center;
}
.k360-fab__icon--spacer{visibility:hidden;}
.k360-fab__btn--icon{justify-content:center;}
.k360-fab__icon{
    width:18px;height:18px;
    display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
}
.k360-fab__icon svg{width:18px;height:18px;display:block;}
.k360-fab__icon--img img{width:18px;height:18px;object-fit:cover;border-radius:4px;display:block;}
.k360-fab__label{display:inline-block;}
.k360-fab__btn--vdown .k360-fab__label,
.k360-fab__btn--vertical .k360-fab__label,
.k360-fab__btn--vup .k360-fab__label{letter-spacing:inherit;}

.k360-fab[data-enter]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{
    opacity:0;
    pointer-events:none;
}
.k360-fab[data-enter="up"]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{transform:translateY(18px);}
.k360-fab[data-enter="down"]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{transform:translateY(-18px);}
.k360-fab[data-enter="left"]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{transform:translateX(18px);}
.k360-fab[data-enter="right"]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{transform:translateX(-18px);}
.k360-fab[data-enter="scale"]:not(.k360-fab--in):not(.k360-fab--preview) .k360-fab__item{transform:scale(.72);}
.k360-fab--in .k360-fab__item{
    opacity:1;
    transform:none;
    pointer-events:auto;
    transition:opacity .45s ease,transform .45s ease;
}
.k360-fab[data-enter="none"].k360-fab--in .k360-fab__item{transition:none;}

.k360-fab__attach{
    pointer-events:auto;
    width:min(400px,calc(100vw - 32px));
    max-height:min(72vh,680px);
}
.k360-fab__attach[hidden]{display:none!important;}
.k360-fab__attach-panel{
    position:relative;
    background:#fff;
    border-radius:16px;
    box-shadow:0 18px 48px rgba(2,6,23,.28);
    padding:18px 16px 14px;
    max-height:min(72vh,680px);
    overflow:auto;
}

.k360-fab-modal{
    position:fixed;
    inset:0;
    z-index:10020;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
}
.k360-fab-modal[hidden]{display:none!important;}
.k360-fab-modal__backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.45);
}
.k360-fab-modal__panel{
    position:relative;
    z-index:1;
    width:min(440px,100%);
    max-height:min(88vh,760px);
    overflow:auto;
    background:#fff;
    border-radius:18px;
    box-shadow:0 24px 64px rgba(2,6,23,.35);
    padding:22px 20px 18px;
}
.k360-fab-modal__title{
    margin:0 36px 14px 0;
    font:800 18px/1.3 system-ui,sans-serif;
    color:#0f172a;
}
.k360-fab-modal__close{
    position:absolute;
    top:10px;
    right:12px;
    width:36px;
    height:36px;
    border:0;
    background:transparent;
    font-size:28px;
    line-height:1;
    color:#64748b;
    cursor:pointer;
}
.k360-fab-preview__stage .k360-fab{
    position:absolute;
    z-index:2;
    pointer-events:auto;
}
@media (max-width:640px){
    .k360-fab-modal{align-items:stretch;justify-content:stretch;padding:0;}
    .k360-fab-modal__panel{width:100%;max-height:100%;border-radius:0;}
    .k360-fab__attach{width:min(100vw - 24px,400px);}
}
