/* Khazana v8 round: flip-card decks with an animated flame for Trending. */
.fc8-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.fc8-tabs::-webkit-scrollbar { display: none; }
.fc8-t { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 650; }
.fc8-t svg { width: 16px; height: 16px; }
.fc8-t[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.fc8-t.hot[aria-selected="true"] { background: #1c1410; border-color: #1c1410; color: #ffd9b8; }

.fc8-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 46%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; scrollbar-width: none; }
.fc8-row::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { .fc8-row { grid-auto-columns: 200px; } }
.fc8 { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; perspective: 900px; }
.fc8-in { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; font: inherit; color: inherit; text-align: left; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.fc8.flip .fc8-in { transform: rotateY(180deg); }
.fc8-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--sh-1); -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.fc8-front { background: linear-gradient(160deg, var(--cs) 0%, var(--surface) 62%); }
.fc8-back { background: var(--surface); transform: rotateY(180deg); justify-content: center; }
.fc8-top { display: flex; align-items: center; justify-content: space-between; }
.fc8-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--ink-2); }
.fc8-n { font-size: 12px; font-weight: 700; color: var(--muted); }
.fc8-ic { width: 46px; height: 46px; margin-top: auto; border-radius: 14px; display: grid; place-items: center; font-size: 21px; font-weight: 800; background: var(--surface); color: var(--ct); box-shadow: var(--sh-1); }
.fc8-front b { font-size: 17px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
.fc8-front small, .fc8-back small { font-size: 12px; color: var(--muted); }
.fc8-hint { font-size: 11.5px; font-weight: 650; color: var(--faint); }
.fc8-back b { font-size: 15px; font-weight: 680; line-height: 1.35; }
.fc8-back .pill { align-self: flex-start; }
.fc8-sig { font-size: 12px; font-weight: 700; color: var(--brand-text); }
.fc8-acts { display: flex; gap: 6px; }
.fc8-acts .btn { flex: 1; justify-content: center; }

/* trending cards: warm glow and a flame that flickers */
.fc8.hot .fc8-front { border-color: color-mix(in srgb, #f97316 45%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, #f97316 18%, var(--surface)) 0%, var(--surface) 66%); }
.fc8.hot .fc8-tag { background: #1c1410; color: #ffd9b8; }
.fl8 { width: 16px; height: 16px; overflow: visible; transform-origin: 50% 90%; animation: fl8-dance 1.1s ease-in-out infinite; }
.fl8-o { fill: #f97316; }
.fl8-i { fill: #fde047; transform-origin: 50% 90%; animation: fl8-core .7s ease-in-out infinite alternate; }
.fc8.hot .fc8-tag .fl8 { filter: drop-shadow(0 0 3px rgba(249, 115, 22, .8)); }
@keyframes fl8-dance { 0%, 100% { transform: scale(1, 1) rotate(-2deg); } 35% { transform: scale(1.06, .94) rotate(3deg); } 70% { transform: scale(.95, 1.07) rotate(-3deg); } }
@keyframes fl8-core { from { transform: scaleY(.85); opacity: .85; } to { transform: scaleY(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fl8, .fl8-i { animation: none; } .fc8-in { transition: none; } }
