﻿/* SFG FNF World — holographic cards, rarities, foil/Chromatic, Sol's RNG odds pills, equipped glow, inspector, flip reveal, ticker */

/* ================= rarity tokens ================= */
.r-common { --rc: #9aa0b8; }
.r-uncommon { --rc: #22d43c; }
.r-rare { --rc: #12c8f0; }
.r-epic { --rc: #c24b99; }
.r-legendary { --rc: #ffc83d; }
.r-mythic { --rc: #ff4d6d; }
.r-secret { --rc: #00f5d4; }
@keyframes prism { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes auraPulse { 0%, 100% { box-shadow: 0 0 18px color-mix(in srgb, var(--rc) 55%, transparent), 0 0 0 0 color-mix(in srgb, var(--rc) 40%, transparent); } 50% { box-shadow: 0 0 42px var(--rc), 0 0 0 8px color-mix(in srgb, var(--rc) 0%, transparent); } }

/* ================= card ================= */
.fcard {
  --rc: #9aa0b8;
  position: relative; flex: none; width: 16em; aspect-ratio: 5 / 7; font-size: 13px;
  border-radius: 1em; padding: 0.17em;
  background: linear-gradient(155deg, var(--rc), color-mix(in srgb, var(--rc) 22%, #14131c) 45%, color-mix(in srgb, var(--rc) 70%, #14131c));
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 1.1em color-mix(in srgb, var(--rc) 30%, transparent);
  user-select: none; -webkit-user-select: none; text-align: left; color: var(--soft);
}
.fcard.tilting { transition: transform 0.08s linear, box-shadow 0.3s; box-shadow: 0 1.4em 3em rgba(5, 4, 20, 0.65), 0 0 2em color-mix(in srgb, var(--rc) 55%, transparent); z-index: 5; }
.fcard.can-inspect { cursor: pointer; }
.fcard.can-inspect:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 4px; }
.fcard.sz-xs { font-size: 8px; }
.fcard.sz-sm { font-size: 10.5px; }
.fcard.sz-md { font-size: 13px; }
.fcard.sz-lg { font-size: 18px; }
.fc-body {
  position: relative; height: 100%; border-radius: 0.85em; overflow: hidden;
  display: flex; flex-direction: column; padding: 0.6em 0.65em 0.5em;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--rc) 22%, #221f4d), #14131c 72%);
}
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 0.4em; }
.fc-mod { min-width: 0; font-size: 0.6em; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3em 0.7em; border-radius: 0.5em; background: rgba(57, 44, 255, 0.28); color: var(--blue-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-ovr { display: flex; flex-direction: column; align-items: center; line-height: 0.9; padding: 0.25em 0.45em; border-radius: 0.5em; background: rgba(0, 0, 0, 0.35); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.fc-ovr b { font-size: 1.15em; font-weight: 900; color: #fff; text-shadow: 0 0 0.5em var(--rc); }
.fc-ovr small { font-size: 0.45em; font-weight: 900; letter-spacing: 0.1em; color: var(--rc); }
.fc-stage { position: relative; flex: 1; min-height: 0; margin: 0.45em 0 0; border-radius: 0.65em; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); background: radial-gradient(72% 64% at 50% 62%, color-mix(in srgb, var(--rc) 45%, rgba(120,115,255,0.18)), transparent 74%), linear-gradient(180deg, #221f46, #131122); }
.fc-spot { position: absolute; left: 15%; right: 15%; top: -10%; height: 90%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); opacity: 0.5; filter: blur(4px); }
.fc-lanes { position: absolute; inset: 0; display: flex; justify-content: space-evenly; opacity: 0.22; }
.fc-lanes i { width: 2px; height: 100%; }
.fc-lanes i:nth-child(1) { background: linear-gradient(transparent, var(--left)); }
.fc-lanes i:nth-child(2) { background: linear-gradient(transparent, var(--down)); }
.fc-lanes i:nth-child(3) { background: linear-gradient(transparent, var(--up)); }
.fc-lanes i:nth-child(4) { background: linear-gradient(transparent, var(--right)); }
.fc-art { position: absolute; inset: 6% 6% 4%; width: 88%; height: 90%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rc) 32%, rgba(255,255,255,0.16))) drop-shadow(0 0.42em 0.65em rgba(0, 0, 0, 0.65)); transition: transform 0.4s; }
.fc-art.is-crest { inset: 12%; width: 76%; height: 76%; object-position: center; }
.fcard.tilting .fc-art { transform: translate(calc((var(--mx, 50%) - 50%) * -0.06), calc((var(--my, 50%) - 50%) * -0.04)) scale(1.04); }
.fc-rbadge { position: relative; z-index: 2; align-self: center; margin-top: -0.75em; padding: 0.2em 0.9em; border-radius: 999px; background: var(--rc); color: #14131c; font-size: 0.58em; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; box-shadow: 0 0 0.9em var(--rc); }
.fc-name { margin-top: 0.3em; font-size: 0.98em; font-weight: 900; color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.fc-sub { font-size: 0.6em; font-weight: 700; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.fc-stats { display: grid; gap: 0.2em; margin-top: 0.35em; }
.fc-stat { display: grid; grid-template-columns: 2.4em 1fr 2.4em; align-items: center; gap: 0.5em; font-size: 0.56em; font-weight: 800; }
.fc-stat span { color: var(--muted); letter-spacing: 0.06em; }
.fc-stat b { color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.fc-bar { height: 0.5em; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: inherit; }
.fc-stat:nth-child(1) .fc-bar i { background: var(--left); box-shadow: 0 0 6px var(--left); }
.fc-stat:nth-child(2) .fc-bar i { background: var(--down); box-shadow: 0 0 6px var(--down); }
.fc-stat:nth-child(3) .fc-bar i { background: var(--up); box-shadow: 0 0 6px var(--up); }
.fc-stat:nth-child(4) .fc-bar i { background: var(--right); box-shadow: 0 0 6px var(--right); }
.fc-foot { display: flex; align-items: center; gap: 0.5em; margin-top: 0.35em; font-size: 0.58em; font-weight: 900; min-height: 1.4em; }
.fc-own { padding: 0.1em 0.55em; border-radius: 0.4em; background: rgba(62, 224, 122, 0.16); color: var(--ok); }
.fc-star { color: var(--gold); text-shadow: 0 0 6px rgba(255, 200, 61, 0.8); }
.fc-miss { color: var(--muted); letter-spacing: 0.1em; }
.fc-no { margin-left: auto; color: rgba(167, 163, 214, 0.5); font-weight: 700; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* glare + foil overlays */
.fc-glare, .fc-foil { position: absolute; inset: 0.17em; border-radius: 0.85em; pointer-events: none; }
.fc-glare { background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.28), transparent 45%); opacity: 0; transition: opacity 0.3s; mix-blend-mode: overlay; }
.fcard.tilting .fc-glare { opacity: 1; }
.fc-foil {
  opacity: 0; mix-blend-mode: color-dodge; transition: opacity 0.3s;
  background:
    repeating-linear-gradient(115deg, rgba(255, 0, 132, 0.55) 0%, rgba(252, 164, 0, 0.55) 6%, rgba(255, 255, 0, 0.5) 12%, rgba(0, 255, 138, 0.5) 18%, rgba(0, 207, 255, 0.55) 24%, rgba(204, 76, 250, 0.55) 30%, rgba(255, 0, 132, 0.55) 36%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 6px);
  background-size: 300% 300%, auto;
  background-position: var(--mx, 50%) var(--my, 50%), 0 0;
}
.fcard.is-foil .fc-foil { opacity: 0.5; }
.fcard.is-foil:not(.tilting) .fc-foil { animation: foilShift 6s linear infinite; }
.fcard.is-foil.tilting .fc-foil { opacity: 0.7; }
@keyframes foilShift { 0% { background-position: 0% 50%, 0 0; } 100% { background-position: 300% 50%, 0 0; } }
.fcard.is-foil { box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 1.4em rgba(255, 200, 61, 0.45); }

/* flags */
.fc-flag { position: absolute; z-index: 4; top: -0.55em; padding: 0.25em 0.65em; border-radius: 0.5em; font-size: 0.62em; font-weight: 900; letter-spacing: 0.08em; box-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.5); }
.flag-new { left: -0.4em; background: #ff2d3d; color: #fff; transform: rotate(-8deg); animation: newPop 1.4s ease-in-out infinite; }
.flag-foil { right: -0.4em; background: linear-gradient(135deg, #fff3b0, #ffc83d 40%, #f0a91c 60%, #fff3b0); background-size: 200%; color: #2a1a00; transform: rotate(6deg); animation: prism 3s linear infinite; }
@keyframes newPop { 50% { transform: rotate(-8deg) scale(1.1); } }

/* rarity flavours */
.fcard.r-legendary .fc-body::after, .fcard.r-mythic .fc-body::after, .fcard.r-secret .fc-body::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%); background-size: 250% 100%;
  animation: sheen 3.8s ease-in-out infinite;
}
@keyframes sheen { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }
.fcard.r-mythic { animation: mythGlow 2.4s ease-in-out infinite; }
@keyframes mythGlow { 50% { box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 2.2em rgba(255, 77, 109, 0.7); } }
.fcard.r-secret { background: linear-gradient(120deg, #00f5d4, #392cff, #c24b99, #ffc83d, #00f5d4); background-size: 300% 100%; animation: prism 4s linear infinite; box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 2em rgba(0, 245, 212, 0.5); }
.fcard.r-secret .fc-rbadge, .fc-rbadge.r-secret { background: linear-gradient(90deg, #00f5d4, #392cff, #c24b99, #ffc83d, #00f5d4); background-size: 300% 100%; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); animation: prism 3s linear infinite; }
.fcard.r-secret .fc-body { background: radial-gradient(120% 70% at 50% 0%, rgba(0, 245, 212, 0.18), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgba(194, 75, 153, 0.22), transparent 60%), #14131c; }

/* missing (FNFDex) */
.fcard.is-missing { background: linear-gradient(155deg, rgba(167, 163, 214, 0.35), rgba(20, 19, 28, 0.9)); box-shadow: 0 0.6em 1.4em rgba(5, 4, 20, 0.45); animation: none; }
.fcard.is-missing .fc-art { filter: grayscale(0.88) brightness(0.68) contrast(1.06) drop-shadow(0 0 8px rgba(167, 163, 214, 0.28)); opacity: 0.85; }
.fcard.is-missing .fc-body { filter: saturate(0.25); }
.fcard.is-missing .fc-body::after { display: none; }
.fcard.is-missing:hover .fc-art { filter: grayscale(0.15) brightness(0.96) drop-shadow(0 0 10px rgba(255, 255, 255, 0.25)); opacity: 1; }
.dex-grid.reveal-missing .fcard.is-missing .fc-art { filter: none; opacity: 1; }
.dex-grid.reveal-missing .fcard.is-missing .fc-body { filter: none; }
.sleeve.filled { container-type: inline-size; }
.sleeve.filled .fcard { width: 100%; font-size: 6.25cqi; }

/* ================= inspector ================= */
.insp { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.insp-card { display: grid; place-items: center; padding: 10px; }
.insp-info { display: grid; gap: 10px; min-width: 0; }
.insp-info h3 { font-size: 28px; line-height: 1.1; }
.insp-rar { display: flex; align-items: center; font-size: 12px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rc); }
.insp-sub { color: var(--muted); font-weight: 700; margin-top: -6px; }
.insp-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--blue); background: rgba(57, 44, 255, 0.1); border-radius: 0 10px 10px 0; font-style: italic; font-weight: 600; color: var(--soft); }
.insp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.insp-stats div { text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(20, 19, 28, 0.55); border: 1px solid var(--line); }
.insp-stats small { display: block; font-size: 10px; font-weight: 900; letter-spacing: 0.1em; color: var(--muted); }
.insp-stats b { font-size: 18px; font-weight: 900; color: #fff; }
.insp-owned, .insp-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.insp-tags small { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
.insp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.insp-hint { flex-basis: 100%; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.insp-odds { display: flex; flex-wrap: wrap; gap: 8px; }
.insp-odds > span { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-radius: 12px; background: rgba(20, 19, 28, 0.6); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc) 14%, transparent); }
.insp-odds small { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.insp-odds b { font-family: 'Silkscreen', var(--font); font-weight: 700; font-size: 22px; line-height: 1.1; color: #fff; text-shadow: 0 0 12px var(--rc); letter-spacing: 0.02em; }
.insp-odds .io-chroma { border-color: rgba(255, 200, 61, 0.45); background: linear-gradient(135deg, rgba(255, 200, 61, 0.1), rgba(194, 75, 153, 0.12)); }
.insp-odds .io-chroma b { font-size: 17px; color: var(--gold); text-shadow: 0 0 12px rgba(255, 200, 61, 0.7); }
.insp-odds .io-chroma.owned { box-shadow: 0 0 16px rgba(255, 200, 61, 0.35); }
.insp-actions .is-eq-pill:disabled { opacity: 1; color: var(--ok); border-color: rgba(62, 224, 122, 0.55); background: rgba(62, 224, 122, 0.1); cursor: default; }

/* ================= Sol's RNG odds pill + equipped (cards) ================= */
.fc-odds {
  flex: none; margin-left: auto; padding: 0.32em 0.55em 0.28em; border-radius: 0.45em;
  font-family: 'Silkscreen', var(--font); font-size: 0.52em; font-weight: 700; line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
  color: #fff; background: rgba(0, 0, 0, 0.45); border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent);
  text-shadow: 0 0 0.5em var(--rc); box-shadow: 0 0 0.6em color-mix(in srgb, var(--rc) 30%, transparent);
}
.fc-odds.is-chroma { color: #2a1a00; text-shadow: none; border-color: rgba(255, 236, 160, 0.9); background: linear-gradient(135deg, #fff3b0, #ffc83d 40%, #f0a91c 60%, #fff3b0); background-size: 200%; animation: prism 3s linear infinite; box-shadow: 0 0 0.8em rgba(255, 200, 61, 0.6); }
.fc-top .fc-mod { flex: 1 1 auto; }
.fcard.sz-xs .fc-odds { display: none; }
.fcard.is-missing .fc-odds { opacity: 0.7; }
.fcard.is-equipped { outline: 0.16em solid var(--ok); outline-offset: 0.18em; box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 1.4em rgba(62, 224, 122, 0.55), 0 0 0.6em color-mix(in srgb, var(--rc) 40%, transparent); }
.fcard.is-equipped.is-foil { outline-color: var(--gold); box-shadow: 0 0.8em 2em rgba(5, 4, 20, 0.55), 0 0 1.6em rgba(255, 200, 61, 0.6); }
.fc-eq { padding: 0.1em 0.5em; border-radius: 0.4em; background: rgba(62, 224, 122, 0.18); color: var(--ok); box-shadow: 0 0 0.6em rgba(62, 224, 122, 0.35); }
.mini-card .mc-odds, .chip-odds, .tk-odds { font-family: 'Silkscreen', var(--font); font-style: normal; font-weight: 400; letter-spacing: 0.02em; white-space: nowrap; }
.mini-card .mc-odds { flex: none; margin-left: 2px; padding: 1px 6px; border-radius: 6px; font-size: 10px; background: rgba(0, 0, 0, 0.4); color: var(--rc); }
.mini-card .mc-odds.is-chroma { color: var(--gold); }
.mini-card.is-foil { box-shadow: 0 0 12px rgba(255, 200, 61, 0.4); }
.chip-odds { margin-left: 6px; font-size: 9.5px; opacity: 0.75; }
.tk-item .tk-odds { color: var(--rc, var(--gold)); font-size: 11px; }

/* ================= ticker ================= */
.ticker { display: flex; align-items: center; gap: 0; margin-bottom: 18px; border-radius: 12px; background: rgba(20, 19, 28, 0.6); border: 1px solid var(--line); overflow: hidden; height: 40px; }
.ticker-label { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 14px; background: linear-gradient(90deg, rgba(255, 45, 61, 0.3), rgba(255, 45, 61, 0.05)); font-size: 11px; font-weight: 900; letter-spacing: 0.16em; color: #fff; border-right: 1px solid var(--line); }
.ticker-viewport { flex: 1; overflow: hidden; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; align-items: center; padding-left: 14px; }
.ticker-track.run { animation: tick var(--dur, 40s) linear infinite; padding-left: 0; }
.ticker:hover .ticker-track.run { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.tk-seg { display: flex; align-items: center; flex: none; }
.tk-item { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--soft); }
.tk-item b { color: #fff; font-weight: 800; }
.tk-item em { font-style: normal; font-weight: 900; color: var(--rc, #fff); text-shadow: 0 0 8px color-mix(in srgb, var(--rc, #fff) 60%, transparent); }
.tk-item small { color: var(--muted); font-weight: 700; }
.tk-item .tk-foil { color: var(--gold); font-size: 11px; }
.tk-sep { color: var(--blue-bright); font-size: 9px; opacity: 0.6; }

/* ================= rewards & pity ================= */
.rewards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.reward-tile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); color: #fff; cursor: pointer; text-align: left; transition: 0.2s; }
.reward-tile:hover:not(:disabled) { border-color: var(--blue-bright); transform: translateY(-2px); }
.reward-tile.ready { border-color: rgba(255, 200, 61, 0.6); box-shadow: 0 0 22px rgba(255, 200, 61, 0.25); }
.reward-tile.ready .rt-ico { animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(-12deg) scale(1.1); } 90% { transform: rotate(12deg) scale(1.1); } }
.rt-ico { font-size: 28px; flex: none; }
.rt-txt { display: flex; flex-direction: column; line-height: 1.25; }
.rt-txt b { font-weight: 900; font-size: 15px; }
.rt-txt small { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.reward-tile.ready .rt-txt small { color: var(--gold); }
.pity-box { display: grid; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); grid-column: span 2; }
.pity-lab { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pity-lab b { color: #fff; font-variant-numeric: tabular-nums; }
.pity-bar { height: 8px; border-radius: 999px; background: rgba(20, 19, 28, 0.7); overflow: hidden; margin-top: 3px; }
.pity-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--rc); box-shadow: 0 0 10px var(--rc); transition: width 0.5s; }
.pity.hot .pity-bar i { animation: blink 0.9s infinite; }

/* ================= screen flash (RNG reveals) ================= */
@keyframes openShake { 20% { transform: translateX(-5px) rotate(-1deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.hint { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.rip-flash { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, #fff 0%, var(--flash, #fff) 25%, transparent 70%); mix-blend-mode: screen; }
.rip-flash.on { animation: flashAnim 0.75s ease-out; }
@keyframes flashAnim { 0% { opacity: 0; } 12% { opacity: 0.85; } 100% { opacity: 0; } }

/* ================= results / flip ================= */
.results { display: grid; gap: 20px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.results-head h3 { font-size: 22px; }
.results-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 10px 0; }
.results-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.flipper { --d: 0ms; perspective: 1100px; animation: dealIn 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; animation-delay: var(--d); }
@keyframes dealIn { from { opacity: 0; transform: translateY(60px) rotate(-6deg) scale(0.7); } }
.flip-inner { position: relative; transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1); }
.flipper.down .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back {
  position: absolute; inset: 0; transform: rotateY(180deg); border-radius: 13px; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(circle at 50% 40%, var(--indigo-glow), var(--ground-deep) 75%);
  border: 3px solid var(--rc);
  animation: auraPulse 1.5s ease-in-out infinite;
}
.flipper.r-secret .flip-back { border-image: linear-gradient(120deg, #00f5d4, #392cff, #c24b99, #ffc83d) 1; }
.cb-aura { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--rc) 70%, transparent), transparent 40%); animation: spin 2.6s linear infinite; opacity: 0.55; }
.cb-pattern { position: absolute; inset: 6px; border-radius: 9px; background: var(--ground-deep) repeating-linear-gradient(45deg, rgba(85, 74, 255, 0.12) 0 6px, transparent 6px 14px); border: 1px solid var(--line-2); }
.cb-logo { position: relative; width: 70px; filter: drop-shadow(0 0 14px var(--rc)); }
.cb-q { position: relative; font-size: 46px; font-weight: 900; color: #fff; text-shadow: 0 0 18px var(--rc); line-height: 1; }
.flip-back small { position: relative; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.flipper.down:hover .flip-inner { transform: rotateY(180deg) translateY(-6px) scale(1.02); }
.flipper.burst { position: relative; }
.flipper.burst::after { content: ""; position: absolute; inset: -30px; border-radius: 50%; border: 4px solid var(--rc); pointer-events: none; animation: ring 0.9s ease-out forwards; }
@keyframes ring { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(1.5); } }
.flipper.revealed.r-legendary .fcard, .flipper.revealed.r-mythic .fcard, .flipper.revealed.r-secret .fcard { animation-name: none; }

/* ================= eBook strip ================= */
.ebook-strip { display: flex; align-items: center; gap: 16px; margin: 8px; padding: 12px 18px; border-radius: 16px; text-decoration: none; color: var(--soft); background: linear-gradient(90deg, rgba(57, 44, 255, 0.2), rgba(28, 26, 56, 0.8) 60%); border: 1px solid var(--line-2); transition: 0.25s; }
.ebook-strip:hover { border-color: var(--blue-bright); box-shadow: 0 8px 30px rgba(57, 44, 255, 0.3); }
.ebook-strip img { width: 54px; border-radius: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); flex: none; }
.es-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.es-txt small { font-size: 10px; font-weight: 900; letter-spacing: 0.16em; color: var(--blue-txt); }
.es-txt b { color: #fff; font-weight: 900; }
.es-txt span { font-size: 13px; font-weight: 600; color: var(--muted); }
.ebook-strip .btn { margin-left: auto; flex: none; }

/* ================= responsive ================= */
@media (max-width: 900px) {
  .insp { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .insp-info { text-align: center; justify-items: center; }
  .insp-actions, .insp-owned, .insp-tags { justify-content: center; }
  .pity-box { grid-column: auto; }
}
@media (max-width: 720px) {
  .insp-odds { justify-content: center; }
  .fcard.sz-md { font-size: 11px; }
  .fcard.sz-lg { font-size: 14.5px; }
  .results-grid { gap: 12px; }
  .insp-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .insp-stats b { font-size: 15px; }
  .ebook-strip .es-txt span { display: none; }
}
@media (max-width: 420px) {
  .fcard.sz-md { font-size: 9.5px; }
}
