/*
 * 白鹿通知中心（/components/notify/）
 * 白鹿编码 dashboard、API 平台、白鹿通行证共用同一套面板、详情弹窗与角标样式。
 * 面板与弹窗由 notify.js 挂到 <body> 下（不受顶栏 / 玻璃容器的 transform、backdrop-filter 影响）。
 * 断点：≤768 面板与详情都改为底部抽屉。
 */
:root {
    --bn-ink: #0f172a;
    --bn-ink-2: #334155;
    --bn-mute: #64748b;
    --bn-faint: #94a3b8;
    --bn-line: rgba(15, 23, 42, 0.07);
    --bn-soft: #f4f6f9;
    --bn-hover: #f5f7fa;
    --bn-brand: #2563eb;
    --bn-brand-soft: #eef3ff;
    --bn-dm: #7c3aed;
    --bn-dm-soft: #f4f0ff;
    --bn-red: #ef4444;
    --bn-ease: cubic-bezier(0.2, 0.9, 0.3, 1);
    --bn-sheet-ease: cubic-bezier(0.32, 0.72, 0, 1);
    --bn-font: var(--font-ui, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif);
    /* 高于右下角客服悬浮按钮（chat-support.css 1010–1025） */
    --bn-z: 1040;
}

html.bn-locked,
html.bn-locked body {
    overflow: hidden;
}

/* ── 触发按钮（尺寸与底色由各页顶栏决定，这里只管图标、角标、动效） ── */
.bn-trigger {
    position: relative;
}

.bn-trigger .bn-bell {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.bn-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bn-red);
    color: #fff;
    font-family: var(--bn-font);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    box-shadow: 0 0 0 2px var(--bn-badge-ring, #fff);
    pointer-events: none;
}

.bn-badge[hidden] {
    display: none;
}

.bn-trigger.bn-ring .bn-bell {
    transform-origin: 50% 3px;
    animation: bnRing 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes bnRing {
    0%, 100% { transform: rotate(0); }
    12% { transform: rotate(-14deg); }
    26% { transform: rotate(11deg); }
    40% { transform: rotate(-7deg); }
    54% { transform: rotate(4deg); }
    68% { transform: rotate(-2deg); }
}

/* ── 面板 ── */
.bn-panel {
    position: fixed;
    top: 64px;
    right: 16px;
    z-index: var(--bn-z);
    display: flex;
    flex-direction: column;
    width: 400px;
    max-height: var(--bn-max-h, 620px);
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.06),
        0 2px 4px -2px rgba(15, 23, 42, 0.06),
        0 18px 44px -14px rgba(15, 23, 42, 0.24);
    color: var(--bn-ink);
    font-family: var(--bn-font);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.16s ease, transform 0.22s var(--bn-ease), visibility 0s linear 0.22s;
}

.bn-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
}

.bn-panel:focus {
    outline: none;
}

.bn-panel *,
.bn-modal * {
    box-sizing: border-box;
}

.bn-head {
    position: relative;
    flex: none;
    padding: 14px 10px 0 18px;
    border-bottom: 1px solid var(--bn-line);
}

.bn-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
}

.bn-title {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--bn-ink);
}

.bn-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.bn-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bn-mute);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bn-act .bn-svg {
    width: 16px;
    height: 16px;
}

.bn-act:disabled {
    opacity: 0.42;
    cursor: default;
}

.bn-act--close {
    display: none;
    width: 36px;
    padding: 0;
}

.bn-act--close .bn-svg {
    width: 18px;
    height: 18px;
}

.bn-tabs {
    display: flex;
    gap: 22px;
    margin-top: 6px;
}

.bn-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bn-mute);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.bn-tab[aria-selected="true"] {
    color: var(--bn-ink);
    font-weight: 600;
}

.bn-tab[aria-selected="true"]::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--bn-ink);
}

.bn-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--bn-brand-soft);
    color: var(--bn-brand);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.bn-tab-count[hidden] {
    display: none;
}

.bn-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.bn-body::-webkit-scrollbar {
    width: 6px;
}

.bn-body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35) padding-box;
}

/* ── 列表项：类型图标（未读带圆点） | 标题 + 摘要 + 类型·时间 | 可选缩略图 ── */
.bn-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bn-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bn-item:active {
    background: var(--bn-soft);
}

.bn-item:focus-visible {
    outline: 2px solid var(--bn-brand);
    outline-offset: -2px;
}

.bn-ico {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bn-brand-soft);
    color: var(--bn-brand);
}

.bn-ico .bn-svg {
    width: 18px;
    height: 18px;
}

.bn-ico--dm {
    background: var(--bn-dm-soft);
    color: var(--bn-dm);
}

/* 已读：图标转为中性灰，未读的彩色图标更醒目 */
.bn-item:not(.is-unread) .bn-ico {
    background: #f2f4f7;
    color: #8b97a8;
}

.bn-unread {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bn-brand);
    box-shadow: 0 0 0 2px #fff;
}

.bn-main {
    display: block;
    min-width: 0;
}

.bn-item-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--bn-ink-2);
    overflow-wrap: anywhere;
}

.bn-item.is-unread .bn-item-title {
    font-weight: 600;
    color: var(--bn-ink);
}

.bn-item-sum {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 3px;
    font-size: 13px;
    line-height: 19px;
    color: var(--bn-mute);
    overflow-wrap: anywhere;
}

.bn-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 18px;
    color: var(--bn-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bn-tag {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border-radius: 5px;
    background: #f1f4f8;
    color: #5b6778;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

.bn-tag--dm {
    background: var(--bn-dm-soft);
    color: #6d28d9;
}

.bn-tag--code,
.bn-tag--api {
    background: var(--bn-brand-soft);
    color: #1d4ed8;
}

.bn-sep {
    flex: none;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.bn-thumb {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f4f8;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.bn-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bn-thumb-more {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.bn-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── 骨架 / 空态 / 出错 ── */
.bn-skel {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    padding: 12px;
}

.bn-skel i {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f5 0%, #f6f8fa 50%, #eef1f5 100%);
    background-size: 200% 100%;
    animation: bnShimmer 1.3s ease-in-out infinite;
}

.bn-skel > i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.bn-skel span {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.bn-skel span i:nth-child(1) { width: 72%; height: 14px; }
.bn-skel span i:nth-child(2) { width: 94%; height: 12px; }
.bn-skel span i:nth-child(3) { width: 30%; height: 10px; }

@keyframes bnShimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.bn-empty {
    padding: 48px 24px 52px;
    text-align: center;
}

.bn-empty-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--bn-soft);
    color: var(--bn-faint);
}

.bn-empty-ico .bn-svg {
    width: 24px;
    height: 24px;
}

.bn-empty--done .bn-empty-ico {
    background: #ecfdf3;
    color: #16a34a;
}

.bn-empty-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bn-ink-2);
}

.bn-empty-text {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--bn-faint);
}

.bn-retry {
    height: 32px;
    margin-top: 14px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: var(--bn-soft);
    color: var(--bn-ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ── 遮罩（仅底部抽屉时显示） ── */
.bn-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--bn-z) - 1);
    display: none;
    background: rgba(15, 23, 42, 0.32);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0s linear 0.24s;
    -webkit-tap-highlight-color: transparent;
}

.bn-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* ── 详情弹窗 ── */
.bn-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--bn-font);
    color: var(--bn-ink);
    text-align: left;
    -webkit-font-smoothing: antialiased;
    visibility: hidden;
    transition: visibility 0s linear 0.24s;
}

.bn-modal.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.bn-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.bn-modal.is-open .bn-modal-backdrop {
    opacity: 1;
}

.bn-modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    max-height: min(760px, calc(100vh - 48px));
    max-height: min(760px, calc(100dvh - 48px));
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 28px 70px -18px rgba(15, 23, 42, 0.4);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.26s var(--bn-ease);
}

.bn-modal.is-open .bn-modal-card {
    opacity: 1;
    transform: none;
}

.bn-modal-card:focus {
    outline: none;
}

.bn-modal-card.bn-swap .bn-modal-head,
.bn-modal-card.bn-swap .bn-modal-body {
    animation: bnSwap 0.26s var(--bn-ease);
}

@keyframes bnSwap {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: none; }
}

.bn-modal-head {
    position: relative;
    flex: none;
    padding: 22px 64px 18px 26px;
    border-bottom: 1px solid var(--bn-line);
}

.bn-modal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 12.5px;
    color: var(--bn-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bn-modal-ico {
    display: flex;
    flex: none;
}

.bn-modal-meta .bn-ico {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

.bn-modal-meta .bn-ico .bn-svg {
    width: 14px;
    height: 14px;
}

.bn-modal-kind {
    font-weight: 600;
    color: var(--bn-ink-2);
}

.bn-modal-title {
    margin: 12px 0 0;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: var(--bn-ink);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.bn-x {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--bn-faint);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bn-x .bn-svg {
    width: 18px;
    height: 18px;
}

.bn-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 26px 26px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.bn-modal-foot {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 16px 26px;
    border-top: 1px solid var(--bn-line);
}

.bn-modal-left {
    min-width: 0;
    font-size: 12.5px;
    color: var(--bn-faint);
    font-variant-numeric: tabular-nums;
}

.bn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    margin-left: auto;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--bn-brand);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bn-btn .bn-svg {
    width: 16px;
    height: 16px;
}

.bn-btn:active {
    transform: scale(0.98);
}

.bn-btn:focus-visible,
.bn-x:focus-visible,
.bn-act:focus-visible,
.bn-tab:focus-visible,
.bn-retry:focus-visible {
    outline: 2px solid var(--bn-brand);
    outline-offset: 2px;
}

/* 正文排版（管理员富文本，已白名单消毒） */
.bn-prose {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    overflow-wrap: anywhere;
}

.bn-prose > :first-child { margin-top: 0; }
.bn-prose > :last-child { margin-bottom: 0; }

.bn-prose p,
.bn-prose ul,
.bn-prose ol,
.bn-prose blockquote,
.bn-prose pre,
.bn-prose table {
    margin: 0 0 12px;
}

.bn-prose h1,
.bn-prose h2,
.bn-prose h3,
.bn-prose h4 {
    margin: 20px 0 8px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.5;
    color: var(--bn-ink);
}

.bn-prose ul,
.bn-prose ol {
    padding-left: 1.4em;
}

.bn-prose li + li {
    margin-top: 4px;
}

.bn-prose b,
.bn-prose strong {
    font-weight: 600;
    color: var(--bn-ink);
}

.bn-prose a {
    color: var(--bn-brand);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    text-underline-offset: 3px;
}

.bn-prose code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #f1f5f9;
    color: var(--bn-ink);
    font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.88em;
}

.bn-prose pre {
    padding: 12px 14px;
    overflow-x: auto;
    border-radius: 10px;
    background: #f6f8fa;
    font-size: 13px;
    line-height: 1.6;
}

.bn-prose pre code {
    padding: 0;
    background: none;
}

.bn-prose blockquote {
    padding: 2px 0 2px 14px;
    border-left: 3px solid #e2e8f0;
    color: var(--bn-mute);
}

.bn-prose hr {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid var(--bn-line);
}

.bn-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 13.5px;
}

.bn-prose th,
.bn-prose td {
    padding: 6px 10px;
    border: 1px solid #e5e9f0;
}

.bn-prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
    cursor: zoom-in;
}

/* ── 图片查看 ── */
.bn-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.84);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bn-lightbox.is-open {
    opacity: 1;
}

.bn-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 10px;
    object-fit: contain;
}

@media (hover: hover) {
    .bn-act:hover:not(:disabled) { background: var(--bn-soft); color: var(--bn-ink); }
    .bn-tab:hover { color: var(--bn-ink); }
    .bn-item:hover { background: var(--bn-hover); }
    .bn-x:hover { background: var(--bn-soft); color: var(--bn-ink); }
    .bn-btn:hover { background: #1d4ed8; }
    .bn-retry:hover { background: #e9edf3; }
    .bn-prose a:hover { text-decoration-color: currentColor; }
}

/* ── ≤768：面板与详情改为底部抽屉 ── */
@media (max-width: 768px) {
    .bn-backdrop {
        display: block;
    }

    .bn-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: min(86vh, 720px);
        max-height: min(86dvh, 720px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18);
        transform-origin: bottom center;
        opacity: 1;
        transform: translateY(100%);
        transition: transform 0.34s var(--bn-sheet-ease), visibility 0s linear 0.34s;
    }

    .bn-panel.is-open {
        transform: none;
    }

    .bn-panel.is-dragging {
        transition: none;
    }

    .bn-head {
        padding: 22px 10px 0 18px;
        padding-left: max(18px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
    }

    .bn-head::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 999px;
        background: #d5dbe4;
    }

    .bn-title {
        font-size: 17px;
    }

    .bn-act {
        height: 36px;
        font-size: 13px;
    }

    .bn-act--close {
        display: inline-flex;
        border-radius: 50%;
        background: var(--bn-soft);
        color: var(--bn-ink-2);
    }

    .bn-tab {
        height: 42px;
        font-size: 14px;
    }

    .bn-body {
        padding: 6px 6px 10px;
    }

    .bn-item {
        padding: 14px 12px;
    }

    .bn-item-title {
        font-size: 15px;
        line-height: 22px;
    }

    .bn-item-sum {
        font-size: 13.5px;
        line-height: 20px;
    }

    .bn-modal {
        align-items: flex-end;
        padding: 0;
    }

    .bn-modal-card {
        max-width: none;
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
        border-radius: 20px 20px 0 0;
        transform: translateY(32px);
    }

    .bn-modal-card::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        z-index: 1;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 999px;
        background: #d5dbe4;
    }

    .bn-modal-head {
        padding: 24px 60px 16px 18px;
        padding-left: max(18px, env(safe-area-inset-left, 0px));
    }

    .bn-x {
        top: 16px;
        right: 10px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--bn-soft);
        color: var(--bn-ink-2);
    }

    .bn-modal-title {
        font-size: 18px;
    }

    .bn-modal-body {
        padding: 16px 18px 20px;
        padding-left: max(18px, env(safe-area-inset-left, 0px));
        padding-right: max(18px, env(safe-area-inset-right, 0px));
    }

    .bn-prose {
        font-size: 15.5px;
        line-height: 1.75;
    }

    .bn-modal-foot {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .bn-modal-left {
        text-align: center;
    }

    .bn-modal-left:empty {
        display: none;
    }

    .bn-btn {
        width: 100%;
        height: 46px;
        margin-left: 0;
        border-radius: 12px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bn-panel,
    .bn-backdrop,
    .bn-modal,
    .bn-modal-backdrop,
    .bn-modal-card,
    .bn-lightbox {
        transition: none !important;
    }

    .bn-trigger.bn-ring .bn-bell,
    .bn-skel i,
    .bn-modal-card.bn-swap .bn-modal-head,
    .bn-modal-card.bn-swap .bn-modal-body {
        animation: none !important;
    }
}
