.bili-anti-lost {
    position: fixed;
    z-index: 2147483000;
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    font-family: inherit;
}
.bili-anti-lost--bottom-left { right: auto; left: max(14px, env(safe-area-inset-left)); }
.bali-float-shell {
    position: relative;
    display: inline-block;
}

.bali-float-close {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 2;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background: rgba(24,25,28,.88);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.24);
    transition: transform .18s ease, background-color .18s ease;
}

.bali-float-close:hover {
    background: #e6465a;
    transform: scale(1.08);
}

.bali-float-close svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.bali-trigger {
    display: inline-flex;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid #fb7299;
    border-radius: 17px;
    background: transparent;
    color: #fb7299;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    opacity: var(--bali-opacity,.86);
    box-shadow: 0 4px 14px rgba(251,114,153,.12);
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.bali-trigger:hover { transform: translateY(-2px); background: rgba(251,114,153,.08); color: #fb7299; opacity: 1; box-shadow: 0 8px 22px rgba(251,114,153,.2); }
.bali-trigger:active { transform: scale(.97); }
.bali-modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.bali-modal[hidden] { display: none; }
.bali-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(15,18,26,.5); backdrop-filter: blur(4px); cursor: pointer; }
.bali-dialog { position: relative; z-index: 1; width: min(620px,100%); max-height: min(88dvh,900px); overflow: auto; border-radius: 24px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.34); transform: translateY(10px) scale(.98); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.bili-anti-lost.is-open .bali-dialog { transform: none; opacity: 1; }
.bali-close { position: sticky; top: 12px; z-index: 3; display: grid; float: right; width: 34px; height: 34px; margin: 12px 12px -46px 0; place-items: center; border: 0; border-radius: 50%; background: rgba(24,25,28,.07); color: #5d6068; cursor: pointer; }
.bali-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bali-content { padding: 34px 30px 4px; text-align: center; }
.bali-content h2 { margin: 0 0 25px; font-size: clamp(24px,5vw,32px); line-height: 1.2; }
.bali-content h2 span { display: inline-block; padding: 0 5px 2px; border-radius: 8px; background: linear-gradient(180deg,rgba(255,255,255,0),rgba(144,225,229,.72)); }
.bali-intro { margin: 0 0 22px; color: #1f2023; font-size: clamp(16px,3.8vw,20px); font-weight: 600; line-height: 1.75; }
.bali-warning,.bali-browser-note,.bali-copy-note,.bali-desktop-note,.bali-share-note { margin: 18px 0; color: #1f2023; font-size: clamp(15px,3.6vw,18px); font-weight: 600; line-height: 1.65; }
.bali-warning,.bali-browser-note { color: #f03b4b; }
.bali-domain-card { position: relative; display: flex; min-height: 74px; align-items: center; justify-content: center; margin: 18px 0 20px; padding: 22px 16px 12px; border-radius: 14px; background: #f7f8fa; color: #17181a; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(24,25,28,.04); transition: background .2s ease, transform .2s ease; }
.bali-domain-card:hover { background: #eef7f7; color: #008f9d; transform: translateY(-1px); }
.bali-domain-label { position: absolute; top: 0; left: 0; padding: 7px 12px; border-radius: 12px 0 12px 0; background: #19aab2; color: #fff; font-size: 14px; font-weight: 600; }
.bali-domain-value {
    display: inline-flex;
    max-width: 100%;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}
.bali-domain-prefix {
    color: #858b94;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.bali-domain-card strong { overflow-wrap: anywhere; font-size: clamp(20px,5vw,28px); line-height: 1.15; }
.bali-footer { position: relative; z-index: 1; padding: 4px 24px 30px; text-align: center; }
.bali-footer::before { position: absolute; z-index: -1; right: -10%; bottom: 0; left: -10%; height: 78px; border-radius: 50% 50% 0 0; background: #d9f2f3; content: ""; }
.bali-confirm { min-width: 210px; height: 56px; padding: 0 30px; border: 0; border-radius: 28px; background: linear-gradient(180deg,#25b8bd,#15949d); color: #fff; font-size: 21px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px rgba(21,148,157,.25); }
.bali-confirm:active { transform: scale(.98); }
body.bili-anti-lost-open { overflow: hidden; }
@media (max-width: 782px) {
    .bili-anti-lost { bottom: calc(76px + env(safe-area-inset-bottom)); }
    .bali-float-shell {
    position: relative;
    display: inline-block;
}

.bali-float-close {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 2;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background: rgba(24,25,28,.88);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.24);
    transition: transform .18s ease, background-color .18s ease;
}

.bali-float-close:hover {
    background: #e6465a;
    transform: scale(1.08);
}

.bali-float-close svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.bali-trigger { height: 34px; padding: 0 10px; font-size: 13px; }
    .bali-content { padding: 30px 20px 0; }
    .bali-dialog { border-radius: 22px; }
    .bali-close { margin-right: 9px; }
    .bali-domain-card { min-height: 68px; margin: 16px 0 18px; }
    .bali-domain-card strong { font-size: 20px; }
    .bali-domain-label { padding: 6px 10px; font-size: 12px; }
    .bali-confirm { min-width: 190px; height: 52px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .bali-trigger,.bali-dialog,.bali-domain-card { transition: none; }
}