.bf-rail, .bf-sheet {
    --bf-ink: #0e1730;
    --bf-muted: #4a5568;
    --bf-blue: #0b3fa8;
    --bf-line: #c5cddc;
    min-width: 0;
    background: #fff;
    color: var(--bf-ink);
    font-size: 14px;
    line-height: 20px;
}
.bf-rail { padding: 18px; border: 1px solid #e1e5ee; border-radius: 16px; }
.bf-sheet:not([open]) { display: none; }
.bf-form, .bf-fields { display: flex; flex-direction: column; gap: 18px; }
.bf-heading { display: flex; align-items: center; gap: 8px; }
.bf-heading h2 { flex: 1; font-size: 16px; font-weight: 800; }
.bf-text, .bf-close { color: var(--bf-blue); font-weight: 700; }
.bf-text { font-size: 13px; cursor: pointer; }
.bf-close, .bf-sheet { display: none; }
.bf-form legend, .bf-form h3, .bf-select-label {
    padding: 0; margin: 0 0 6px; color: var(--bf-ink); font-size: 13px; font-weight: 800;
}
.bf-select-label { display: grid; gap: 6px; margin: 0; }
.bf-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.bf-input {
    display: block; height: 44px; min-width: 0; width: 100%; border: 1px solid var(--bf-line);
    border-radius: 10px; padding: 0 10px; background: #fff; color: var(--bf-ink); font-size: 14px; font-weight: 600;
}
.bf-input::placeholder { color: var(--bf-muted); }
.bf-input[type=number] { appearance: textfield; }
.bf-input::-webkit-inner-spin-button { appearance: none; }
.bf-bounds { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; margin-bottom: 10px; }
.bf-go, .bf-primary, .bf-sell a {
    display: inline-flex; justify-content: center; align-items: center; border-radius: 10px; background: var(--bf-blue);
    color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; text-decoration: none;
}
.bf-go { height: 44px; background: var(--bf-ink); }
.bf-primary { width: 100%; min-height: 46px; }
.bf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-pill {
    position: relative; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
    min-height: 36px; border: 1px solid var(--bf-line); border-radius: 24px; padding: 3px 11px;
    background: #fff; color: var(--bf-ink); font-size: 13px; font-weight: 700; cursor: pointer;
}
.bf-pill input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.bf-pill[aria-pressed=true], .bf-pill:has(:checked) { border-color: var(--bf-blue); background: var(--bf-blue); color: #fff; }
.bf-pill[aria-pressed=true] small, .bf-pill:has(:checked) small { color: #fff; }
.bf-pill:has(:focus-visible), .bf-form :focus-visible { outline: 3px solid #316fd8; outline-offset: 2px; }
.bf-option { display: flex; align-items: center; width: 100%; min-height: 36px; gap: 10px; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.bf-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--bf-blue); }
.bf-option small, .bf-pill small { font-weight: 700; color: var(--bf-muted); font-size: 12px; line-height: 16px; }
.bf-option small { margin-left: auto; }
.bf-option:has(:disabled), .bf-pill:has(:disabled), .bf-pill:disabled { color: #6b7488; cursor: default; }
.bf-area-shortcuts button::before { width: 18px; height: 18px; border: 1px solid #8995aa; border-radius: 50%; content: ''; flex: none; }
.bf-area-shortcuts button[aria-pressed=true]::before { border: 5px solid var(--bf-blue); }
.bf-area-fields { display: grid; gap: 8px; padding: 10px 0 0; }
.bf-area summary { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--bf-blue); cursor: pointer; list-style: none; }
.bf-area summary::-webkit-details-marker { display: none; }
.bf-area summary > span, .bf-area summary > svg { display: none; }
.bf-location { order: 4; }
.bf-urgent { order: 5; }
.bf-sell { border-top: 1px solid #e1e5ee; margin-top: 18px; padding-top: 16px; }
.bf-sell h3 { font-size: 15px; font-weight: 800; }
.bf-sell p { margin: 8px 0; color: var(--bf-muted); font-size: 13px; }
.bf-sell a { width: 100%; min-height: 44px; }
@media (min-width: 1024px) {
    .bf-on-sheet, [data-bf-unfiltered], .bf-ready .bf-actions { display: none; }
}
@media (max-width: 1023px) {
    .bf-rail:not(:target) { display: none; }
    .bf-close { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; }
    .bf-sheet[open] {
        display: block; position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%, 600px);
        max-width: 100%; height: min(820px, calc(100dvh - 48px)); max-height: calc(100dvh - 16px);
        border: 0; border-radius: 18px 18px 0 0; padding: 0; overflow: hidden; box-shadow: 0 -8px 32px #0e173029;
    }
    .bf-sheet::backdrop { background: rgb(14 23 48 / 55%); }
    .bf-sheet .bf-form { height: 100%; gap: 0; }
    .bf-sheet .bf-heading { border-bottom: 1px solid #e1e5ee; min-height: 61px; padding: 8px 8px 8px 16px; }
    .bf-heading h2 { font-size: 18px; }
    .bf-text { min-height: 44px; padding: 0 10px; font-size: 14px; }
    .bf-sheet .bf-fields { overflow-y: auto; overscroll-behavior: contain; flex: 1; gap: 16px; padding: 14px 16px 20px; }
    .bf-location { order: -1; }
    .bf-category:has(.bf-change-category) { order: 7; }
    .bf-area-shortcuts, .bf-area summary > strong, .bf-go, .bf-sell { display: none; }
    .bf-area summary { min-height: 52px; padding: 6px 12px; background: #f2f4fa; border-radius: 12px; color: var(--bf-ink); }
    .bf-area summary > span { display: grid; flex: 1; }
    .bf-area summary > svg { display: block; }
    .bf-area summary small { color: var(--bf-muted); font-size: 12px; font-weight: 600; }
    .bf-area summary b { font-size: 14px; }
    .bf-bounds { grid-template-columns: 1fr 1fr; }
    .bf-input { height: 48px; font-size: 16px; }
    .bf-pill, .bf-option { min-height: 44px; }
    .bf-actions { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #e1e5ee; }
    .bf-primary { min-height: 52px; border-radius: 12px; font-size: 16px; }
}
html.bf-sheet-open, html.bf-sheet-open body, html.bf-sheet-open .public-main-content { overflow: hidden; }
