#box-search {
    --bs-sticky: 62px;
    --bs-r: 16px;
    --bs-ok: #22c55e;
    --bs-end: #8b5cf6;
    --bs-warn: #f59e0b;
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 14px 56px;
    color: var(--text1);
}
#box-search *, #box-search *::before, #box-search *::after { box-sizing: border-box; }
:where(#box-search) :is(button, input, select) { font: inherit; color: inherit; outline: none; -webkit-tap-highlight-color: transparent; }
:where(#box-search) button { cursor: pointer; border: 0; background: none; padding: 0; }
#box-search :is(button):disabled { cursor: not-allowed; opacity: .4; }
#box-search [hidden] { display: none !important; }
:where(#box-search) a { color: inherit; text-decoration: none; outline: none; }

@keyframes bsPulse { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes bsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bsShine { to { background-position: -300% 0; } }
@keyframes bsPop { 0% { transform: scale(.92); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes bsSpin { to { transform: rotate(360deg); } }

#box-search :is(button, a, select):focus-visible { animation: bsPulse .5s ease; filter: brightness(1.12); }

.bs-top {
    position: sticky; top: var(--bs-sticky); z-index: 20;
    display: flex; gap: 8px; padding: 10px 0 8px;
    background: linear-gradient(var(--bg) 82%, transparent);
}
.bs-input {
    position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
    height: 50px; padding: 0 14px; overflow: hidden;
    background: var(--card); border: 1.5px solid var(--rgba2); border-radius: var(--bs-r);
    transition: border-color .25s, background .25s, transform .25s;
}
.bs-input:focus-within { border-color: var(--primary2); transform: translateY(-1px); }
.bs-input > i { color: var(--rgba1); font-size: 16px; transition: color .25s, transform .25s; }
.bs-input:focus-within > i { color: var(--primary2); transform: scale(1.12); }
.bs-input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 15px; }
.bs-input input::placeholder { color: var(--rgba1); }
.bs-input input::-webkit-search-cancel-button, .bs-input input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.bs-input button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--rgba3); transition: background .2s, transform .2s; }
.bs-input button:hover { background: var(--rgba2); transform: rotate(90deg); }
.bs-line {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px;
    background: linear-gradient(90deg, var(--primary2), var(--primary1));
    transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.bs-input:focus-within .bs-line { transform: scaleX(1); }

.bs-go, .bs-fbtn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 50px; border-radius: var(--bs-r); font-weight: 600; font-size: 14px;
    transition: transform .2s, background .25s, border-color .25s;
}
.bs-go { width: 50px; flex: none; background: var(--primary2); color: #fff !important; font-size: 18px; }
.bs-go i { transition: transform .25s; }
.bs-go:hover i { transform: translateX(3px); }
.bs-go:active, .bs-fbtn:active { transform: scale(.94); }
.bs-fbtn { padding: 0 14px; background: var(--card); border: 1.5px solid var(--rgba2); }
.bs-fbtn:hover { border-color: var(--primary2); }
.bs-fbtn b {
    min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
    font-size: 11px; border-radius: 10px; background: var(--primary2); color: #fff; animation: bsPop .35s ease;
}

.bs-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 8px; scroll-margin-top: calc(var(--bs-sticky) + 70px); }
.bs-bar p { font-size: 13px; color: var(--rgba3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-sort {
    position: relative; flex: none; display: flex; align-items: center; max-width: 58%;
    height: 38px; padding: 0 12px; gap: 8px; border-radius: 12px;
    background: var(--card); border: 1.5px solid var(--rgba2); transition: border-color .25s;
}
.bs-sort:hover, .bs-sort:focus-within { border-color: var(--primary2); }
.bs-sort i { font-size: 13px; color: var(--primary2); }
.bs-sort select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 13px; font-weight: 500; padding-right: 4px; max-width: 100%; text-overflow: ellipsis; cursor: pointer; }
.bs-sort select option { background: var(--card); color: var(--text1); }

.bs-hint {
    margin: 0 0 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; border-radius: 12px;
    background: color-mix(in srgb, var(--bs-warn) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--bs-warn) 40%, transparent);
    animation: bsIn .35s ease both;
}

.bs-active { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.bs-active:empty { display: none; }
.bs-active::-webkit-scrollbar { display: none; }
.bs-tag {
    flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px;
    font-size: 12px; font-weight: 500; border-radius: 999px; white-space: nowrap;
    background: color-mix(in srgb, var(--primary2) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary2) 45%, transparent);
    animation: bsPop .3s ease both; transition: background .2s, transform .2s;
}
.bs-tag:hover { background: color-mix(in srgb, var(--primary2) 26%, transparent); }
.bs-tag:active { transform: scale(.93); }
.bs-tag i { font-size: 15px; }
.bs-tag.is-x { background: color-mix(in srgb, var(--primary1) 12%, transparent); border-color: color-mix(in srgb, var(--primary1) 45%, transparent); }
.bs-tag.bs-clear { padding: 6px 12px; background: transparent; border-color: var(--rgba2); color: var(--primary1); }

.bs-backdrop {
    position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.bs-backdrop.is-open { opacity: 1; pointer-events: auto; }
.bs-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10001;
    display: flex; flex-direction: column; max-height: 88dvh;
    background: var(--bg); border-radius: 24px 24px 0 0; border: 1px solid var(--rgba2); border-bottom: 0;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, .35);
    transform: translateY(105%); visibility: hidden;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s;
}
.bs-panel.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.bs-panel::before { content: ""; flex: none; width: 40px; height: 4px; margin: 10px auto 0; border-radius: 4px; background: var(--rgba1); }
.bs-phead { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 10px; }
.bs-phead h2 { font-size: 18px; font-weight: 700; }
.bs-phead button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rgba2); display: grid; place-items: center; transition: transform .25s, background .2s; }
.bs-phead button:hover { background: var(--rgba2); transform: rotate(90deg); }

.bs-panes { flex: 1; overflow-y: auto; padding: 0 18px 8px; overscroll-behavior: contain; }
.bs-sec { border-top: 1px solid var(--rgba2); }
.bs-sh { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-size: 14px; font-weight: 600; text-align: left; }
.bs-sh small { margin-left: 8px; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; border-radius: 9px; background: var(--primary2); color: #fff; }
.bs-sh small:empty { display: none; }
.bs-sh i { font-size: 13px; color: var(--rgba3); transition: transform .3s; }
.bs-sec[data-open="true"] .bs-sh i { transform: rotate(180deg); }
.bs-sb { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1); }
.bs-sec[data-open="true"] .bs-sb { grid-template-rows: 1fr; }
.bs-si { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .32s; }
.bs-sec[data-open="true"] .bs-si { visibility: visible; transition-delay: 0s; padding-bottom: 16px; }

.bs-find {
    width: 100%; height: 42px; margin-bottom: 8px; padding: 0 14px; font-size: 14px;
    background: var(--card); border: 1.5px solid var(--rgba2); border-radius: 12px; transition: border-color .25s;
}
.bs-find:focus { border-color: var(--primary2); }
.bs-tip { margin-bottom: 10px; font-size: 12px; color: var(--rgba3); }
.bs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-mode { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rgba2); }
.bs-chip {
    padding: 8px 14px; font-size: 13px; border-radius: 999px;
    background: var(--card); border: 1.5px solid var(--rgba2);
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.bs-chip:hover { border-color: var(--primary2); }
.bs-chip:active { transform: scale(.94); }
.bs-chip[aria-pressed="true"] { background: var(--primary2); border-color: var(--primary2); color: #fff; font-weight: 600; animation: bsPop .3s ease; }
.bs-chip[data-st="exc"] { background: var(--primary1); border-color: var(--primary1); text-decoration: line-through; }
.bs-none { padding: 6px 0; font-size: 13px; color: var(--rgba3); }
.bs-link { color: var(--primary2); font-weight: 600; text-decoration: underline; }

.bs-range { display: flex; align-items: center; gap: 10px; }
.bs-range input {
    flex: 1; min-width: 0; height: 42px; padding: 0 14px; font-size: 14px; text-align: center;
    background: var(--card); border: 1.5px solid var(--rgba2); border-radius: 12px; transition: border-color .25s;
}
.bs-range input:focus { border-color: var(--primary2); }
.bs-range span { color: var(--rgba3); }

.bs-pfoot { flex: none; display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rgba2); background: var(--bg); }
.bs-pfoot button { height: 48px; border-radius: 14px; font-weight: 600; font-size: 14px; transition: transform .2s, background .2s, border-color .2s; }
.bs-pfoot button:active { transform: scale(.96); }
.bs-pfoot .bs-reset { flex: 1; border: 1.5px solid var(--rgba2); }
.bs-pfoot .bs-reset:hover { border-color: var(--primary1); color: var(--primary1); }
.bs-pfoot .bs-apply { flex: 2; background: var(--primary2); color: #fff; }

.bs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.bs-card { display: block; min-width: 0; animation: bsIn .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.bs-cover {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 14px;
    background: var(--c, var(--card)); border: 1px solid var(--rgba2);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.bs-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bs-cover::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; opacity: 0; transition: opacity .3s; }
.bs-card:hover .bs-cover, .bs-card:focus-visible .bs-cover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0, 0, 0, .28); }
.bs-card:hover .bs-cover img { transform: scale(1.06); }
.bs-card:hover .bs-cover::after { opacity: 1; }
.bs-cover .bs-type, .bs-cover .bs-rate {
    position: absolute; top: 8px; z-index: 1; padding: 4px 8px; font-size: 11px; font-weight: 600; color: #fff;
    border-radius: 8px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.bs-type { left: 8px; }
.bs-rate { right: 8px; display: flex; align-items: center; gap: 4px; }
.bs-rate i { color: #ffc531; font-size: 10px; }
.bs-rate.is-na { color: rgba(255, 255, 255, .7) !important; }
.bs-rate.is-na i { color: rgba(255, 255, 255, .45); }
.bs-card h3 { margin: 9px 2px 2px; font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.bs-card:hover h3 { color: var(--primary2); }
.bs-alt { display: block; margin: 0 2px 2px; font-size: 11.5px; font-style: italic; color: var(--rgba3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-card p { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 2px 2px 0; font-size: 12px; color: var(--rgba3); }
.bs-ch { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-st { flex: none; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; }
.bs-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bs-ok); }
.bs-st[data-s="end"]::before, .bs-st[data-s="completed"]::before { background: var(--bs-end); }

.bs-sk { animation: none; }
.bs-sk .bs-cover, .bs-sk i { display: block; background: linear-gradient(100deg, var(--card) 30%, var(--rgba2) 50%, var(--card) 70%) 0 0 / 300% 100%; animation: bsShine 1.3s linear infinite; }
.bs-sk i { height: 12px; margin: 10px 2px 0; border-radius: 6px; width: 85%; border: 0; }
.bs-sk i + i { width: 55%; margin-top: 8px; }
.is-busy .bs-results { cursor: progress; }

.bs-empty { text-align: center; padding: 64px 16px; animation: bsIn .4s ease both; }
.bs-empty i { font-size: 48px; color: var(--rgba1); display: inline-block; animation: bsPulse 2.4s ease-in-out infinite; }
.bs-empty h3 { margin: 14px 0 6px; font-size: 18px; }
.bs-empty p { max-width: 380px; margin: 0 auto 18px; font-size: 14px; line-height: 1.55; color: var(--rgba3); }
.bs-empty button { padding: 12px 24px; font-weight: 600; font-size: 14px; border-radius: 12px; background: var(--primary2); color: #fff; transition: transform .2s; }
.bs-empty button:active { transform: scale(.95); }

.bs-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.bs-pager:empty { display: none; }
.bs-pager button {
    min-width: 40px; height: 40px; padding: 0 12px; font-size: 14px; font-weight: 500; border-radius: 12px;
    background: var(--card); border: 1.5px solid var(--rgba2); transition: background .2s, border-color .2s, transform .2s;
}
.bs-pager button:not(:disabled):hover { border-color: var(--primary2); transform: translateY(-2px); }
.bs-pager button.is-on { background: var(--primary2); border-color: var(--primary2); color: #fff; font-weight: 700; }
.bs-dots { padding: 0 4px; color: var(--rgba3); }

body.bs-lock { overflow: hidden; }

@media (min-width: 600px) {
    #box-search { padding-inline: 22px; }
    .bs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
    .bs-card h3 { font-size: 14px; }
}

@media (min-width: 960px) {
    .bs-fbtn, .bs-phead button, .bs-backdrop, .bs-panel::before { display: none !important; }
    .bs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; }
    .bs-panel {
        position: sticky; top: calc(var(--bs-sticky) + 78px); z-index: 1;
        max-height: calc(100dvh - var(--bs-sticky) - 98px);
        transform: none; visibility: visible; border-radius: 20px; border: 1px solid var(--rgba2); background: var(--card); box-shadow: none;
    }
    .bs-phead { padding-top: 16px; }
    .bs-pfoot { padding-bottom: 14px; background: var(--card); border-radius: 0 0 20px 20px; }
    .bs-chip, .bs-find, .bs-range input { background: var(--bg); }
    .bs-input { max-width: 680px; }
    .bs-go { width: 56px; }
}

@media (min-width: 1200px) { .bs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .bs-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (max-width: 380px) {
    .bs-fbtn span { display: none; }
    .bs-fbtn { padding: 0 12px; }
    .bs-sort { max-width: 62%; }
}

@media (prefers-reduced-motion: reduce) {
    #box-search *, #box-search *::before, #box-search *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.bs-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bs-noscript { padding: 24px 0; text-align: center; font-size: 14px; color: var(--rgba3); }
.bs-noscript a { color: var(--primary2); font-weight: 600; text-decoration: underline; }
