/* Fugui catalog and favorites only. Site-specific card styling. */
html body [data-fg-cards]:not(.list-view) .number-card:not(.favorite-unavailable) { border-radius:16px !important; box-shadow:0 2px 8px rgba(30,65,48,.035) !important; display:flex; flex-direction:column; }
html body [data-fg-cards]:not(.list-view) .number-card-top { padding:14px 16px 4px !important; flex:1; }
html body [data-fg-cards] .number-summary { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
html body [data-fg-cards] .number-type { order:0; }
html body [data-fg-cards] .number-level { order:1; }
html body [data-fg-cards] .number-pattern { order:2; }
html body [data-fg-cards]:not(.list-view) .number-card:not(.favorite-unavailable) .number-card-bottom { box-sizing:border-box; min-height:56px; padding:6px 60px 6px 16px !important; display:flex; align-items:center; }
html body [data-fg-cards]:not(.list-view) .number-card .favorite { box-sizing:border-box; position:absolute; top:auto; right:8px !important; bottom:6px !important; width:44px; height:44px; padding:0; display:grid; place-items:center; transform:none; z-index:3; }
html body [data-fg-cards] .favorite.active { color:#167568; background:#e7f3ef; }
html body [data-fg-cards] .favorite.active svg { fill:currentColor; }
@media(max-width:540px) {
 html body [data-fg-cards]:not(.list-view) .number-card-top { padding:12px 10px 4px !important; }
 html body [data-fg-cards]:not(.list-view) .number-card:not(.favorite-unavailable) .number-card-bottom { padding-left:10px !important; padding-right:54px !important; }
 html body [data-fg-cards]:not(.list-view) .number-card .favorite { right:4px !important; }
 html body [data-fg-cards] .number-summary { gap:5px 6px; }
}

/* Home cards use the same bottom action row as the catalog. */
html body .qingya-number-grid[data-fg-cards] .number-card .favorite { position:absolute !important; top:auto !important; left:auto !important; width:44px !important; height:44px !important; padding:0 !important; }
html body .qingya-number-grid[data-fg-cards] .number-card { min-height:0 !important; }
html body .qingya-number-grid[data-fg-cards] .number-header { position:static; }

/* Type badges: readable, consistent labels across card grids. */
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge { min-width:26px!important; width:auto!important; height:22px!important; padding:1px 6px!important; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; border-radius:6px!important; font-size:11px!important; line-height:1.5!important; font-weight:700!important; border:0!important; box-shadow:none!important; text-shadow:none!important; white-space:nowrap; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-blue { background:#eef1f3!important; color:#4b5563!important; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-featured { background:#e2f2eb!important; color:#146c5c!important; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-gold { background:#fff1cf!important; color:#805510!important; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-black-gold { background:#30343b!important; color:#f3d58b!important; }

html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-colorful { background:linear-gradient(135deg,#362760,#17132f)!important; color:#f6e3ab!important; box-shadow:inset 0 0 0 1px #79649e,inset 0 1px 1px rgba(255,255,255,.22)!important; animation:none; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-colorful::after { content:none!important; display:none!important; animation:none!important; }
html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-colorful .fg-iridescent-text { display:inline-block; line-height:1.3; color:#f6e3ab; }
@supports ((background-clip:text) or (-webkit-background-clip:text)) {
 html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-colorful .fg-iridescent-text { background-image:linear-gradient(115deg,#ffe5a1 0%,#f6c4ff 24%,#a4e7ff 48%,#f6c4ff 72%,#ffe5a1 100%); background-size:150% 100%; background-clip:text; -webkit-background-clip:text; color:transparent; -webkit-text-fill-color:transparent; animation:fg-iridescent-flow 5s ease-in-out infinite alternate; }
}
@keyframes fg-iridescent-flow { from { background-position:0% 50%; } to { background-position:100% 50%; } }
@media(prefers-reduced-motion:reduce) { html body :is(.number-card .number-type, .fg-detail-ui .detail-type-badge).badge-colorful .fg-iridescent-text { animation:none; background-position:50% 50%; } }
