/* ============================================================
   PVZH VAULT — HOMEPAGE REDESIGN
   Loaded LAST (after style.css, pvz-mobile-feed.css, pvz-duel.css,
   vault-loader.css). Selectors are deliberately specific so they win
   over the stacked !important rules in style.css without editing it.

   Contents
   1. Tokens + helpers
   2. Header: top bar (Updated + tools), wordmark, stats, search
   3. Discovery layout + hero picker (with Plants / Zombies toggle)
   4. Guide + Daily Duel row
   5. Featured deck
   6. Grade + star cluster (shared by Featured and Popular)
   7. Popular decks
   8. Footer
   9. Mobile
   ============================================================ */


/* ---------- 1. Tokens + helpers ---------- */

:root {
    --vh-bg: #12181b;
    --vh-surface: #1b2226;
    --vh-surface-hover: #20282d;
    --vh-line: rgba(255, 255, 255, 0.07);
    --vh-text: #ffffff;
    --vh-muted: #a0aab2;
    --vh-dim: #828e96;
    --vh-accent: #00b4d8;
    --vh-gold: #ffd15c;
    --vh-plant-stage: #183022;
    --vh-plant-disc: #1f3d2b;
    --vh-plant-card: #161d18;
    --vh-zombie-stage: #261b36;
    --vh-zombie-disc: #31224a;
    --vh-zombie-card: #1a1620;
}

.pvz-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}


/* ---------- 2. Header ---------- */

html body > header {
    position: relative !important;
    z-index: 50 !important;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: 0 !important;
    text-align: center !important;
}

/* Top bar */
html body > header .vault-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html body > header .vault-topbar-inner {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 24px;
}

html body > header .vault-updated {
    color: var(--vh-muted);
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
}

html body > header .vault-updated a.set5-easter-egg,
html body > header .vault-updated a.set5-easter-egg:visited,
html body > header .vault-updated a.set5-easter-egg:hover {
    color: var(--vh-text) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Tools */
html body #vaultTopbar nav.tools-row {
    position: relative !important;
    z-index: 60 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    grid-template-columns: none !important;
}

html body #vaultTopbar nav.tools-row > .tool-btn:not(.hidden),
html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn {
    position: relative !important;
    display: inline-flex !important;
    flex: none !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #c9d1d9 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    filter: none !important;
    transform: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

html body #vaultTopbar nav.tools-row > .tool-btn:not(.hidden):hover,
html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

html body #vaultTopbar nav.tools-row > .tool-btn:focus-visible,
html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}

html body #vaultTopbar nav.tools-row .btn-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    flex: 0 0 18px !important;
    margin: 0 !important;
}

html body #vaultTopbar nav.tools-row > #daveBtn .btn-icon.dave-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    flex: 0 0 28px !important;
    margin: -6px 0 !important;
    object-fit: contain !important;
}

html body #vaultTopbar nav.tools-row > #backBtn:not(.hidden) {
    color: var(--vh-accent) !important;
}

/* Disabled while the vault loads */
html body #vaultTopbar nav.tools-row > #daveBtn.is-disabled,
html body #vaultTopbar nav.tools-row > #daveBtn[aria-disabled="true"],
html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn:disabled {
    opacity: 0.45 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

html body #vaultTopbar nav.tools-row > .home-menu-more:not(.hidden) {
    position: relative !important;
    display: inline-flex !important;
    flex: none !important;
    width: auto !important;
    margin: 0 !important;
    grid-column: auto !important;
    overflow: visible !important;
    z-index: 70 !important;
}

/* Old phone rules force .more-menu visible; .hidden must still win */
html body #vaultTopbar nav.tools-row > .home-menu-more.hidden,
html body #vaultTopbar nav.tools-row > .tool-btn.hidden {
    display: none !important;
}

html body #vaultTopbar nav.tools-row > .home-menu-more > #moreDropdown.more-dropdown {
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    inset: calc(100% + 6px) 0 auto auto !important;
    transform: none !important;
    width: 210px !important;
    min-width: 210px !important;
    text-align: left !important;
    z-index: 1002 !important;
}

html body #vaultTopbar nav.tools-row > .home-menu-more > #moreDropdown.more-dropdown:not([hidden]) {
    display: flex !important;
}

/* Wordmark + stats */
html body > header .header-content {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 56px 24px 0 !important;
}

html body > header .header-content .site-title-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    margin: 0 !important;
}

html body > header .header-content .site-title-logo {
    width: clamp(48px, 6vw, 72px) !important;
    height: clamp(48px, 6vw, 72px) !important;
    flex: none !important;
    object-fit: contain !important;
}

html body > header .header-content .site-title-row h1 {
    max-width: none !important;
    margin: 0 !important;
    color: var(--vh-text) !important;
    font-size: clamp(44px, 6.5vw, 76px) !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
}

html body > header .header-content .header-meta-line {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    max-width: none !important;
    margin: 16px auto 0 !important;
    color: var(--vh-muted) !important;
    font-size: 19px !important;
    line-height: 1.4 !important;
    opacity: 1 !important;
}

html body > header .header-content .header-meta-line .header-dot {
    display: inline !important;
    margin: 0 12px !important;
    color: rgba(255, 255, 255, 0.28) !important;
}

/* Other pages (Deck Builder, Art, Stats...): keep the wordmark, drop the counts */
html body:has(#deckView.hidden) > header .header-content .header-meta-line {
    display: none !important;
}

html body:has(#deckView.hidden) > header .header-content {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
}

/* Guide banner when it lives in the header (non-Discovery desktop views) */
html body > header .header-content > .featured-decks-container {
    margin: 26px auto 0 !important;
}

/* Search: field only */
html body #searchWrapper.pvz-smart-search {
    width: min(720px, calc(100% - 28px)) !important;
    max-width: 720px !important;
    margin: 36px auto 0 !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-search-field {
    height: 58px !important;
    min-height: 58px !important;
    border: 1px solid #2c363c !important;
    border-radius: 14px !important;
    background: #192024 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    transform: none !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-search-field:hover {
    border-color: #3a464d !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-search-field:focus-within {
    border-color: rgba(0, 180, 216, 0.7) !important;
    background: #1b2327 !important;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.12) !important;
    transform: none !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-search-icon {
    left: 18px !important;
    width: 20px !important;
    height: 20px !important;
    color: #7f8a92 !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-search-field:focus-within .pvz-smart-search-icon {
    color: var(--vh-accent) !important;
    transform: translateY(-50%) !important;
}

html body #searchWrapper.pvz-smart-search .pvz-smart-input-shell {
    left: 50px !important;
}

/* Input and its highlight overlay must keep identical metrics */
html body #searchWrapper.pvz-smart-search #searchInput,
html body #searchWrapper.pvz-smart-search .pvz-smart-search-highlight-text {
    height: 58px !important;
    line-height: 58px !important;
    font-weight: 500 !important;
}

html body #searchWrapper.pvz-smart-search #searchInput {
    caret-color: var(--vh-accent) !important;
}

html body #searchWrapper.pvz-smart-search #searchInput::placeholder {
    color: #7f8a92 !important;
    -webkit-text-fill-color: #7f8a92 !important;
    font-weight: 500 !important;
}

html body #searchWrapper .pvz-smart-search-footer:has(#pvzSmartSearchStatus:empty) {
    display: none !important;
}


/* ---------- 3. Discovery layout + hero picker ---------- */

html body main:has(#deckGrid.pvz-discovery-mode) {
    padding-top: 0 !important;
}

html body #deckGrid.pvz-discovery-mode {
    max-width: 1180px !important;
    padding: 0 0 64px !important;
}

html body #deckGrid.pvz-discovery-mode > .pvz-discovery-home {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    content-visibility: visible !important;
    contain: none !important;
}

html body #deckGrid.pvz-discovery-mode > .pvz-discovery-home > * {
    grid-column: auto !important;
    grid-row: auto !important;
    order: 0 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
    width: 100% !important;
    margin: 44px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-hero-picker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
}

html body #deckGrid.pvz-discovery-mode .pvz-hero-picker-head .pvz-discovery-control-label {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #c9d1d6 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: var(--vh-surface);
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn {
    flex: none !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 7px 16px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--vh-muted) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn.is-plants.is-active {
    background: #25382a !important;
    color: #bfe8a8 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn.is-zombies.is-active {
    background: #2f2442 !important;
    color: #d6c4ff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}

/* Hero portraits: no box per hero */
html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-heroes {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px 8px !important;
    width: 100% !important;
    max-width: 1060px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    grid-template-columns: none !important;
    scroll-snap-type: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero {
    display: flex !important;
    flex: 0 0 88px !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 7px !important;
    width: 88px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 2px 4px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--vh-muted) !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
    cursor: pointer !important;
    transform: none !important;
    transition: color 0.15s ease !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero-thumb {
    display: block !important;
    width: 64px !important;
    height: 64px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 50% !important;
    filter: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero:hover {
    background: transparent !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero:hover .pvz-discovery-hero-thumb {
    transform: translateY(-3px) !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero.is-active {
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero.is-active .pvz-discovery-hero-thumb {
    box-shadow: 0 0 0 3px var(--vh-bg), 0 0 0 5px var(--vh-accent) !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}


/* ---------- 4. Guide + Daily Duel row (inside Discovery) ---------- */

html body #deckGrid .pvz-discovery-home > #ddTopRow {
    width: 100% !important;
    max-width: none !important;
    margin: 44px 0 0 !important;
}

html body #ddTopRow .featured-decks-link.is-visible {
    min-height: 70px !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
}

html body #ddTopRow .featured-guide-content strong {
    font-size: 15px !important;
}

html body #ddTopRow .featured-guide-content small {
    font-size: 13px !important;
}


/* ---------- 5. Featured deck ---------- */

html body #deckGrid.pvz-discovery-mode .pvz-featured-block {
    width: 100% !important;
    margin: 48px 0 0 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 0 0 14px;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-head h2 {
    margin: 0;
    color: var(--vh-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

/* Intent tabs: they choose what kind of deck is featured */
html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intents {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 3px !important;
    overflow: visible !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 10px !important;
    background: var(--vh-surface) !important;
    scroll-snap-type: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intent {
    flex: none !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--vh-muted) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    transform: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intent:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intent.is-active {
    background: rgba(0, 180, 216, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 180, 216, 0.42) !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-empty {
    margin: 0;
    padding: 44px 20px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    color: var(--vh-muted);
    font-size: 15px;
    text-align: center;
}

/* Card shell */
html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
    all: unset !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 230px minmax(0, 1fr) !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--vh-line) !important;
    border-radius: 20px !important;
    background: #191d22 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22) !important;
    color: var(--vh-text) !important;
    font-family: inherit !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck.plant-deck {
    background: var(--vh-plant-card) !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck.zombie-deck {
    background: var(--vh-zombie-card) !important;
}

/* Stage: the big hero moment */
html body #deckGrid.pvz-discovery-mode .pvz-featured-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 28px 20px;
    overflow: hidden;
    background: var(--vh-plant-stage);
}

html body #deckGrid.pvz-discovery-mode .zombie-deck .pvz-featured-stage {
    background: var(--vh-zombie-stage);
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage-disc {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--vh-plant-disc);
    transform: translate(-50%, -50%);
}

html body #deckGrid.pvz-discovery-mode .zombie-deck .pvz-featured-stage-disc {
    background: var(--vh-zombie-disc);
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-stack {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    overflow: visible !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: 150px !important;
    height: 150px !important;
    margin: 0 !important;
    overflow: visible !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45)) !important;
    transform: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
    width: 112px !important;
    height: 112px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art + .pvz-featured-hero-art {
    margin-left: -36px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art--unknown {
    color: var(--vh-muted) !important;
    font-size: 64px !important;
}

/* Main column */
html body #deckGrid.pvz-discovery-mode .pvz-featured-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    padding: 30px 32px 30px;
    box-sizing: border-box;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.pvz-featured-deck .pvz-featured-main .pvz-featured-banner {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    grid-template-columns: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-title {
    all: unset !important;
    display: block !important;
    max-width: 100% !important;
    color: var(--vh-text) !important;
    font-family: inherit !important;
    font-size: clamp(28px, 3.4vw, 42px) !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.01em !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    cursor: pointer !important;
    transition: color 0.15s ease !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-title:hover {
    color: var(--vh-accent) !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-title:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 4px !important;
    border-radius: 4px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    margin: 10px 0 0 !important;
    color: var(--vh-muted) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-featured-main .pvz-featured-copy > .pvz-deck-versions {
    margin-top: 10px !important;
}

/* Deck list */
html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-cards-wrap {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-cards-label {
    margin: 0 0 10px !important;
    color: var(--vh-dim) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-deck-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: end !important;
    gap: 14px 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card {
    flex: none !important;
    width: 100% !important;
    height: 140px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card img {
    width: 100% !important;
    max-width: 112px !important;
    height: 140px !important;
    max-height: 140px !important;
    object-fit: contain !important;
    object-position: center bottom !important;
}


/* ---------- 6. Grade + star cluster ----------
   The site's own treatment, larger: grade letter in a plain dark square,
   star with its count underneath (grey, gold once you've starred it). */

html body :is(#deckGrid, #funFactsView) .pvz-score {
    --s: 40px;
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
}

html body :is(#deckGrid, #funFactsView) .pvz-score--lg {
    --s: 52px;
    gap: 12px;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .pvz-score-grade {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--s);
    height: var(--s);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(14, 18, 21, 0.72);
    color: var(--pvz-grade, #ffffff);
    font-family: inherit;
    font-size: calc(var(--s) * 0.5);
    font-weight: 700;
    line-height: 1;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: auto !important;
    min-width: calc(var(--s) * 0.8) !important;
    max-width: none !important;
    height: var(--s) !important;
    min-height: var(--s) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 2px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #7f8a92 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transform: none !important;
    transition: color 0.15s ease !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star svg {
    position: static !important;
    display: block !important;
    flex: none !important;
    width: calc(var(--s) * 0.5) !important;
    height: calc(var(--s) * 0.5) !important;
    margin: 0 !important;
    overflow: visible !important;
    fill: currentColor !important;
    stroke: none !important;
    color: inherit !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star svg path {
    fill: currentColor !important;
    stroke: none !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star .deck-star-count {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: calc(var(--s) * 0.28) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    transform: none !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star .deck-star-count[hidden] {
    display: none !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star:hover {
    background: transparent !important;
    color: #c9d1d6 !important;
    transform: none !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star.starred,
html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star[aria-pressed="true"] {
    color: var(--vh-gold) !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}

html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star:disabled {
    cursor: progress !important;
    opacity: 0.7 !important;
}


/* ---------- 7. Popular decks ---------- */

html body #deckGrid.pvz-discovery-mode .pvz-discovery-section {
    margin: 0 !important;
    padding: 56px 0 0 !important;
    border-top: 0 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-section-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-section-head h2 {
    margin: 0 !important;
    color: var(--vh-text) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-section-head p {
    display: none !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-see-all {
    flex: none !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #c9d1d9 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-see-all:hover {
    border-color: rgba(0, 180, 216, 0.5) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
}

/* Card */
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card {
    all: unset !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: 14px 14px 13px !important;
    overflow: hidden !important;
    border: 1px solid var(--vh-line) !important;
    border-radius: 16px !important;
    background: var(--vh-surface) !important;
    box-shadow: none !important;
    color: var(--vh-text) !important;
    font-family: inherit !important;
    cursor: pointer !important;
    content-visibility: visible !important;
    contain: none !important;
    opacity: 1 !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
    animation: pvzPopularDeckReveal 320ms cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:nth-child(2) { animation-delay: 50ms !important; }
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:nth-child(3) { animation-delay: 100ms !important; }
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:nth-child(4) { animation-delay: 150ms !important; }
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:nth-child(5) { animation-delay: 200ms !important; }
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:nth-child(6) { animation-delay: 250ms !important; }

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:hover {
    border-color: rgba(0, 180, 216, 0.3) !important;
    background: var(--vh-surface-hover) !important;
    transform: translateY(-2px) !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}

/* Hero */
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-art {
    all: unset !important;
    position: relative !important;
    display: block !important;
    width: 84px !important;
    height: 84px !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-stack {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-art {
    position: relative !important;
    display: block !important;
    flex: none !important;
    width: 84px !important;
    height: 84px !important;
    margin: 0 !important;
    overflow: visible !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-stack.is-pair .pvz-discovery-hero-art {
    width: 60px !important;
    height: 60px !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-stack.is-pair .pvz-discovery-hero-art + .pvz-discovery-hero-art {
    margin-left: -24px !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-art img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)) !important;
    transform: none !important;
}

/* Copy */
html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-copy {
    all: unset !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    min-width: 0 !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-pop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-pop-titles {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 !important;
    color: var(--vh-text) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-submeta {
    display: flex !important;
    gap: 5px !important;
    min-width: 0 !important;
    margin: 4px 0 0 !important;
    overflow: hidden !important;
    color: var(--vh-muted) !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-submeta span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-notable-cards {
    display: flex !important;
    gap: 5px !important;
    width: auto !important;
    height: 52px !important;
    margin: 0 !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-notable-card {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 52px !important;
    transform: none !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: var(--vh-dim) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-bottom span {
    color: inherit !important;
}

/* Browse all: one quiet button under the list, same style as "See all" */
html body #deckGrid.pvz-discovery-mode .pvz-discovery-all-decks {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 56px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-all-decks .pvz-all-decks-link {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #c9d1d9 !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-all-decks .pvz-all-decks-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-discovery-all-decks .pvz-all-decks-link:focus-visible {
    outline: 2px solid var(--vh-accent) !important;
    outline-offset: 2px !important;
}


/* Even space around the button: 56px above it, and 56px below it to the
   footer line (page padding + footer margin) instead of an extra 64px */
@media (min-width: 769px) {
    html body #deckGrid.pvz-discovery-mode:has(> .pvz-discovery-home > .pvz-discovery-all-decks) {
        padding-bottom: 0 !important;
    }
}


/* ---------- 8. Footer ---------- */

.vault-footer {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vault-footer-inner {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 32px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 24px 40px;
    color: var(--vh-dim);
    font-size: 13.5px;
    line-height: 1.5;
}

.vault-footer-inner p {
    margin: 0;
}

.vault-footer-inner p.vault-footer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.vault-footer-discord {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vault-footer-discord img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
}

.vault-footer-discord strong {
    color: var(--vh-accent);
    font-weight: 600;
}


/* ---------- 9. Mobile ---------- */

@media (max-width: 900px) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage {
        min-height: 0;
        padding: 22px 20px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage-disc {
        width: 140px;
        height: 140px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
        width: 120px !important;
        height: 120px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
        width: 96px !important;
        height: 96px !important;
    }
}

@media (max-width: 768px) {
    /* Top bar: Updated on its own line, then the four tools */
    html body > header .vault-topbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 10px;
    }

    html body > header .vault-updated {
        padding: 2px 4px 0;
        font-size: 12.5px;
    }

    html body #vaultTopbar nav.tools-row {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px !important;
        width: 100% !important;
    }

    html body #vaultTopbar nav.tools-row > .tool-btn:not(.hidden),
    html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn {
        flex-direction: column !important;
        gap: 5px !important;
        width: 100% !important;
        height: 56px !important;
        min-height: 56px !important;
        padding: 0 2px !important;
        border-radius: 10px !important;
        font-size: 12px !important;
    }

    /* Caret becomes More's icon, sitting above the label like the others */
    html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn {
        flex-direction: column-reverse !important;
    }

    html body #vaultTopbar nav.tools-row .btn-icon {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        flex-basis: 20px !important;
    }

    html body #vaultTopbar nav.tools-row > #daveBtn .btn-icon.dave-icon {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        flex-basis: 26px !important;
        margin: -3px 0 !important;
    }

    html body #vaultTopbar nav.tools-row > .home-menu-more:not(.hidden) {
        display: flex !important;
        width: 100% !important;
    }

    html body #vaultTopbar nav.tools-row > #backBtn:not(.hidden) {
        grid-column: 1 / -1 !important;
        flex-direction: row !important;
        height: 46px !important;
        min-height: 46px !important;
        font-size: 14px !important;
    }

    /* Wordmark */
    html body > header .header-content {
        padding: 26px 10px 0 !important;
    }

    html body > header .header-content .site-title-row {
        gap: 10px !important;
    }

    html body > header .header-content .site-title-logo {
        width: 42px !important;
        height: 42px !important;
    }

    html body > header .header-content .site-title-row h1 {
        font-size: clamp(32px, 10vw, 42px) !important;
    }

    html body > header .header-content .header-meta-line {
        margin-top: 10px !important;
        font-size: 14.5px !important;
    }

    /* Two tidy centered lines instead of a dot dangling at a wrap */
    html body > header .header-content .header-meta-line .header-dot {
        display: none !important;
    }

    html body > header .header-content .header-meta-line .meta-decks,
    html body > header .header-content .header-meta-line .meta-players {
        display: block !important;
        width: 100% !important;
    }

    html body #searchWrapper.pvz-smart-search {
        width: 100% !important;
        margin-top: 20px !important;
    }

    /* Discovery */
    html body #deckGrid.pvz-discovery-mode {
        padding: 0 0 36px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls {
        gap: 12px !important;
        margin-top: 26px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-hero-picker-head .pvz-discovery-control-label {
        font-size: 15px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-faction-toggle .pvz-faction-btn {
        padding: 7px 14px !important;
        font-size: 13px !important;
    }

    /* Heroes become a swipeable row */
    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-heroes {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 2px !important;
        align-self: stretch !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 -10px !important;
        padding: 4px 10px 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x proximity !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-heroes::-webkit-scrollbar {
        display: none !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero {
        flex: 0 0 76px !important;
        width: 76px !important;
        font-size: 11px !important;
        scroll-snap-align: start !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero-thumb {
        width: 58px !important;
        height: 58px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero:hover .pvz-discovery-hero-thumb {
        transform: none !important;
    }

    /* No "Browse all" row on phones */
    html body #deckGrid.pvz-discovery-mode .pvz-discovery-home > .pvz-discovery-all-decks {
        display: none !important;
    }

    /* Featured */
    html body #deckGrid.pvz-discovery-mode .pvz-featured-block {
        margin-top: 32px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-head {
        gap: 10px;
        margin-bottom: 12px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-head h2 {
        font-size: 19px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intents {
        flex-wrap: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intents::-webkit-scrollbar {
        display: none !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-head .pvz-discovery-intent {
        flex: 1 0 auto !important;
        min-height: 36px !important;
        padding: 6px 12px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
        border-radius: 18px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage {
        padding: 14px 16px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage-disc {
        width: 112px;
        height: 112px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
        width: 96px !important;
        height: 96px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
        width: 80px !important;
        height: 80px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main {
        gap: 18px;
        padding: 18px 16px 18px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.pvz-featured-deck .pvz-featured-main .pvz-featured-banner {
        gap: 12px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-title {
        font-size: 25px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-meta {
        margin-top: 8px !important;
        font-size: 13.5px !important;
    }

    html body :is(#deckGrid, #funFactsView) .pvz-score--lg {
        --s: 46px;
        gap: 10px;
    }

    /* Whole deck visible: four columns of readable cards, no sideways scroll */
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-deck-list {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px 8px !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    /* Box matches the card art's shape (about 8:7), so there is no empty
       space above and below each card. Capped at the old 104px so tablets
       look the same as before. */
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 8 / 7;
        max-height: 104px;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card img {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 104px !important;
    }

    html body #searchWrapper.pvz-smart-search .pvz-smart-search-field {
        height: 52px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
    }

    html body #searchWrapper.pvz-smart-search #searchInput,
    html body #searchWrapper.pvz-smart-search .pvz-smart-search-highlight-text {
        height: 52px !important;
        line-height: 52px !important;
    }

    html body #searchWrapper.pvz-smart-search .pvz-smart-search-icon {
        left: 15px !important;
    }

    html body #searchWrapper.pvz-smart-search .pvz-smart-input-shell {
        left: 44px !important;
    }

    /* Popular: one clean column */
    html body #deckGrid.pvz-discovery-mode .pvz-discovery-section {
        padding-top: 36px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-discovery-section-head h2 {
        font-size: 19px !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card {
        grid-template-columns: 72px minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 12px !important;
        border-radius: 14px !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-discovery-row > .deck-card.pvz-pop-card:hover {
        transform: none !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-art,
    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-art {
        width: 72px !important;
        height: 72px !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-hero-stack.is-pair .pvz-discovery-hero-art {
        width: 52px !important;
        height: 52px !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-name {
        font-size: 15px !important;
    }

    html body :is(#deckGrid.pvz-discovery-mode, #funFactsView) .pvz-pop-card .pvz-discovery-deck-bottom span:last-child:not(:first-child) {
        display: inline !important;
    }

    html body :is(#deckGrid, #funFactsView) .pvz-score {
        --s: 38px;
    }

    /* Footer */
    .vault-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 14px 32px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    html body #vaultTopbar nav.tools-row > .tool-btn:not(.hidden),
    html body #vaultTopbar nav.tools-row > .home-menu-more > #moreBtn.tool-btn {
        font-size: 11px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card,
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card img {
        height: 92px !important;
        max-height: 92px !important;
    }

    html body :is(#deckGrid, #funFactsView) .pvz-score--lg {
        --s: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body #deckGrid.pvz-discovery-mode .pvz-discovery-row > .deck-card.pvz-pop-card {
        animation: none !important;
        transition: none !important;
    }

    html body :is(#deckGrid, #funFactsView) .pvz-score .deck-star-btn.pvz-score-star,
    html body #deckGrid.pvz-discovery-mode .pvz-discovery-controls .pvz-discovery-hero-thumb {
        transition: none !important;
    }
}


/* ============================================================
   FEATURED DECK V2
   Hero sits beside the title (no colored panel behind it);
   the deck list spans the full width underneath.
   ============================================================ */

html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
    grid-template-columns: auto minmax(0, 1fr) !important;
    column-gap: 24px !important;
    row-gap: 26px !important;
    padding: 28px 32px 30px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage,
html body #deckGrid.pvz-discovery-mode .zombie-deck .pvz-featured-stage {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: none;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage-disc {
    display: none;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
    width: 120px !important;
    height: 120px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)) !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
    width: 92px !important;
    height: 92px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art + .pvz-featured-hero-art {
    margin-left: -30px !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck > .pvz-featured-main {
    display: contents;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.pvz-featured-deck .pvz-featured-main .pvz-featured-banner {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    align-items: center !important;
}

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-cards-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
}

@media (max-width: 900px) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
        grid-template-columns: auto minmax(0, 1fr) !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage,
    html body #deckGrid.pvz-discovery-mode .zombie-deck .pvz-featured-stage {
        padding: 0;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
        width: 100px !important;
        height: 100px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
        width: 78px !important;
        height: 78px !important;
    }
}

@media (max-width: 768px) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-block > .pvz-featured-deck {
        column-gap: 14px !important;
        row-gap: 18px !important;
        padding: 16px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage,
    html body #deckGrid.pvz-discovery-mode .zombie-deck .pvz-featured-stage {
        align-self: start;
        padding: 0;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art {
        width: 72px !important;
        height: 72px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art {
        width: 56px !important;
        height: 56px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.is-pair .pvz-featured-stage .pvz-featured-hero-art + .pvz-featured-hero-art {
        margin-left: -20px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-deck.pvz-featured-deck .pvz-featured-main .pvz-featured-banner {
        align-self: start !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-title {
        font-size: 22px !important;
    }

    /* Creator and date on their own lines instead of a dot dangling at a wrap */
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        margin-top: 6px !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-meta span[aria-hidden="true"] {
        display: none !important;
    }
}


/* ============================================================
   FEATURED DECK — CARD HOVER
   The card's entrance animation owns the wrapper's transform,
   so the lift is applied to the image itself.
   ============================================================ */

html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card img {
    transform-origin: center bottom !important;
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

@media (hover: hover) and (pointer: fine) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card:hover {
        z-index: 2 !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card:hover img {
        transform: translateY(-5px) scale(1.07) !important;
        filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.5)) brightness(1.06) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card img {
        transition: none !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-main .pvz-featured-card:hover img {
        transform: none !important;
    }
}


/* ============================================================
   FEATURED DECK — HERO HOVER
   ============================================================ */

html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art img {
    transform-origin: center center !important;
    transition: transform 0.2s ease, filter 0.2s ease !important;
}

@media (hover: hover) and (pointer: fine) {
    /* With two heroes, the hovered one comes to the front */
    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art:hover {
        z-index: 2 !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art:hover img {
        transform: translateY(-4px) scale(1.06) !important;
        filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5)) brightness(1.06) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art img {
        transition: none !important;
    }

    html body #deckGrid.pvz-discovery-mode .pvz-featured-stage .pvz-featured-hero-art:hover img {
        transform: none !important;
    }
}


/* ============================================================
   SEARCH: NO MATCHING DECKS
   Plain text under the search, no card, glow or icon.
   ============================================================ */

html body #pvzSmartNoResults.pvz-smart-no-results {
    display: block !important;
    width: min(560px, calc(100% - 28px)) !important;
    min-height: 0 !important;
    margin: 48px auto 16px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    text-align: center !important;
}

html body #pvzSmartNoResults.pvz-smart-no-results[hidden] {
    display: none !important;
}

html body #pvzSmartNoResults.pvz-smart-no-results .pvz-smart-no-results-icon {
    display: none !important;
}

html body #pvzSmartNoResults.pvz-smart-no-results h3 {
    margin: 0 0 8px !important;
    color: var(--vh-text) !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
}

html body #pvzSmartNoResults.pvz-smart-no-results p {
    max-width: 460px !important;
    margin: 0 auto !important;
    color: var(--vh-muted) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

@media (max-width: 768px) {
    html body #pvzSmartNoResults.pvz-smart-no-results {
        width: 100% !important;
        margin-top: 32px !important;
    }

    html body #pvzSmartNoResults.pvz-smart-no-results h3 {
        font-size: 18px !important;
    }

    html body #pvzSmartNoResults.pvz-smart-no-results p {
        font-size: 14px !important;
    }
}

/* Don't push the search field down mid-typing: no guide banner in search results */
html body:has(#deckGrid.pvz-results-mode) > header .featured-decks-container {
    display: none !important;
}


/* ============================================================
   ART IN THE MORE MENU
   Old #artBtn rules (gradient, 56px height) target the ID, so the
   menu item needs ID-level selectors to look like its neighbours.
   ============================================================ */

html body #vaultTopbar .more-dropdown > #artBtn.more-item:not(.hidden) {
    display: flex !important;
    flex: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #c9d1d9 !important;
    font-family: inherit !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-align: left !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transform: none !important;
}

html body #vaultTopbar .more-dropdown > #artBtn.more-item:not(.hidden):hover {
    background: rgba(76, 175, 80, 0.12) !important;
    color: #ffffff !important;
    transform: none !important;
}

html body #vaultTopbar .more-dropdown > #artBtn.more-item .btn-icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
}


/* ============================================================
   LOADER CONVEYOR — SOFT EDGES
   The stage clips its cards with overflow:hidden, which showed as a
   hard vertical edge where cards enter and leave. Fading both ends
   lets cards dissolve in and out instead.
   ============================================================ */

html body main #deckView #loadingIndicator.pvz-vault-loader .pvz-vl-stage {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 24%,
        #000 76%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 24%,
        #000 76%,
        transparent 100%
    );
}

/* iOS Safari zooms in when a text field or dropdown with text smaller than
   16px is tapped. Keep every field at 16px on phones to prevent it. */
@media (max-width: 768px) {
    html body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="color"]),
    html body select,
    html body textarea {
        font-size: 16px !important;
    }

    /* style.css sets the deck builder's card search to 15px on phones */
    html body #crafterView #seedSearchInput {
        font-size: 16px !important;
    }

    /* The search overlay must keep identical text metrics to the field */
    html body #searchWrapper.pvz-smart-search #searchInput,
    html body #searchWrapper.pvz-smart-search .pvz-smart-search-highlight-text {
        font-size: 16px !important;
    }
}

/* ---------------------------------------------------------------
   50-star milestone: two overlapping stars.
   The back star is a copy of the front one, so it always matches
   the front star's state (outline, or gold when you starred it).
   --------------------------------------------------------------- */
html body :is(#deckGrid, #funFactsView) .deck-star-btn .pvz-star-stack {
    position: relative;
    display: block;
    flex: none;
    line-height: 0;
    margin-left: 7px;
}

html body :is(#deckGrid, #funFactsView) .deck-star-btn.pvz-star-milestone .pvz-star-stack.pvz-star-stack > svg {
    position: relative !important;
    z-index: 1;
}

/* A thin dark outline on the front star keeps the two shapes distinct */
html body :is(#deckGrid, #funFactsView) .deck-star-btn.pvz-star-milestone .pvz-star-stack.pvz-star-stack > svg:not(.pvz-star-twin) path {
    stroke: rgba(10, 14, 18, 0.85) !important;
    stroke-width: 2.6px !important;
    paint-order: stroke;
    stroke-linejoin: round;
}

html body :is(#deckGrid, #funFactsView) .deck-star-btn.pvz-star-milestone .pvz-star-stack.pvz-star-stack > svg.pvz-star-twin {
    position: absolute !important;
    z-index: 0;
    left: -42%;
    top: -14%;
    transform: scale(0.82);
    opacity: 0.7;
}