.bbys-homepage {
    --home-primary: var(--theme-primary, #287fd1);
    --home-primary-hover: var(--theme-primary-hover, #1e69b3);
    --home-primary-soft: var(--theme-card, #eef7ff);
    --home-background: var(--theme-background, #f4f7fa);
    --home-surface: var(--theme-surface, #ffffff);
    --home-text: var(--theme-text, #202833);
    --home-muted: var(--theme-text-secondary, #687585);
    --home-border: var(--theme-border, #dce4ec);
    --home-coral: #e85e62;
    --home-yellow: #dda72c;
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--home-background);
    color: var(--home-text);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.bbys-homepage:has(.standalone-search-page) {
    overflow: hidden;
}

.bbys-homepage *,
.bbys-homepage *::before,
.bbys-homepage *::after {
    box-sizing: border-box;
}

.bbys-homepage button,
.bbys-homepage input {
    font: inherit;
}

.bbys-homepage button,
.bbys-homepage a {
    -webkit-tap-highlight-color: transparent;
}

.bbys-homepage .headerBox,
.bbys-homepage .headerKox,
.bbys-homepage .footerBox {
    display: none !important;
}

[v-cloak] {
    display: none;
}

.home-topbar {
    position: relative;
    z-index: 30;
    min-height: 64px;
    border-bottom: 1px solid var(--home-border);
    background: var(--home-surface);
}

.home-topbar-inner,
.homepage-shell {
    width: calc(100% - 32px);
    max-width: 1100px;
    margin: 0 auto;
}

.home-topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.home-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--home-text);
    text-decoration: none;
}

.home-brand-logo,
.home-brand-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
}

.home-brand-logo {
    object-fit: cover;
}

.home-brand-mark {
    display: grid;
    place-items: center;
    background: var(--home-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.home-brand-name {
    overflow: hidden;
    color: var(--home-text);
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-navigation {
    min-width: 0;
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-navigation::-webkit-scrollbar {
    display: none;
}

.home-navigation-link {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 2px solid transparent;
    color: var(--home-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

button.home-navigation-link {
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: transparent;
    cursor: pointer;
}

.home-navigation-link:hover,
.home-navigation-link:focus-visible,
.home-navigation-link.active {
    border-bottom-color: var(--home-primary);
    background: var(--home-primary-soft);
    color: var(--home-primary);
    outline: none;
}

.home-navigation-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-switcher {
    position: relative;
}

.theme-switcher-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--home-border);
    border-radius: 50%;
    background: var(--home-surface);
    color: var(--home-muted);
    cursor: pointer;
}

.theme-switcher-btn:hover,
.theme-switcher-btn:focus-visible {
    border-color: var(--home-primary);
    color: var(--home-primary);
    outline: 2px solid var(--home-primary);
    outline-offset: 2px;
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    width: 142px;
    padding: 7px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}

.theme-option {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--home-text);
    cursor: pointer;
    text-align: left;
}

.theme-option:hover,
.theme-option:focus-visible {
    background: var(--home-primary-soft);
    color: var(--home-primary);
    outline: 2px solid var(--home-primary);
    outline-offset: -2px;
}

.theme-option:focus,
.theme-option:focus-visible {
    box-shadow: inset 0 0 0 2px var(--home-primary);
}

.theme-option.active {
    background: var(--home-primary);
    color: #fff;
}

.theme-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
}

.theme-dot-red { background: #ff6b6b; }
.theme-dot-blue { background: #4a90e2; }
.theme-dot-green { background: #27ae60; }
.theme-dot-dark { background: #6366f1; }

.theme-name {
    font-size: 13px;
}

.mobile-navigation-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: none;
    place-items: center;
    gap: 4px;
    padding: 9px;
    border: 1px solid var(--home-border);
    border-radius: 7px;
    background: var(--home-surface);
    cursor: pointer;
}

.mobile-navigation-button span {
    width: 18px;
    height: 2px;
    display: block;
    background: var(--home-text);
}

.mobile-navigation-panel {
    border-top: 1px solid var(--home-border);
    background: var(--home-surface);
}

.mobile-navigation-panel[hidden] {
    display: none;
}

.mobile-navigation-inner {
    width: calc(100% - 24px);
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 0 12px;
    display: grid;
}

.mobile-navigation-inner a,
.mobile-navigation-inner button {
    width: 100%;
    padding: 11px 10px;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--home-border);
    background: transparent;
    color: var(--home-text);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.mobile-navigation-inner a:hover,
.mobile-navigation-inner a:focus-visible,
.mobile-navigation-inner button:hover,
.mobile-navigation-inner button:focus-visible {
    background: var(--home-primary-soft);
    color: var(--home-primary);
    outline: 2px solid var(--home-primary);
    outline-offset: -2px;
}

.homepage-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 16px 0 30px;
}

.standalone-search-page {
    width: calc(100% - 32px);
    max-width: 1100px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow-x: hidden;
    overflow-y: hidden;
}

.standalone-search-page .search-result-fixed {
    position: sticky;
    top: 0;
    z-index: 10;
    min-width: 0;
    background: var(--home-background);
}

.standalone-search-page .search-result-scroll {
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
    align-items: start;
    gap: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.standalone-search-page .search-result-section,
.standalone-search-page .standalone-search-sidebar,
.standalone-search-page .search-result-title-left,
.standalone-search-page .search-result-title-left h2 {
    min-width: 0;
}

.standalone-search-page .search-result-title-left h2 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 17px;
    line-height: 1.45;
}

.standalone-search-page .standalone-search-sidebar {
    display: grid;
    gap: 10px;
}

.standalone-search-page .standalone-search-ranking {
    padding: 12px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.standalone-search-page .standalone-search-ranking h2 {
    margin: 0 0 8px;
    font-size: 14px;
}

.standalone-search-page .standalone-search-ranking .list {
    display: grid;
    gap: 6px;
}

.standalone-search-page .standalone-search-ranking .item {
    min-width: 0;
    overflow: hidden;
    color: var(--home-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-session-metrics {
    max-width: 760px;
    margin: 12px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--home-muted);
    font-size: 12px;
}

.search-session-metrics strong {
    color: var(--home-text);
    font-variant-numeric: tabular-nums;
}

.home-ads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.home-ad {
    min-width: 0;
    aspect-ratio: 5 / 1;
    display: block;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: var(--home-surface);
}

.home-ad img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.home-search-card {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 40px 44px 28px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
    box-shadow: 0 8px 24px rgba(39, 58, 78, .07);
}

.home-search-heading {
    max-width: 900px;
    margin: 0 auto 22px;
    text-align: center;
}

.home-search-heading h1 {
    margin: 0;
    color: var(--home-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
}

.pan-type-tabs {
    max-width: 760px;
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.pan-type-tab {
    min-width: max-content;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: var(--home-background);
    color: var(--home-muted);
    cursor: pointer;
    font-size: 13px;
}

.pan-type-tab:hover,
.pan-type-tab:focus-visible,
.pan-type-tab.active {
    border-color: var(--home-primary);
    background: var(--home-primary);
    color: #fff;
    outline: none;
}

.home-search-control {
    width: 100%;
    max-width: 760px;
    min-height: 54px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-primary-soft);
}

.home-search-input {
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    outline: none;
    background: var(--home-surface);
    color: var(--home-text);
}

.home-search-input:focus {
    border-color: var(--home-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-primary) 18%, transparent);
}

.home-search-button {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--home-primary);
    border-radius: 6px;
    background: var(--home-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.home-search-button:hover,
.home-search-button:focus-visible {
    border-color: var(--home-primary-hover);
    background: var(--home-primary-hover);
    outline: none;
}

.hot-keywords {
    max-width: 920px;
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

.hot-keywords-label {
    color: var(--home-muted);
    font-size: 13px;
}

.bbys-homepage .hot-keyword {
    min-height: 29px;
    padding: 5px 14px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #667eeadd 100%);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: filter .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hot-keyword:nth-of-type(12n + 1) { background: linear-gradient(135deg, #667eea 0%, #667eeadd 100%); }
.hot-keyword:nth-of-type(12n + 2) { background: linear-gradient(135deg, #764ba2 0%, #764ba2dd 100%); }
.hot-keyword:nth-of-type(12n + 3) { background: linear-gradient(135deg, #f093fb 0%, #f093fbdd 100%); }
.hot-keyword:nth-of-type(12n + 4) { background: linear-gradient(135deg, #f5576c 0%, #f5576cdd 100%); }
.hot-keyword:nth-of-type(12n + 5) { background: linear-gradient(135deg, #4facfe 0%, #4facfedd 100%); }
.hot-keyword:nth-of-type(12n + 6) { background: linear-gradient(135deg, #00f2fe 0%, #00f2fedd 100%); }
.hot-keyword:nth-of-type(12n + 7) { background: linear-gradient(135deg, #43e97b 0%, #43e97bdd 100%); }
.hot-keyword:nth-of-type(12n + 8) { background: linear-gradient(135deg, #38f9d7 0%, #38f9d7dd 100%); }
.hot-keyword:nth-of-type(12n + 9) { background: linear-gradient(135deg, #fa709a 0%, #fa709add 100%); }
.hot-keyword:nth-of-type(12n + 10) { background: linear-gradient(135deg, #fee140 0%, #fee140dd 100%); }
.hot-keyword:nth-of-type(12n + 11) { background: linear-gradient(135deg, #30cfd0 0%, #30cfd0dd 100%); }
.hot-keyword:nth-of-type(12n) { background: linear-gradient(135deg, #330867 0%, #330867dd 100%); }

.hot-keyword:hover,
.hot-keyword:focus-visible {
    filter: brightness(.96) saturate(1.06);
    box-shadow: 0 4px 10px rgba(36, 48, 70, .16);
    transform: translateY(-1px);
    outline: 2px solid var(--home-text);
    outline-offset: 2px;
}

.home-helper-strip {
    width: 100%;
    max-width: 760px;
    min-height: 42px;
    margin: 18px auto 0;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    border: 1px solid var(--home-border);
    border-radius: 7px;
    background: var(--home-primary-soft);
    color: var(--home-muted);
    font-size: 12px;
    white-space: pre-wrap;
}

.home-helper-strip strong {
    color: var(--home-primary);
}

.home-helper-copy {
    flex-basis: 100%;
    text-align: center;
}

.tmdb-info {
    max-width: 760px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
    border: 1px solid var(--home-border);
    border-radius: 7px;
    background: var(--home-background);
}

.tmdb-poster {
    width: 80px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 5px;
    background: var(--home-primary-soft);
}

.tmdb-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmdb-title {
    font-weight: 700;
}

.tmdb-title-en,
.tmdb-year,
.tmdb-overview {
    color: var(--home-muted);
}

.tmdb-year {
    margin-top: 4px;
    font-size: 12px;
}

.tmdb-overview {
    margin-top: 8px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.search-result-section,
.latest-section {
    display: none;
    padding: 18px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.search-result-section.show,
.latest-section {
    display: block;
}

.search-result-title,
.latest-header {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.search-result-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
}

.search-result-count {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 400;
}

.search-result-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: var(--home-surface);
    color: var(--home-muted);
    cursor: pointer;
}

.search-result-loading,
.search-result-empty,
.latest-item-empty,
.ranking-empty {
    min-height: 90px;
    display: grid;
    place-items: center;
    color: var(--home-muted);
    font-size: 13px;
    text-align: center;
}

.loading-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.loading-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--home-primary);
    animation: home-pulse 1s ease-in-out infinite alternate;
}

.loading-pulse:nth-child(2) { animation-delay: .15s; }
.loading-pulse:nth-child(3) { animation-delay: .3s; }

@keyframes home-pulse {
    to { opacity: .25; transform: translateY(-4px); }
}

.loading-text {
    margin-top: 10px;
}

.search-result-list,
.latest-list {
    display: grid;
    gap: 8px;
}

.search-result-sentinel {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 2px;
    color: var(--home-muted);
    font-size: 12px;
    text-align: center;
}

.search-result-sentinel:empty {
    display: none;
}

.search-result-item,
.latest-item {
    width: 100%;
    appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--home-border);
    border-radius: 7px;
    background: var(--home-background);
    cursor: pointer;
}

.search-result-item:hover,
.latest-item:hover {
    border-color: var(--home-primary);
    background: var(--home-primary-soft);
}

.search-result-info,
.latest-item-info {
    min-width: 0;
    flex: 1;
}

.search-result-name {
    overflow: hidden;
    color: var(--home-text);
    font-weight: 600;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.45;
}

.search-result-cover {
    width: 48px;
    height: 64px;
    flex: 0 0 48px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--home-primary-soft);
}

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

.latest-item-title {
    overflow: hidden;
    color: var(--home-text);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item {
    border-bottom: 1px solid var(--home-border);
}

.search-result-desc {
    margin-top: 5px;
    overflow: hidden;
    color: var(--home-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.45;
}

.search-result-meta,
.latest-item-meta {
    margin-top: 7px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--home-muted);
    font-size: 11px;
}

.search-result-tag,
.latest-item-tag {
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--home-primary-soft);
    color: var(--home-muted);
}

.search-result-source,
.search-result-time {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-status {
    color: var(--home-primary);
    background: var(--home-primary-soft);
}

.search-result-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-result-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--home-border);
}

.search-result-fields {
    display: grid;
    grid-template-columns: repeat(4, auto);
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    color: var(--home-muted);
    font-size: 11px;
    white-space: nowrap;
}

.home-search-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.home-search-action {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--home-border);
    border-radius: 5px;
    background: var(--home-surface);
    color: var(--home-muted);
    cursor: pointer;
    font-size: 12px;
}

.home-search-action:hover,
.home-search-action:focus-visible {
    border-color: var(--home-primary);
    color: var(--home-primary);
    outline: none;
}

.search-result-btn {
    min-width: 88px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 6px;
    background: var(--home-primary);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

.latest-title {
    margin: 0;
    font-size: 17px;
}

.latest-more {
    color: var(--home-primary);
    font-size: 12px;
    text-decoration: none;
}

.latest-item-index {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: var(--home-primary-soft);
    color: var(--home-primary);
    font-size: 11px;
    font-weight: 700;
}

.latest-item-index.top3 {
    background: var(--home-coral);
    color: #fff;
}

.ranking-section {
    min-width: 0;
}

.ranking-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 2px 11px;
}

.ranking-header h2 {
    margin: 0;
    font-size: 20px;
}

.ranking-header p {
    margin: 6px 0 0;
    color: var(--home-muted);
    font-size: 12px;
}

.ranking-refresh {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: var(--home-surface);
    color: var(--home-muted);
    cursor: pointer;
}

.ranking-refresh:hover,
.ranking-refresh:focus-visible {
    border-color: var(--home-primary);
    color: var(--home-primary);
    outline: 2px solid var(--home-primary);
    outline-offset: 2px;
}

.ranking-refresh svg {
    width: 17px;
    height: 17px;
}

.ranking-refresh.is-loading svg {
    animation: ranking-refresh-spin .75s linear infinite;
}

@keyframes ranking-refresh-spin {
    to { transform: rotate(360deg); }
}

.tab-list {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 5px 8px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.tab-item {
    min-width: max-content;
    height: 32px;
    padding: 0 13px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--home-muted);
    cursor: pointer;
}

.tab-item:hover,
.tab-item:focus-visible,
.tab-item.active {
    background: var(--home-primary);
    color: #fff;
    outline: none;
}

.ranking-grid {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ranking-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.ranking-card-header {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 13px;
    border-bottom: 1px solid var(--home-border);
}

.ranking-card-header > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-card-header h3 {
    margin: 0;
    font-size: 15px;
}

.ranking-card-header time {
    color: var(--home-muted);
    font-size: 10px;
}

.ranking-card-accent {
    width: 5px;
    height: 20px;
    border-radius: 3px;
    background: var(--home-coral);
}

.ranking-card-new .ranking-card-accent { background: var(--home-primary); }
.ranking-card-good .ranking-card-accent { background: var(--home-yellow); }

.ranking-list {
    padding: 0 10px 7px;
}

.ranking-item {
    width: 100%;
    min-width: 0;
    min-height: 75px;
    display: grid;
    grid-template-columns: 24px 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--home-border);
    background: transparent;
    color: var(--home-text);
    cursor: pointer;
    text-align: left;
}

.ranking-item:last-child {
    border-bottom: 0;
}

.ranking-item:hover,
.ranking-item:focus-visible {
    background: var(--home-primary-soft);
    outline: none;
}

.ranking-rank {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: var(--home-primary-soft);
    color: var(--home-primary);
    font-size: 11px;
    font-weight: 700;
}

.ranking-rank.top1,
.ranking-card-rank.top1 { background: #e85e62; color: #fff; }
.ranking-rank.top2,
.ranking-card-rank.top2 { background: #ed8a56; color: #fff; }
.ranking-rank.top3,
.ranking-card-rank.top3 { background: #d9aa32; color: #fff; }

.ranking-cover {
    width: 42px;
    height: 58px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--home-primary-soft);
}

.ranking-cover img,
.ranking-card-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ranking-info {
    min-width: 0;
}

.ranking-item-title {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: var(--home-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    color: var(--home-coral);
    font-size: 11px;
    font-weight: 700;
}

.ranking-grid-mobile {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 0 5px;
}

.ranking-card-mobile {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--home-text);
    cursor: pointer;
    text-align: left;
}

.ranking-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: var(--home-primary-soft);
}

.ranking-card-rank {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1;
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(31, 45, 61, .78);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.ranking-card-title {
    margin-top: 5px;
    display: block;
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-links-section {
    padding: 17px 18px;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.friend-links-section h2,
.home-disclaimer h2 {
    margin: 0 0 11px;
    font-size: 15px;
}

.friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.friend-links-list a {
    color: var(--home-muted);
    font-size: 12px;
    text-decoration: none;
}

.friend-links-list a:hover,
.friend-links-list a:focus-visible {
    color: var(--home-primary);
    outline: none;
}

.home-footer {
    padding: 19px 2px 6px;
    border-top: 1px solid var(--home-border);
    color: var(--home-muted);
}

.home-disclaimer p {
    max-width: 900px;
    margin: 5px 0;
    font-size: 11px;
    line-height: 1.75;
    white-space: pre-wrap;
}

.home-footer-meta {
    margin-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--home-muted);
    font-size: 11px;
}

.home-footer-meta a {
    color: var(--home-primary);
}

.home-footer-meta span {
    white-space: pre-wrap;
}

.notice-open {
    overflow: hidden;
}

.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(24, 32, 41, .58);
}

.notice-overlay[hidden] {
    display: none;
}

.notice-dialog {
    width: min(100%, 520px);
    max-height: min(82vh, 680px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 8px;
    background: var(--home-surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.notice-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--home-border);
}

.notice-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--home-primary-soft);
    color: var(--home-primary);
    font-weight: 800;
}

.notice-header h2 {
    margin: 0;
    font-size: 19px;
}

.notice-header p {
    margin: 5px 0 0;
    color: var(--home-muted);
    font-size: 12px;
}

.notice-body {
    overflow-y: auto;
    padding: 20px;
    color: var(--home-text);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.notice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 20px 20px;
    border-top: 1px solid var(--home-border);
}

.notice-actions button,
.dialog-actions .btn-primary,
.dialog-actions .btn-secondary {
    min-height: 40px;
    border-radius: 6px;
    cursor: pointer;
}

.notice-reject,
.dialog-actions .btn-secondary {
    border: 1px solid var(--home-border);
    background: var(--home-surface);
    color: var(--home-text);
}

.notice-accept,
.dialog-actions .btn-primary {
    border: 1px solid var(--home-primary);
    background: var(--home-primary);
    color: #fff;
}

.resource-dialog-content {
    color: var(--home-text);
    text-align: center;
}

.success-title,
.error-title {
    font-size: 20px;
    font-weight: 700;
}

.resource-subtitle,
.scan-tip,
.scan-desc,
.error-message {
    margin-top: 8px;
}

.resource-subtitle,
.scan-desc,
.error-message {
    color: var(--home-muted);
    font-size: 12px;
}

.qrcode-wrapper {
    width: 144px;
    min-height: 144px;
    margin: 14px auto;
    padding: 12px;
    border: 1px solid var(--home-border);
    border-radius: 7px;
    background: #fff;
}

.url-box {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: var(--home-background);
    text-align: left;
}

.resource-url-only,
.resource-scan-only {
    margin-top: 20px;
}

.url-label {
    color: var(--home-muted);
    font-size: 11px;
}

.url-text {
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.dialog-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dialog-actions .btn-primary,
.dialog-actions .btn-secondary {
    min-width: 92px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.contact-qrcode {
    text-align: center;
}

.contact-qrcode img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.contact-qrcode p {
    margin: 12px 0 0;
    color: var(--home-muted);
    font-size: 13px;
}

.contact-qrcode-empty {
    min-height: 96px;
    display: grid;
    place-items: center;
    padding: 16px;
    border: 1px dashed var(--home-border);
    border-radius: 7px;
    background: var(--home-background);
}

.request-dialog-content {
    color: var(--home-text);
}

.request-dialog-label {
    display: block;
    margin-bottom: 8px;
    color: var(--home-muted);
    font-size: 13px;
}

.bbys-homepage .el-dialog {
    max-width: calc(100vw - 24px);
    border-radius: 8px;
    background: var(--home-surface);
    color: var(--home-text);
}

.bbys-homepage .el-dialog__title,
.bbys-homepage .el-dialog__body {
    color: var(--home-text);
}

.bbys-homepage .el-textarea__inner {
    border-color: var(--home-border);
    background: var(--home-background);
    color: var(--home-text);
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.nav-drawer-title {
    font-weight: 700;
}

.nav-drawer-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.nav-drawer-menu {
    display: grid;
    gap: 4px;
}

.nav-drawer-item {
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    color: var(--home-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.nav-drawer-item:hover {
    background: var(--home-primary-soft);
    color: var(--home-primary);
}

.bbys-homepage button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 900px) {
    .home-search-card {
        padding-right: 28px;
        padding-left: 28px;
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-topbar-inner,
    .homepage-shell {
        width: calc(100% - 24px);
    }

    .desktop-navigation {
        display: none;
    }

    .mobile-navigation-button {
        display: grid;
    }

    .theme-dropdown {
        right: -48px;
    }

    .homepage-shell {
        gap: 14px;
        padding-top: 12px;
    }

    .standalone-search-page .search-result-scroll {
        height: 100%;
        grid-template-columns: minmax(0, 1fr);
        padding: 0 4px 12px;
    }

    .standalone-search-page .search-result-fixed {
        padding: 0 4px;
    }

    .standalone-search-page .standalone-search-sidebar {
        display: none;
    }

    .standalone-search-page .search-result-scroll {
        grid-template-columns: minmax(0, 1fr);
    }

    .standalone-search-page .search-result-item {
        gap: 8px;
    }

    .search-result-fields {
        display: none;
    }

    .search-session-metrics {
        justify-content: flex-start;
    }

    .home-ads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-ad {
        aspect-ratio: 4 / 1;
    }

    .home-search-card {
        padding: 26px 16px 18px;
    }

    .home-search-heading {
        margin-bottom: 17px;
    }

    .home-search-heading h1 {
        font-size: 23px;
    }

    .pan-type-tabs {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .home-search-control {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-search-button {
        width: 100%;
    }

    .hot-keywords {
        justify-content: flex-start;
    }

    .home-helper-strip {
        justify-content: flex-start;
    }

    .search-result-section,
    .latest-section {
        padding: 14px;
    }

    .ranking-header p {
        display: none;
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .notice-dialog {
        max-height: 88vh;
    }
}

@media (max-width: 390px) {
    .home-topbar-inner,
    .homepage-shell {
        width: calc(100% - 16px);
    }

    .home-brand-name {
        max-width: 190px;
        font-size: 16px;
    }

    .home-search-card {
        padding: 22px 12px 15px;
    }

    .home-search-heading h1 {
        font-size: 21px;
    }

    .home-search-control {
        padding: 5px;
    }

    .pan-type-tab {
        padding: 0 8px;
    }

    .hot-keyword {
        padding-right: 9px;
        padding-left: 9px;
    }

    .tmdb-info {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .tmdb-poster {
        width: 62px;
    }

    .search-result-item {
        padding: 10px;
    }

    .standalone-search-page .search-result-item {
        width: 100%;
        max-width: 320px;
        margin-right: auto;
        margin-left: auto;
    }

    .standalone-search-page .search-result-btn {
        min-width: 72px;
        padding: 0 8px;
    }

    .ranking-card-header {
        padding-right: 10px;
        padding-left: 10px;
    }

    .ranking-list {
        padding-right: 8px;
        padding-left: 8px;
    }

    .ranking-grid-mobile {
        gap: 6px;
    }

    .notice-actions {
        grid-template-columns: 1fr;
    }

    .home-footer-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbys-homepage *,
    .bbys-homepage *::before,
    .bbys-homepage *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
