.home-catalog {
    --home-surface: #0f172a;
    --home-line: #334155;
    --home-text: #f8fafc;
    --home-muted: #94a3b8;
    --home-gold: #ffbc05;
    width: min(100%, 1200px);
    margin: 0 auto 64px;
    color: var(--home-text);
}

.home-catalog *, .home-catalog *::before, .home-catalog *::after { box-sizing: border-box; }
.home-catalog a { color: inherit; }
.home-catalog [hidden] { display: none !important; }
.home-catalog a:focus-visible,
.home-catalog button:focus-visible,
.home-catalog input:focus-visible { outline: 2px solid var(--home-gold); outline-offset: 3px; }

.home-search { padding: 46px 0 34px; border-bottom: 1px solid var(--home-line); }
.home-search-head,
.home-catalog-heading,
.home-preview-head,
.home-schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.home-search-head { margin-bottom: 18px; }
.home-search-head h1 { margin: 0; font-size: clamp(26px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }

.search-bar-form { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.input-box-field { position: relative; min-width: 0; }
#main-search-input {
    width: 100%; height: 56px; padding: 0 46px 0 17px;
    border: 1px solid var(--home-line); border-radius: 4px;
    color: var(--home-text); background: var(--home-surface); font-size: 16px;
}
#main-search-input::placeholder { color: #7f8ca1; }
.search-action-btn {
    min-width: 108px; min-height: 56px; padding: 0 18px;
    border: 1px solid var(--home-gold); border-radius: 4px;
    color: #0f172a; background: var(--home-gold); font-size: 15px; font-weight: 900; cursor: pointer;
}
#search-loading { position: absolute; right: 16px; top: 19px; display: none; color: var(--home-gold); }
.search-dropdown-box {
    position: absolute; z-index: 40; top: 64px; left: 0; right: 116px;
    display: none; max-height: 380px; overflow-y: auto;
    border: 1px solid var(--home-line); border-radius: 4px; background: #0b1220; box-shadow: 0 18px 38px rgba(0,0,0,.36);
}
.search-overlay { position: fixed; inset: 0; z-index: 30; display: none; background: rgba(2,6,23,.55); }
.recent-searches-wrapper { margin-top: 14px; }
.recent-searches-wrapper > strong { display: block; margin-bottom: 8px; color: var(--home-muted); font-size: 12px; }

.ranking-return-strip, .home-my-pulse { margin-top: 17px; padding-top: 16px; border-top: 1px solid rgba(51,65,85,.72); }
.ranking-return-heading h2, .home-my-pulse h2 { margin: 0; font-size: 14px; }
.ranking-return-list, .home-my-pulse-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ranking-return-link, .home-my-pulse-item, .home-my-pulse-all {
    min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 8px 12px; border: 1px solid var(--home-line); background: var(--home-surface); text-decoration: none;
}
.ranking-return-link { flex: 1 1 250px; }
.ranking-return-player, .ranking-return-stat, .home-my-pulse-item-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ranking-return-name, .home-my-pulse-item-copy strong { overflow: hidden; color: var(--home-text); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ranking-return-meta, .ranking-return-mmr, .home-my-pulse-item-copy small { color: var(--home-muted); font-size: 10px; }
.ranking-return-stat { align-items: flex-end; flex: 0 0 auto; }
.ranking-return-rank { color: var(--home-gold); font-size: 12px; font-weight: 900; }
.home-my-pulse-list { flex: 1; }
.home-my-pulse-item, .home-my-pulse-all { flex: 1 1 180px; justify-content: flex-start; }
.home-my-pulse-item i, .home-my-pulse-all i { color: var(--home-gold); }
.home-my-pulse-head { display: flex; align-items: center; gap: 10px; }
.home-my-pulse-head p { margin: 3px 0 0; color: var(--home-muted); font-size: 12px; }

.home-catalog-section { padding: 34px 0; border-bottom: 1px solid var(--home-line); }
.home-catalog-heading { align-items: baseline; margin-bottom: 17px; }
.home-catalog-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.home-catalog-heading nav { display: flex; flex-wrap: wrap; gap: 14px; }
.home-catalog-heading nav a, .home-preview-head > a, .home-schedule-head a { min-height: 44px; display: inline-flex; align-items: center; color: var(--home-gold); font-size: 13px; font-weight: 800; text-decoration: none; }

.home-records-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: 16px; align-items: stretch; }
.home-preview { min-width: 0; border: 1px solid var(--home-line); background: var(--home-surface); }
.home-preview-head { min-height: 54px; padding: 5px 16px; border-bottom: 1px solid var(--home-line); }
.home-preview-head h3, .home-schedule-head h3 { margin: 0; font-size: 16px; }
.home-preview-head small { display: block; margin-top: 3px; color: var(--home-muted); font-size: 11px; }
.home-battle-list { min-height: 200px; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.home-battle-entry {
    min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center; gap: 12px; padding: 9px 14px;
    border-bottom: 1px solid rgba(51,65,85,.66); color: inherit; text-decoration: none;
}
.home-battle-entry:last-child { border-bottom: 0; }
.home-battle-time { color: var(--home-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.home-battle-identity { min-width: 0; }
.home-battle-identity strong {
    display: block; overflow: hidden; color: var(--home-text); font-size: 13px; font-weight: 750;
    text-overflow: ellipsis; white-space: nowrap;
}
.home-battle-metrics { display: flex; align-items: center; justify-content: flex-end; gap: 15px; color: var(--home-muted); font-size: 10px; white-space: nowrap; }
.home-battle-metrics span { min-width: 38px; text-align: right; }
.home-battle-metrics b { color: #cbd5e1; font-size: 12px; font-weight: 850; }
.home-battle-status { grid-row: 1 / -1; display: flex; align-items: center; padding: 16px; }
.home-loading-line { color: var(--home-muted); font-size: 13px; }

.card-tabs-shell { position: relative; min-width: 0; }
.card-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--home-line); scrollbar-width: thin; }
.card-tabs-scroll-cue { display: none; }
.card-tab { flex: 0 0 auto; min-height: 44px; padding: 0 11px; border: 0; border-right: 1px solid rgba(51,65,85,.72); color: var(--home-muted); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.card-tab.active { color: #0f172a; background: var(--home-gold); }
.mini-list { min-height: 120px; padding: 9px 15px 12px; }
.mini-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; border-bottom: 1px solid rgba(51,65,85,.66); }
.mini-list-item:last-child { border-bottom: 0; }
.item-left-group { display: flex; align-items: center; min-width: 0; gap: 9px; }
.rank-num { min-width: 24px; font-size: 12px; font-weight: 900; }
.equip-icon { width: 34px; height: 34px; object-fit: contain; }
.ranking-player { min-width: 0; }
.ranking-player strong { display: block; overflow: hidden; color: var(--home-text); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ranking-player small { display: block; margin-top: 2px; color: var(--home-muted); font-size: 10px; }
.ranking-score { color: var(--home-gold); font-size: 12px; font-weight: 900; white-space: nowrap; }
.ranking-card.is-sparse .rank-num,
.ranking-card.is-sparse .ranking-score { color: #cbd5e1 !important; }

.home-pvp-signals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-signal-card {
    min-width: 0; min-height: 108px; display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto; gap: 13px; align-items: center;
    padding: 14px 16px; border: 1px solid var(--home-line); border-radius: 6px;
    background: var(--home-surface); text-decoration: none;
}
.home-signal-card.has-no-image { grid-template-columns: minmax(0, 1fr) auto; }
.home-signal-image-shell {
    width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden;
    border-radius: 6px; background: #0a1020;
}
.home-signal-card.is-loading .home-signal-image-shell { background: #172033; }
.home-signal-image-shell img { width: 52px; height: 52px; object-fit: contain; }
.home-signal-copy, .home-signal-stat { min-width: 0; display: flex; flex-direction: column; }
.home-signal-copy { gap: 4px; }
.home-signal-kind { color: var(--home-muted); font-size: 10px; font-weight: 700; }
.home-signal-copy strong { overflow: hidden; color: var(--home-text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.home-signal-mode { color: var(--home-muted); font-size: 11px; }
.home-signal-stat { align-items: flex-end; gap: 3px; text-align: right; }
.home-signal-metric { min-height: 20px; color: var(--home-gold); font-size: 17px; line-height: 1.15; white-space: nowrap; }
.home-signal-rates, .home-signal-stat small { color: var(--home-muted); font-size: 10px; line-height: 1.3; white-space: nowrap; }
.home-signal-status { grid-column: 1 / -1; margin: 0; padding: 8px 0; color: var(--home-muted); font-size: 12px; }

.home-inline-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.home-inline-routes a {
    min-width: 0; min-height: 74px; display: grid; grid-template-columns: 128px minmax(0, 1fr);
    align-items: stretch; overflow: hidden; border: 1px solid var(--home-line); border-radius: 6px;
    background: var(--home-surface); text-decoration: none;
}
.home-inline-routes img { width: 128px; height: 72px; object-fit: cover; }
.home-pvp-route-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 10px 12px; }
.home-pvp-route-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.home-pvp-route-copy small { margin-top: 5px; color: var(--home-muted); font-size: 10px; line-height: 1.35; }

.home-build-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(250px, 4fr); gap: 16px; }
.home-build-preview {
    min-width: 0; min-height: 132px; display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 1.4fr);
    align-items: center; gap: 18px; padding: 17px 19px; border: 1px solid var(--home-line);
    background: var(--home-surface); text-decoration: none;
}
.home-build-copy { min-width: 0; }
.home-build-copy small { display: block; color: var(--home-muted); font-size: 11px; font-weight: 750; }
.home-build-copy strong { display: block; margin-top: 6px; font-size: 17px; line-height: 1.35; }
.home-build-equipment { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.home-build-item {
    position: relative; width: 64px; height: 64px; flex: 0 1 64px; display: grid; place-items: center;
    border: 1px solid rgba(71,85,105,.9); background: #0a1020;
}
.home-build-item img { width: 58px; height: 58px; object-fit: contain; }
.home-build-item b { position: absolute; right: 2px; bottom: 2px; padding: 1px 4px; color: #0f172a; background: var(--home-gold); font-size: 8px; line-height: 1.4; }
.home-build-actions { border: 1px solid var(--home-line); }
.home-build-actions a { min-height: 44px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--home-line); text-decoration: none; }
.home-build-actions a:last-child { border-bottom: 0; }
.home-build-actions strong { font-size: 13px; }
.home-build-actions span { color: var(--home-muted); font-size: 10px; }

.market-showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-quote-card { min-width: 0; min-height: 136px; display: flex; align-items: center; gap: 13px; padding: 16px; border-right: 1px solid var(--home-line); text-decoration: none; }
.market-quote-card:last-child { border-right: 0; }
.market-quote-visual { position: relative; flex: 0 0 68px; }
.market-img { width: 68px; height: 68px; object-fit: contain; }
.market-tier-chip { position: absolute; right: -3px; bottom: -2px; padding: 2px 5px; color: #0f172a; background: var(--home-gold); font-size: 9px; font-weight: 900; }
.market-quote-copy { min-width: 0; }
.market-quote-name { overflow: hidden; color: var(--home-text); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.market-quote-price { margin-top: 5px; color: var(--home-gold); font-size: 15px; font-weight: 900; }
.market-quote-city, .market-quote-time { margin-top: 3px; color: var(--home-muted); font-size: 10px; }
.market-quote-city { display: block; }
.market-quote-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; color: var(--home-muted); font-size: 9px; }
.market-quote-meta b { color: #cbd5e1; font-weight: 800; }
.market-quote-time { display: block; }
.market-empty-state { grid-column: 1 / -1; min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; color: var(--home-muted); font-size: 13px; }
.market-empty-state a { min-height: 44px; display: inline-flex; align-items: center; color: var(--home-gold); font-weight: 800; text-decoration: none; }
.home-economy-actions { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-top: 1px solid var(--home-line); border-bottom: 1px solid var(--home-line); }
.home-economy-actions a { min-height: 54px; display: flex; align-items: baseline; gap: 10px; padding: 12px 13px; border-right: 1px solid var(--home-line); text-decoration: none; }
.home-economy-actions a:last-child { border-right: 0; }
.home-economy-actions strong { font-size: 13px; }
.home-economy-actions span { color: var(--home-muted); font-size: 11px; }

.home-guide-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 16px; align-items: start; }
.home-catalog .home-schedule { margin: 0; }
.home-catalog .home-schedule.is-ready { border-left-width: 1px; }
.home-catalog .home-schedule-head { min-height: 54px; padding-inline: 16px; }
.home-catalog .home-schedule-list li { min-height: 62px; }
.home-catalog .home-schedule-icon { width: 40px; height: 40px; flex-basis: 40px; }
.home-catalog .home-schedule-list time { font-size: 14px; }
.home-guide-links { border: 1px solid var(--home-line); }
.home-guide-links a { display: grid; grid-template-columns: minmax(120px, .7fr) 1fr; gap: 12px; align-items: center; min-height: 52px; padding: 9px 14px; border-bottom: 1px solid var(--home-line); text-decoration: none; }
.home-guide-links a:last-child { border-bottom: 0; }
.home-guide-links strong { font-size: 13px; }
.home-guide-links span { color: var(--home-muted); font-size: 11px; }
.home-catalog .home-schedule-unavailable { display: flex; align-items: center; min-height: 64px; padding: 12px 16px; color: var(--home-muted); font-size: 13px; }

@media (hover:hover) {
    .home-battle-entry:hover, .home-signal-card:hover, .home-inline-routes a:hover, .home-build-preview:hover, .home-build-actions a:hover, .home-economy-actions a:hover, .home-guide-links a:hover, .market-quote-card:hover { background: #151f31; }
}

@media (max-width: 1024px) {
    .home-records-grid, .home-guide-grid { grid-template-columns: minmax(0, 3fr) minmax(310px, 2fr); }
    .home-signal-card { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding-inline: 13px; }
    .home-signal-image-shell { width: 52px; height: 52px; }
    .home-inline-routes a { grid-template-columns: 104px minmax(0, 1fr); }
    .home-inline-routes img { width: 104px; }
    .home-pvp-route-copy { padding-inline: 10px; }
    .home-build-preview { grid-template-columns: minmax(140px, .65fr) minmax(0, 1.35fr); padding-inline: 15px; }
    .home-build-equipment { gap: 4px; }
    .home-build-item { width: 55px; height: 55px; flex-basis: 55px; }
    .home-build-item img { width: 50px; height: 50px; }
    .market-quote-card { padding: 13px; }
}

@media (max-width: 768px) {
    .home-catalog { margin-bottom: 42px; }
    .home-search { padding: 28px 0 25px; }
    .home-search-head { align-items: flex-start; flex-direction: column; gap: 7px; }
    .home-search-head h1 { font-size: 28px; }
    .home-catalog-section { padding: 27px 0; }
    .home-records-grid, .home-guide-grid { grid-template-columns: 1fr; }
    .home-build-layout, .market-showcase, .home-economy-actions { grid-template-columns: 1fr; }
    .home-build-layout { gap: 10px; }
    .market-quote-card, .home-economy-actions a { border-right: 0; border-bottom: 1px solid var(--home-line); }
    .market-quote-card:last-child, .home-economy-actions a:last-child { border-bottom: 0; }
    .home-build-preview { min-height: 116px; }
    .home-build-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
    .home-build-actions a { min-width: 0; min-height: 55px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; border-right: 1px solid var(--home-line); border-bottom: 0; }
    .home-build-actions a:last-child { border-right: 0; }
    .home-inline-routes { gap: 8px; }
    .home-inline-routes a { grid-template-columns: 92px minmax(0, 1fr); }
    .home-inline-routes img { width: 92px; }
    .home-pvp-route-copy { padding: 8px; }
    .market-quote-card { min-height: 88px; }
    .home-economy-actions a { min-height: 54px; }
}

@media (max-width: 480px) {
    .search-bar-form { grid-template-columns: 1fr; }
    .search-action-btn { width: 100%; min-height: 48px; }
    .search-dropdown-box { top: 62px; right: 0; }
    .home-catalog-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .home-catalog-heading nav { gap: 12px; }
    .home-battle-list { min-height: 0; grid-template-rows: repeat(3, minmax(68px, auto)); }
    .home-battle-entry { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 10px; padding: 9px 11px; }
    .home-battle-time { grid-row: 1 / span 2; align-self: center; font-size: 10px; }
    .home-battle-metrics { grid-column: 2; justify-content: flex-start; gap: 12px; }
    .home-battle-metrics span { min-width: 0; text-align: left; }
    .home-battle-metrics b { font-size: 11px; }
    .card-tabs {
        overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    }
    .card-tabs::after { content: ''; flex: 0 0 18px; }
    .card-tabs::-webkit-scrollbar { display: none; }
    .card-tab { scroll-snap-align: start; }
    .card-tabs-scroll-cue {
        position: absolute; top: 0; right: 0; width: 36px; height: 44px;
        display: flex; align-items: center; justify-content: flex-end; padding-right: 7px;
        background: linear-gradient(90deg, rgba(15,23,42,0), var(--home-surface) 62%);
        color: var(--home-gold); font-size: 21px; font-weight: 700; pointer-events: none;
        transition: opacity .16s ease;
    }
    .card-tabs-shell:not(.has-overflow) .card-tabs-scroll-cue,
    .card-tabs-shell.is-at-end .card-tabs-scroll-cue { opacity: 0; }
    .home-pvp-signals { grid-template-columns: 1fr; gap: 8px; }
    .home-signal-card { min-height: 88px; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
    .home-signal-image-shell { width: 44px; height: 44px; }
    .home-signal-image-shell img { width: 44px; height: 44px; }
    .home-signal-copy strong { font-size: 13px; }
    .home-signal-metric { font-size: 15px; }
    .home-signal-rates, .home-signal-stat small { font-size: 9px; }
    .home-inline-routes {
        display: flex; gap: 9px; overflow-x: auto; padding-bottom: 5px;
        scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-inline: contain;
    }
    .home-inline-routes::-webkit-scrollbar { display: none; }
    .home-inline-routes a { flex: 0 0 min(292px, 80vw); grid-template-columns: 104px minmax(0, 1fr); scroll-snap-align: start; }
    .home-inline-routes img { width: 104px; }
    .home-pvp-route-copy { padding: 9px 10px; }
    .home-preview-head { align-items: flex-start; }
    .home-guide-links a { grid-template-columns: 1fr; gap: 3px; }
    .market-empty-state { align-items: flex-start; flex-direction: column; }
    .home-build-preview { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
    .home-build-equipment { justify-content: flex-start; overflow: hidden; }
    .home-build-item { width: 50px; height: 50px; flex: 0 0 50px; }
    .home-build-item img { width: 46px; height: 46px; }
    .home-build-item:nth-child(n+6) { display: none; }
    .home-build-actions a { padding-inline: 9px; }
    .home-build-actions strong { font-size: 12px; }
    .home-build-actions span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-catalog *, .home-catalog *::before, .home-catalog *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
