/* Loaded after app.css to make rarity colour treatment unambiguous in every shell.
   The #moduleBody scope intentionally outranks PL CHAT's generic button rule. */
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard[style*="--mini-card-background"] { background:var(--mini-card-background) !important; }
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.common {
  border-color:#f4bd82 !important;
  background:linear-gradient(150deg,#fff5df,#efb06a 48%,#a94f3f) !important;
  color:#4d241f !important;
}
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.rare {
  border-color:#e7b2ff !important;
  background:linear-gradient(150deg,#fff4ff,#d981e8 48%,#743b89) !important;
  color:#3f1c50 !important;
}
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.champion {
  border-color:#b5f0bb !important;
  background:linear-gradient(150deg,#f4fff0,#7fcf83 48%,#296345) !important;
  color:#173d2a !important;
}
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.legendary {
  border-color:#ffe58b !important;
  background:linear-gradient(150deg,#fff9d8,#edbd48 48%,#9d5c11) !important;
  color:#4d2c05 !important;
}

/* Click effects: each rarity has a distinct, readable celebration. */
#moduleBody .profileMiniCollectibleCard.card-click-effect { animation:miniFriendCardTap .48s cubic-bezier(.2,.85,.25,1) both; }
#moduleBody .profileMiniCardClickFx { position:absolute; z-index:9; inset:-20%; display:block; overflow:visible; pointer-events:none; }
#moduleBody .profileMiniCardClickFx::before { content:''; position:absolute; inset:20%; border:2px solid currentColor; border-radius:50%; opacity:0; }
#moduleBody .profileMiniCardClickFx i { position:absolute; left:50%; top:50%; color:currentColor; font-size:18px; font-style:normal; font-weight:900; line-height:1; opacity:0; text-shadow:0 0 8px currentColor; transform:translate(-50%,-50%); }
#moduleBody .profileMiniCardClickFx.common { color:#ffe6a4; }.profileMiniCardClickFx.common::before { animation:miniFriendCommonRing .58s ease-out both; }
#moduleBody .profileMiniCardClickFx.common i { animation:miniFriendCommonSpark .62s ease-out both; }
#moduleBody .profileMiniCardClickFx.rare { color:#fff0ff; }.profileMiniCardClickFx.rare::before { border-color:#ffd4fb; box-shadow:0 0 14px #f657dc,0 0 30px #a943d8; animation:miniFriendRareRing .82s cubic-bezier(.1,.8,.25,1) both; }
#moduleBody .profileMiniCardClickFx.rare i { color:#ffd5fa; animation:miniFriendRareHeart .82s cubic-bezier(.15,.8,.3,1) both; }
#moduleBody .profileMiniCardClickFx.champion { color:#e5ffe5; }.profileMiniCardClickFx.champion::before { border-color:#aaffb4; box-shadow:0 0 14px #62ef7b,0 0 28px #2ea953; animation:miniFriendChampionSeal .96s ease-out both; }
#moduleBody .profileMiniCardClickFx.champion i { color:#d9ffba; animation:miniFriendChampionBurst .9s cubic-bezier(.1,.8,.2,1) both; }
#moduleBody .profileMiniCardClickFx.legendary { color:#fff9c4; background:radial-gradient(circle at center,#fff7bcaa 0 5%,#ffd84d44 24%,transparent 57%); animation:miniFriendLegendAura 1.22s ease-out both; }.profileMiniCardClickFx.legendary::before { inset:11%; border:3px solid #fff2a7; box-shadow:0 0 16px #fff6bf,0 0 38px #ffbe31,0 0 64px #ff943c; animation:miniFriendLegendRing 1.18s cubic-bezier(.1,.75,.2,1) both; }.profileMiniCardClickFx.legendary::after { content:''; position:absolute; inset:-25%; background:conic-gradient(from 0deg,transparent 0 9%,#fff7c8 13%,transparent 18% 32%,#ffd235 38%,transparent 44% 60%,#fff0a6 67%,transparent 74%); mix-blend-mode:screen; animation:miniFriendLegendRay 1.16s ease-out both; }.profileMiniCardClickFx.legendary i { color:#fff6ba; font-size:23px; text-shadow:0 0 9px #fff,0 0 18px #ffba35; animation:miniFriendLegendStar 1.15s cubic-bezier(.1,.75,.2,1) both; }
#moduleBody .profileMiniCardClickFx i:nth-child(1){--x:-68px;--y:-51px;animation-delay:.02s}#moduleBody .profileMiniCardClickFx i:nth-child(2){--x:2px;--y:-75px;animation-delay:.07s}#moduleBody .profileMiniCardClickFx i:nth-child(3){--x:70px;--y:-44px;animation-delay:.12s}#moduleBody .profileMiniCardClickFx i:nth-child(4){--x:79px;--y:21px;animation-delay:.05s}#moduleBody .profileMiniCardClickFx i:nth-child(5){--x:42px;--y:72px;animation-delay:.14s}#moduleBody .profileMiniCardClickFx i:nth-child(6){--x:-39px;--y:75px;animation-delay:.1s}#moduleBody .profileMiniCardClickFx i:nth-child(7){--x:-78px;--y:34px;animation-delay:.16s}#moduleBody .profileMiniCardClickFx i:nth-child(8){--x:-22px;--y:-92px;animation-delay:.2s}#moduleBody .profileMiniCardClickFx i:nth-child(9){--x:85px;--y:-4px;animation-delay:.18s}
@keyframes miniFriendCardTap{0%{transform:scale(1)}28%{transform:translateY(-7px) scale(.94) rotate(-1.5deg)}64%{transform:translateY(-11px) scale(1.075) rotate(1deg)}100%{transform:translateY(-5px) scale(1) rotate(0)}}
@keyframes miniFriendCommonRing{0%{transform:scale(.18);opacity:.95}100%{transform:scale(1.38);opacity:0}}@keyframes miniFriendCommonSpark{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}28%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.2)}}
@keyframes miniFriendRareRing{0%{transform:scale(.08) rotate(0);opacity:1}62%{opacity:.92}100%{transform:scale(1.55) rotate(145deg);opacity:0}}@keyframes miniFriendRareHeart{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}32%{opacity:1;transform:translate(-50%,-50%) scale(1.45)}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(.72)}}
@keyframes miniFriendChampionSeal{0%{transform:scale(.15) rotate(0);opacity:1}48%{opacity:1}100%{transform:scale(1.5) rotate(-90deg);opacity:0}}@keyframes miniFriendChampionBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.15) rotate(-35deg)}25%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.35) rotate(35deg)}}
@keyframes miniFriendLegendAura{0%{opacity:0;transform:scale(.22)}35%{opacity:1}100%{opacity:0;transform:scale(1.72)}}@keyframes miniFriendLegendRing{0%{transform:scale(.08) rotate(0);opacity:1}55%{opacity:1}100%{transform:scale(1.72) rotate(210deg);opacity:0}}@keyframes miniFriendLegendRay{0%{opacity:0;transform:scale(.1) rotate(-35deg)}35%{opacity:1}100%{opacity:0;transform:scale(1.38) rotate(95deg)}}@keyframes miniFriendLegendStar{0%{opacity:0;transform:translate(-50%,-50%) scale(.12) rotate(-45deg)}27%{opacity:1;transform:translate(-50%,-50%) scale(1.6) rotate(45deg)}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(.65) rotate(180deg)}}

/* Full-card presentation: the collector can inspect artwork, power and owners clearly. */
#moduleBody .profileMiniCardDetail { position:fixed; z-index:90; inset:0; display:grid; place-items:center; padding:24px; overflow:auto; background:#140d2be8; backdrop-filter:blur(9px); animation:miniFriendCardDetailIn .26s ease-out both; }
#moduleBody .profileMiniCardDetailClose { position:fixed; z-index:3; top:18px; right:24px; display:grid; place-items:center; width:42px; height:42px; border:2px solid #fff8; border-radius:50%; background:#fff; color:#442459; font-size:30px; line-height:1; box-shadow:0 4px 22px #0007; }
#moduleBody .profileMiniCardDetailAura { position:absolute; width:min(630px,92vw); aspect-ratio:1; border-radius:50%; filter:blur(3px); opacity:.7; animation:miniFriendDetailAura 4s linear infinite; }
#moduleBody .profileMiniCardDetailAura.common { background:radial-gradient(circle,#ffdc8e99,transparent 68%); }.profileMiniCardDetailAura.rare { background:radial-gradient(circle,#ed9dffb0,transparent 68%); }.profileMiniCardDetailAura.champion { background:radial-gradient(circle,#8ff2a8b0,transparent 68%); }.profileMiniCardDetailAura.legendary { background:conic-gradient(from 0deg,#fff4ab,#eaa927,#fff5bb,#e09a20,#fff4ab); box-shadow:0 0 90px #ffc844; }
#moduleBody .profileMiniCardDetailFrame { position:relative; z-index:1; display:grid; width:min(388px,94vw); gap:10px; padding:15px; overflow:hidden; border:3px solid #fff8; border-radius:22px; box-shadow:inset 0 0 0 2px #ffffff66,0 25px 70px #000b; animation:miniFriendCardFlip .62s cubic-bezier(.15,.85,.25,1) both; }
#moduleBody .profileMiniCardDetailFrame.common { background:linear-gradient(145deg,#fff9ec,#e9a466,#944636); color:#4d241f; }.profileMiniCardDetailFrame.rare { background:linear-gradient(145deg,#fff3ff,#d57cdf,#69347e); color:#351545; }.profileMiniCardDetailFrame.champion { background:linear-gradient(145deg,#f7fff3,#79ca7b,#245c3c); color:#143824; }.profileMiniCardDetailFrame.legendary { background:linear-gradient(145deg,#fffde5,#f4c747 43%,#a15b0d); color:#4e2b04; box-shadow:inset 0 0 0 2px #fff7b6,0 0 48px #ffd35d,0 25px 70px #000b; }
#moduleBody .profileMiniCardDetailRarity { justify-self:center; padding:4px 10px; border:1px solid #fff9; border-radius:999px; background:#ffffff52; font-size:12px; font-weight:900; }.profileMiniCardDetailFrame h3 { margin:0; font-size:23px; text-align:center; }.profileMiniCardDetailFrame p { min-height:34px; margin:0; font-size:12px; text-align:center; }.profileMiniCardDetailFrame dl { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin:0; }.profileMiniCardDetailFrame dl div { padding:7px 4px; border:1px solid #ffffff77; border-radius:10px; background:#ffffff3d; text-align:center; }.profileMiniCardDetailFrame dt { font-size:10px; font-weight:900; }.profileMiniCardDetailFrame dd { margin:2px 0 0; font-size:16px; font-weight:900; }.profileMiniCardDetailFrame section { display:grid; gap:3px; padding:9px; border:1px solid #fff9; border-radius:11px; background:#ffffff3b; }.profileMiniCardDetailFrame section small,.profileMiniCardDetailFrame footer { font-size:11px; }.profileMiniCardDetailFrame footer { text-align:center; font-weight:800; }
#moduleBody .profileMiniCardFullArt { display:block; width:100%; height:340px; border:2px solid #fff9; border-radius:14px; object-fit:cover; object-position:center; background:#160d27; box-shadow:inset 0 0 24px #fff8,0 8px 18px #1c092e66; image-rendering:auto; }
@keyframes miniFriendCardDetailIn{from{opacity:0}to{opacity:1}}@keyframes miniFriendCardFlip{from{opacity:0;transform:perspective(900px) rotateY(-72deg) scale(.78)}to{opacity:1;transform:perspective(900px) rotateY(0) scale(1)}}@keyframes miniFriendDetailAura{to{transform:rotate(360deg)}}

#moduleBody .profileMiniCardDetailSupport { padding:8px 10px; border:1px solid #fff8; border-radius:10px; background:#ffffffbf; color:#4f2766; font-weight:900; }
#moduleBody .profileMiniCardBattle { display:grid; gap:8px; margin:10px 0; padding:10px; border:1px solid #ffe38e; border-radius:13px; background:radial-gradient(circle at 5% 10%,#fae98f45,transparent 30%),linear-gradient(135deg,#30205c,#684180); color:#fff8e3; box-shadow:inset 0 0 28px #a87cff33; }
#moduleBody .profileMiniCardBattle header { display:flex; align-items:center; justify-content:space-between; gap:10px; }#moduleBody .profileMiniCardBattle header div { display:grid; gap:2px; }#moduleBody .profileMiniCardBattle header small { color:#e9dfff; font-size:10px; }#moduleBody .profileMiniCardBattle header strong { padding:4px 7px; border:1px solid #fff3b0; border-radius:999px; color:#fff0a5; font-size:11px; }
#moduleBody .profileMiniBattleDeck { display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding:7px; border:1px solid #ffffff4d; border-radius:9px; background:#120b3c66; font-size:10px; }#moduleBody .profileMiniBattleDeck > b { color:#ffec9c; }#moduleBody .profileMiniBattleDeck span { padding:3px 5px; border-radius:6px; background:#ffffff21; }#moduleBody .profileMiniBattleDeck .support { border:1px dashed #a7f0e0; color:#d8fff7; }
#moduleBody .profileMiniBattleMaps { display:grid; grid-template-columns:repeat(3,minmax(120px,1fr)); gap:6px; }#moduleBody .profileMiniBattleMaps button { display:grid; gap:3px; padding:8px; border:1px solid #ffffff58; border-radius:9px; background:linear-gradient(145deg,#fff9d948,#d699e128); color:#fff8df; text-align:left; }#moduleBody .profileMiniBattleMaps button:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 0 14px #ffdc6f99; }#moduleBody .profileMiniBattleMaps small { font-size:10px; color:#ece2ff; }#moduleBody .profileMiniBattleMaps em { color:#ffed9b; font-size:10px; font-style:normal; }
#moduleBody .profileMiniBattleResult { display:grid; grid-template-columns:auto 1fr; gap:4px 9px; align-items:center; padding:8px; border:1px solid #ffffff66; border-radius:9px; background:#0c082d77; font-size:11px; }#moduleBody .profileMiniBattleResult.win { border-color:#a7ffbc; box-shadow:0 0 16px #75e99377; }#moduleBody .profileMiniBattleResult.lose { border-color:#ffc0bf; }#moduleBody .profileMiniBattleResult i { font-size:10px; font-style:normal; color:#fff1bd; }
@media(max-width:650px){#moduleBody .profileMiniBattleMaps{grid-template-columns:1fr}#moduleBody .profileMiniCardFullArt{height:260px}}
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.common small,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.common em,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.common i,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.common u { color:#fff8e8 !important; text-shadow:0 1px 2px #6e2d25; }
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.rare small,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.rare em,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.rare i,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.rare u { color:#fff5ff !important; text-shadow:0 1px 2px #49205d; }
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.champion small,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.champion em,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.champion i,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.champion u { color:#f3ffeb !important; text-shadow:0 1px 2px #204d34; }
#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.legendary small,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.legendary em,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.legendary i,#moduleBody .profileMiniCardAlbum .profileMiniCollectibleCard.legendary u { color:#fff7d0 !important; text-shadow:0 1px 2px #70410b; }

/* Turn-based card combat: HP always stays visible and the chosen command feels physical. */
#moduleBody .profileMiniTurnCombat { display:grid; gap:9px; margin:10px 0; padding:12px; border:2px solid #f7d77b; border-radius:14px; background:radial-gradient(circle at 83% 8%,#ffdb7c55,transparent 25%),linear-gradient(135deg,#251643,#5b315f); color:#fff8e7; box-shadow:inset 0 0 30px #d7a7ff22,0 8px 24px #27104a33; animation:miniFriendCombatEnter .35s ease-out both; }
#moduleBody .profileMiniTurnCombat header { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:5px 10px; } #moduleBody .profileMiniTurnCombat header b { font-size:16px; } #moduleBody .profileMiniTurnCombat header small { color:#ffecb2; }
#moduleBody .profileMiniCombatBars { display:grid; gap:7px; } #moduleBody .profileMiniCombatBars span { display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:7px; font-size:11px; font-weight:900; } #moduleBody .profileMiniCombatBars i { display:block; height:11px; overflow:hidden; border-radius:999px; background:linear-gradient(90deg,#70efb2,#caff98); box-shadow:0 0 8px #6dffb8; transition:width .35s ease; } #moduleBody .profileMiniCombatBars span:nth-child(2) i { background:linear-gradient(90deg,#ff6d7b,#ffce7a); box-shadow:0 0 8px #ff737d; }
#moduleBody .profileMiniCombatMoves { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; } #moduleBody .profileMiniCombatMoves button { min-height:42px; border:1px solid #fff9; border-radius:10px; background:linear-gradient(160deg,#ffffff3b,#a95ddd66); color:#fff; font-weight:900; text-shadow:0 1px 2px #301444; transition:transform .18s,filter .18s,box-shadow .18s; } #moduleBody .profileMiniCombatMoves button:hover:not(:disabled) { transform:translateY(-3px) scale(1.03); filter:brightness(1.18); box-shadow:0 0 16px #ffe184aa; } #moduleBody .profileMiniTurnCombat ol { max-height:96px; margin:0; padding:7px 7px 7px 25px; overflow:auto; border-radius:9px; background:#0d062d77; font-size:11px; } #moduleBody .profileMiniTurnCombat li { margin:2px 0; }
@keyframes miniFriendCombatEnter { from { opacity:0; transform:translateY(12px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media(max-width:650px){#moduleBody .profileMiniCombatMoves{grid-template-columns:repeat(2,1fr)}}
#moduleBody .profileMiniBattleSummary { display:grid; grid-template-columns:1fr auto; gap:10px; margin:10px 0; padding:10px; border:1px solid #d5b4ff; border-radius:12px; background:linear-gradient(135deg,#fff8ff,#f2eaff); color:#482661; } #moduleBody .profileMiniBattleSummary div { display:grid; gap:3px; } #moduleBody .profileMiniBattleSummary span { font-size:11px; } #moduleBody .profileMiniBattleSummary ol { min-width:155px; margin:0; padding:4px 4px 4px 23px; border-radius:8px; background:#ffffffaa; font-size:11px; } #moduleBody .profileMiniBattleSummary li { margin:2px 0; } #moduleBody .profileMiniCombatStatus { padding:4px 7px; border:1px solid #fff3a6; border-radius:999px; background:#fff8c63d; color:#fff5bf; font-size:10px; font-weight:900; animation:miniFriendStatusPulse 1.3s ease-in-out infinite; } @keyframes miniFriendStatusPulse{50%{filter:brightness(1.35);transform:scale(1.03)}}

/* Deck profiles make strategic switching explicit without hiding the live deck. */
#moduleBody .profileMiniDeckPresets { display:grid; gap:7px; margin:10px 0; padding:10px; border:1px solid #80d9d3; border-radius:13px; background:linear-gradient(135deg,#effffe,#dff5ff); color:#18495b; }
#moduleBody .profileMiniDeckPresets header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; } #moduleBody .profileMiniDeckPresets header small { font-size:10px; color:#437485; }
#moduleBody .profileMiniDeckPresets > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
#moduleBody .profileMiniDeckPresets article { display:grid; grid-template-columns:1fr auto; gap:4px; padding:8px; border:1px solid #92c7d4; border-radius:10px; background:#fff; } #moduleBody .profileMiniDeckPresets article.saved { border-color:#d3a2ec; background:linear-gradient(135deg,#fff8ff,#f5e7ff); } #moduleBody .profileMiniDeckPresets article small { grid-column:1/-1; color:#537381; font-size:10px; } #moduleBody .profileMiniDeckPresets button { padding:5px 7px; border:0; border-radius:7px; background:#197c99; color:#fff; font-size:10px; font-weight:900; } #moduleBody .profileMiniDeckPresets button:disabled { background:#a5bac2; }
@media(max-width:650px){#moduleBody .profileMiniDeckPresets > div{grid-template-columns:1fr}}

#moduleBody .profileMiniCampaign { display:grid; gap:8px; margin:10px 0; padding:11px; border:1px solid #f1c560; border-radius:14px; background:radial-gradient(circle at 93% 5%,#fff1ae88,transparent 26%),linear-gradient(135deg,#fff9e7,#f8e2ac); color:#69410e; }
#moduleBody .profileMiniCampaign header { display:flex; align-items:center; justify-content:space-between; gap:8px; } #moduleBody .profileMiniCampaign header div { display:grid; gap:2px; } #moduleBody .profileMiniCampaign header small { font-size:10px; color:#886632; }
#moduleBody .profileMiniCampaign header > button,#moduleBody .profileMiniCampaign article button { border:0; border-radius:8px; background:#ae6d13; color:#fffbe8; padding:6px 9px; font-size:10px; font-weight:900; box-shadow:0 3px 8px #86551644; } #moduleBody .profileMiniCampaign button:disabled { background:#c9b998; color:#fff; box-shadow:none; }
#moduleBody .profileMiniCampaign > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; } #moduleBody .profileMiniCampaign article { display:grid; gap:4px; padding:8px; border:1px dashed #cf9d3d; border-radius:9px; background:#fffdf4; } #moduleBody .profileMiniCampaign article.cleared { border-style:solid; border-color:#7ecb83; background:#f0fff0; } #moduleBody .profileMiniCampaign article small { min-height:25px; color:#826534; font-size:10px; }
@media(max-width:650px){#moduleBody .profileMiniCampaign > div{grid-template-columns:1fr}}
