/* =========================================================
   🃏 RUFUS CARDS - the Card House, packs and collectible cards.
   Every class starts with rc- so nothing here can clash with app.css.
   Buttons (.btn) and panels (.panel) are the game's own, so it all feels like one game.

   The same 60-frames rules as the rest of the game: no backdrop-filter, only transform and
   opacity move, and big grids stay still. Only cards marked .rc-live shimmer, and html.lite
   (slow devices) and reduced-motion turn even that off.
   ========================================================= */
:root {
  --rc-cream: #fff7ec; --rc-ink: #2b1d52; --rc-ink-2: #66588c; --rc-good: #5fe3ad;
  --rc-common: #7a6aa6; --rc-rare: #1f7fd6; --rc-epic: #a632d6; --rc-divine: #d99a00;
}
.panel.rc-house { max-width: 1120px; }
.rc-h { font-family: var(--display); font-weight: 400; font-size: clamp(25px, 3.4vw, 32px); line-height: 1.1; margin: 0; text-wrap: balance; }
.rc-h.big { font-size: clamp(30px, 5vw, 46px); }
.rc-h:focus { outline: none; }
.rc-hh { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.15; margin: 0; }
.rc-lede { color: var(--muted); margin: 5px 0 0; font-size: 15px; line-height: 1.4; }
.rc-tiny { font-size: 13.5px; color: var(--rc-ink-2); margin: 0; line-height: 1.35; }
.rc-tiny.on-sky { color: var(--muted); }
.rc-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.rc-head > div { min-width: 0; }
.rc-btns { display: flex; flex-wrap: wrap; gap: 12px; }
#cardsRoot :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- coins ---------- */
.rc-coin { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff1a8, #ffd23f 55%, #e39a1a); box-shadow: inset 0 0 0 2px #b9730f; }
.rc-coin .sprite { width: 15px; height: 15px; display: block; }
.rc-coin.big { width: 44px; height: 44px; }
.rc-coin.big .sprite { width: 26px; height: 26px; }
.rc-wallet { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 13px 0 7px; border-radius: 999px; border: 1px solid rgba(255, 210, 63, .5); background: var(--glass-2); color: var(--ink); cursor: pointer; font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; transition: transform .15s; }
.rc-wallet:hover { transform: translateY(-2px); }
.rc-price { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-weight: 900; }
.rc-hud { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.rc-hud b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.rc-hud small { font-size: 11px; max-width: 76px; line-height: 1.2; color: var(--ink-2); }
.rc-hud.bump b { animation: bump .5s ease; }
.rc-final { display: flex; align-items: center; justify-content: center; gap: 12px; width: fit-content; max-width: 100%; margin: 14px auto 0; padding: 12px 20px; border-radius: 20px; text-align: left; background: rgba(255, 210, 63, .1); border: 1px solid rgba(255, 210, 63, .4); }
.rc-final-txt b { display: block; font-family: var(--display); font-weight: 400; font-size: 23px; color: var(--gold); line-height: 1.1; }
.rc-final-txt small { color: var(--ink-2); font-size: 14px; font-weight: 700; }

/* ---------- a card ---------- */
.rc-cq { display: block; width: 100%; container-type: inline-size; }
.rc-card { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 6cqw; background: var(--rc-cream); color: var(--rc-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .38); text-align: left; line-height: 1.2; }
.rc-frame { position: absolute; inset: 0; display: block; overflow: hidden; }
.rc-face { position: absolute; inset: 3.4cqw; display: flex; flex-direction: column; border-radius: 4.2cqw; overflow: hidden; background: var(--rc-cream); }
.rc-art { position: relative; display: block; flex: 1; min-height: 0; overflow: hidden; background: #c9b8ff; }
.rc-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rc-spr { position: absolute; display: block; height: auto; }
.rc-pole { position: absolute; top: 5%; height: 76%; width: 2.2%; background: #6b4423; box-shadow: 0 0 0 .5px #3d2614; display: block; }
.rc-held { position: absolute; top: 6%; left: 32.5%; width: 56%; aspect-ratio: 4 / 3; object-fit: cover; display: block; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.rc-poster { position: absolute; left: 6%; top: 5%; width: 88%; height: 72%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 1.6%; padding: 2.4%; background: var(--rc-cream); box-shadow: 0 0 0 1.2cqw #7a4a24, 0 3px 6px rgba(0, 0, 0, .4); }
.rc-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-name { display: block; font-family: var(--display); font-size: max(13px, 9.2cqw); line-height: 1.08; padding: 3cqw 4cqw 0; }
.rc-rar { display: flex; align-items: center; gap: 2cqw; font-size: max(10.5px, 5.4cqw); font-weight: 900; letter-spacing: .03em; padding: .8cqw 4cqw 3cqw; line-height: 1.2; }
.rc-gems { letter-spacing: .06em; }
.rc-common .rc-frame { background: var(--rc-common); }
.rc-common .rc-rar { color: var(--rc-common); }
.rc-rare .rc-frame { background: repeating-linear-gradient(45deg, var(--rc-rare) 0 6cqw, #5db2f5 6cqw 12cqw); }
.rc-rare .rc-rar { color: var(--rc-rare); }
.rc-epic .rc-frame { background: linear-gradient(150deg, #e04fd0, var(--rc-epic) 45%, #5a23c9); }
.rc-epic .rc-face { box-shadow: 0 0 0 1cqw rgba(255, 255, 255, .55); }
.rc-epic .rc-rar { color: var(--rc-epic); }
.rc-divine .rc-frame { background: linear-gradient(150deg, #fff0a6, #ffd23f 40%, #d99a00 72%, #ffe88c); }
.rc-divine .rc-face { background: #fff4cc; box-shadow: 0 0 0 1cqw #fff; }
.rc-divine .rc-rar { color: #8a6000; }
.rc-legendary .rc-frame { background: conic-gradient(#ff5f7e, #ffd23f, #5fe3ad, #4cc3ff, #a57bff, #ff5f7e); }
.rc-legendary .rc-face { background: linear-gradient(170deg, #1d1250, #351a82); color: var(--rc-cream); box-shadow: 0 0 0 1cqw var(--gold); }
.rc-legendary .rc-rar { color: var(--gold); }
.rc-plain .rc-frame { background: repeating-linear-gradient(135deg, #b9b0d6 0 4cqw, #e7e1f4 4cqw 8cqw); }
.rc-plain .rc-rar { color: var(--rc-ink-2); }
.rc-ribbon { position: relative; z-index: 3; display: block; text-align: center; font-family: var(--pixel, "Press Start 2P", monospace); font-size: max(7.5px, 4.2cqw); line-height: 1; padding: 2.6cqw 1cqw; color: #2e1a00; background: linear-gradient(90deg, #ffe88c, #ffd23f, #ffe88c); }
/* the shimmer: only on .rc-live, a few cards at a time */
.rc-live.rc-divine .rc-art::after, .rc-live.rc-legendary .rc-art::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -60%; width: 50%; transform: translateX(-30%) rotate(14deg); animation: rcSheen 5s ease-in-out infinite; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); pointer-events: none; z-index: 2; }
.rc-live.rc-legendary .rc-frame::before { content: ""; position: absolute; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; margin: -100% 0 0 -100%; background: conic-gradient(#ff5f7e, #ffd23f, #5fe3ad, #4cc3ff, #a57bff, #ff5f7e); animation: rcSpin 7s linear infinite; will-change: transform; }
@keyframes rcSpin { to { transform: rotate(360deg); } }
@keyframes rcSheen { 0%, 52% { transform: translateX(-30%) rotate(14deg); } 100% { transform: translateX(380%) rotate(14deg); } }
/* stamps: your earned stickers, stuck on the art */
.rc-stamps { position: absolute; right: 2.4cqw; bottom: 2.4cqw; display: flex; gap: 1.6cqw; z-index: 4; }
.rc-stamp { display: grid; place-items: center; width: 14cqw; height: 16.5cqw; background: #fffdf7; border: max(1px, .6cqw) dotted #b6a7d4; border-radius: 1px; font-size: 8.6cqw; line-height: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .45); font-style: normal; }
.rc-stamp:nth-child(odd) { transform: rotate(-4deg); }
.rc-stamp:nth-child(even) { transform: rotate(3deg); }
/* small cards are art only: the name and rarity sit beside them */
.rc-thumb { display: inline-block; width: 46px; flex: none; vertical-align: middle; }
.rc-thumb .rc-name, .rc-thumb .rc-rar, .rc-thumb .rc-ribbon, .rc-thumb .rc-stamps { display: none; }
.rc-thumb .rc-card { border-radius: 7px; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
.pcard .rc-thumb { display: block; width: 58px; margin: 0 auto 8px; }
.pod .rc-thumb { width: 54px; }
.hrow.rc-has-card { grid-template-columns: 46px 44px 36px 1fr auto; }
.hrow .rc-thumb { width: 36px; }
.hrow .n .sticker { --sz: 15px; margin-left: 5px; }
.srow .rc-thumb { width: 22px; margin-right: 6px; }

/* ---------- the house ---------- */
.rc-intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 20px; align-items: center; margin-bottom: 22px; }
.rc-intro .eyebrow { margin-bottom: 6px; }
.rc-counts { display: flex; gap: 10px; }
.rc-count { flex: none; padding: 10px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .25); text-align: center; }
.rc-count b { font-family: var(--display); font-weight: 400; font-size: 26px; display: block; color: var(--gold); line-height: 1.1; }
.rc-count small { color: var(--muted); font-size: 12.5px; }
.rc-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 14px 10px 18px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 210, 63, .12); border: 1px solid rgba(255, 210, 63, .45); font-weight: 900; }
.rc-building { position: relative; padding: 45px 18px 18px; margin-top: 42px; border: 3px solid #875080; border-radius: 28px 28px 12px 12px; background: linear-gradient(#39234c, #201532); box-shadow: 0 10px 0 #100b20; }
.rc-roof { position: absolute; left: 12%; right: 12%; top: -30px; height: 65px; background: linear-gradient(155deg, #9e567e, #5e3264); clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); border-bottom: 6px solid #d4978c; }
.rc-sign { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); background: #24172f; color: #ffe9be; border: 3px solid #b3798c; padding: 4px 22px; border-radius: 9px; font: 400 20px var(--display); white-space: nowrap; }
.rc-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rc-room { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 17px 12px; border: 2px solid #6a4d7f; border-radius: 70px 70px 12px 12px; background: radial-gradient(ellipse at 50% 25%, #60496d, #231832 78%); color: var(--ink); cursor: pointer; transition: transform .2s; }
.rc-room:hover { transform: translateY(-4px); }
.rc-room[aria-pressed="true"] { border-color: var(--fox-accent, #ff8a1f); background: radial-gradient(ellipse at 50% 25%, #794c4b, #2c1c36 78%); box-shadow: inset 0 0 0 2px #ff8a1f22; }
.rc-window { height: 126px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; pointer-events: none; }
.rc-window .rc-cq { width: 73px; flex: none; transform: rotate(-9deg); }
.rc-window .rc-cq + .rc-cq { transform: rotate(9deg); margin-left: -15px; }
.rc-window .rc-pack { width: 68px; flex: none; }
.rc-window :is(.rc-name, .rc-rar, .rc-ribbon, .rc-pk-name) { display: none; }
.rc-room strong { font: 400 clamp(18px, 2.5vw, 23px) var(--display); margin-top: 10px; }
.rc-room small { color: var(--muted); margin-top: 3px; font-size: 13px; }
.rc-floor { margin-top: 32px; }
.rc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.rc-tabs button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 800; font-size: 14.5px; cursor: pointer; }
.rc-tabs button[aria-pressed="true"] { background: var(--rc-cream); color: var(--rc-ink); }
.rc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.rc-grid.rc-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-grid.rc-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; margin: auto; }
.rc-legend .rc-cell { padding: 22px 32px 16px; border: 1px solid #cfac64; border-radius: 100px 100px 16px 16px; background: radial-gradient(ellipse at 50% 10%, #9f683766, transparent 70%), #211338; box-shadow: 0 8px 0 #4c335d; }
.rc-legend .rc-hh { text-align: center; margin-top: 14px; }
.rc-cell { display: grid; gap: 8px; align-content: start; min-width: 0; }
.rc-cardbtn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 10px; cursor: pointer; transition: transform .2s; }
.rc-cardbtn:hover { transform: translateY(-5px); }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 0; font-size: 13px; }
.rc-odds { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.rc-got, .rc-miss { justify-self: start; font-size: 13px; padding: 3px 9px; border-radius: 20px; background: #1c493f; color: #99f2cc; }
.rc-miss { background: #372858; color: #ddd0ef; border: 1px dashed #9986b9; }

/* ---------- packs ---------- */
.rc-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rc-packtile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 2px solid transparent; color: var(--ink); text-align: left; width: 100%; cursor: pointer; }
.rc-packtile:hover { border-color: var(--gold); }
.rc-packinfo { display: grid; gap: 5px; min-width: 0; }
.rc-pack { position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 5 / 7; border-radius: 7px; overflow: hidden; box-shadow: 0 10px 22px rgba(0, 0, 0, .4); background: linear-gradient(170deg, #5f8fe0, #2c4fa8 72%); }
.rc-p-char { background: linear-gradient(170deg, #7a3ff0, #3c1fa0 70%); }
.rc-p-flag { background: linear-gradient(170deg, #ffac4a, #e0581c 72%); }
.rc-p-adventure { background: linear-gradient(#9c6f44, #504333); }
.rc-p-math { background: linear-gradient(#39948e, #163c55); }
.rc-p-space { background: linear-gradient(#655cba, #211742); }
.rc-crimp { height: 9%; flex: none; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .34) 0 5px, rgba(255, 255, 255, .1) 5px 10px); }
.rc-pk-art { position: relative; flex: 1; min-height: 0; display: block; }
.rc-pk-art .sprite { position: absolute; }
.rc-pk-art img { position: absolute; border-radius: 2px; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.rc-pk-name { display: block; text-align: center; color: var(--rc-cream); font-family: var(--display); font-size: 14px; padding: 4% 6% 5%; line-height: 1.05; }
.rc-bigpack .rc-pk-name { font-size: 22px; }
.rc-split { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.rc-side { position: sticky; top: 0; padding: 16px; border-radius: 15px; background: var(--rc-cream); color: var(--rc-ink); display: grid; gap: 12px; min-width: 0; }
.rc-rules { margin: 0; padding: 0 0 0 18px; display: grid; gap: 5px; font-size: 14.5px; line-height: 1.35; font-weight: 700; }
.rc-side .btn.ghost { color: var(--rc-ink); border-color: var(--rc-ink-2); }

/* ---------- opening and revealing ---------- */
.rc-openbox { display: grid; justify-items: center; gap: 18px; padding-block: 8px 12px; }
.rc-bigpack { width: min(230px, 62vw); }
.rc-bigpack .rc-pack { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .5s ease; }
.rc-bigpack.tearing .rc-pack { transform: scale(1.12) rotate(-3deg); opacity: 0; }
.rc-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 232px)); gap: 18px; justify-content: center; }
.rc-rv { display: grid; gap: 8px; justify-items: center; min-width: 0; }
.rc-flipbtn { width: 100%; padding: 0; border: 0; background: none; perspective: 1400px; border-radius: 12px; cursor: pointer; }
.rc-flipper { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .9, .25, 1); }
.rc-flipbtn.open .rc-flipper { transform: rotateY(180deg); }
.rc-fc { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rc-fc.rc-front { transform: rotateY(180deg); }
.rc-cardback { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 16px; background: repeating-linear-gradient(45deg, #4a2fb0 0 10px, #3b2596 10px 20px); box-shadow: inset 0 0 0 5px var(--rc-cream), 0 6px 16px rgba(0, 0, 0, .4); }
.rc-cardback span { width: 46%; aspect-ratio: 1; display: block; }
.rc-cardback .sprite { width: 100%; height: 100%; display: block; }
.rc-rtag { margin: 0; min-height: 26px; font-weight: 900; text-align: center; font-size: 15px; visibility: hidden; }
.open + .rc-rtag { visibility: visible; }
.rc-rtag.new { color: var(--rc-good); }
.rc-rtag.spare { color: var(--muted); }
.rc-after { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.rc-after[hidden] { display: none; }

/* the Legendary moment */
.rc-burst { margin: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--ink); position: fixed; inset: 0; overflow: hidden; background: rgba(13, 7, 40, .92); padding: 20px 16px; }
.rc-burst[open] { display: grid; place-items: center; }
.rc-burst::backdrop { background: transparent; }
.rc-rays { position: absolute; left: 50%; top: 50%; width: 170vmax; aspect-ratio: 1; margin: -85vmax 0 0 -85vmax; background: repeating-conic-gradient(rgba(255, 210, 63, .22) 0 10deg, transparent 10deg 20deg); animation: rcSpin 26s linear infinite; will-change: transform; }
.rc-burst-in { position: relative; display: grid; gap: 14px; justify-items: center; width: min(310px, 100%); animation: rcPop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.rc-big { margin: 0; font-family: var(--pixel, "Press Start 2P", monospace); font-size: clamp(18px, 5vw, 26px); color: var(--gold); text-align: center; line-height: 1.3; }
.rc-burst-in .rc-cq { width: min(280px, 72vw); }
@keyframes rcPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- looking closer, and featuring ---------- */
.rc-detail { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 35px; align-items: center; max-width: 800px; margin: auto; }
.rc-detail-copy { display: grid; gap: 14px; }
.rc-detail-copy p { margin: 0; }
.rc-feature { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.rc-feature > * { min-width: 0; }
.rc-block + .rc-block { margin-top: 18px; }
.rc-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rc-pick { width: 88px; padding: 0; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.rc-pick .rc-ribbon, .rc-pick .rc-gems { display: none; }
.rc-pick[aria-pressed="true"] .rc-card { box-shadow: 0 0 0 3px var(--gold); }
.rc-stick { display: flex; gap: 7px; align-items: center; padding: 6px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); color: var(--ink); font-size: 14.5px; font-weight: 800; cursor: pointer; }
.rc-stick[aria-pressed="true"] { background: var(--rc-cream); color: var(--rc-ink); }
.rc-stick[disabled] { opacity: .5; cursor: not-allowed; }
.rc-preview { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.rc-preview > div { min-width: 0; flex: 1; }
.rc-preview b { display: block; line-height: 1.2; overflow-wrap: anywhere; }
.rc-preview small { color: var(--muted); }
.rc-prev-stamps { font-size: 18px; letter-spacing: 2px; }

@media (max-width: 900px) {
  .rc-split, .rc-feature { grid-template-columns: minmax(0, 1fr); }
  .rc-bigcard { max-width: 240px; margin: 0 auto; }
  .rc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-side { position: static; order: -1; } /* on a phone, Buy comes before the list of cards */
  .rc-packs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rc-grid, .rc-grid.rc-three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .rc-rooms { gap: 6px; }
  .rc-building { padding: 42px 8px 12px; }
  .rc-sign { font-size: 16px; padding: 3px 12px; }
  .rc-room { padding: 12px 4px; border-radius: 45px 45px 9px 9px; }
  .rc-room strong { font-size: 15px; text-align: center; }
  .rc-room small { font-size: 11px; text-align: center; }
  .rc-window { height: 95px; }
  .rc-window .rc-cq { width: 48px; }
  .rc-window .rc-pack { width: 43px; }
  .rc-legend .rc-cell { padding: 12px 8px; border-radius: 45px 45px 12px 12px; }
  .rc-detail { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rc-detail > .rc-cq { max-width: 245px; margin: auto; }
  .rc-trio { grid-template-columns: minmax(0, 232px); }
  .rc-wallet { height: 38px; padding: 0 9px 0 5px; font-size: 13.5px; }
  /* a phone's top bar is short of room: with coins showing, the sticker count steps aside and everything tightens up */
  .topbar:has(.rc-wallet:not(.hidden)) { gap: 6px; }
  .topbar:has(.rc-wallet:not(.hidden)) .stk-n { display: none; }
  .topbar:has(.rc-wallet:not(.hidden)) .icon-btn { width: 36px; height: 36px; }
  .rc-hud { display: none; }
}
@media (max-width: 400px) {
  .topbar:has(.rc-wallet:not(.hidden)) .brand { font-size: 0; letter-spacing: 0; gap: 0; } /* just the dot */
}
html.lite .rc-live .rc-frame::before, html.lite .rc-live .rc-art::after, html.lite .rc-rays { animation: none; }
html.lite .rc-live .rc-art::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .rc-live .rc-frame::before, .rc-rays, .rc-burst-in { animation: none; }
  .rc-live .rc-art::after { display: none; }
  .rc-flipper, .rc-bigpack .rc-pack, .rc-room, .rc-cardbtn { transition: none; }
  .rc-room:hover, .rc-cardbtn:hover { transform: none; }
}

/* A covered slot is a preview invitation, never an owned card. */
.rc-card.rc-covered { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7cqw; padding: 8cqw; color: #e8dff4; text-align: center; border: 2px dashed #9986b9; background: repeating-linear-gradient(135deg, #312044 0 12px, #2a1c3c 12px 24px); box-shadow: none; }
.rc-covered-symbol { font-size: 23cqw; opacity: .8; }
.rc-covered strong { font: 400 10cqw/1.2 var(--display); }
.rc-covered-state { font-size: 7cqw; }
.rc-preview-action { padding: 6cqw 8cqw; border-radius: 4cqw; background: #fff2d4; color: #372441; font-size: 7cqw; font-weight: 900; }
.rc-earning { margin: 18px 0 6px; font-size: 14px; line-height: 1.6; }
.rc-earning summary { cursor: pointer; min-height: 32px; }

/* Rarity stays visible even while the card artwork is covered. Text and gems supplement colour. */
.rc-cover-rarity { position: absolute; top: 4cqw; left: 4cqw; right: 4cqw; display: flex; gap: 1.5cqw; justify-content: center; align-items: center; padding: 2cqw; border: 1px solid currentColor; border-radius: 999px; font-size: max(11px, 5.6cqw); font-weight: 900; line-height: 1.2; background: #21162f; }
.rc-tier-common { color: #ddd0f3; }
.rc-tier-rare { color: #9dd5ff; }
.rc-tier-epic { color: #f1b1ff; }
.rc-tier-divine { color: #ffe28a; }
.rc-tier-legendary { color: #ffe28a; background: linear-gradient(110deg, #54305b, #28386b); }
.rc-tier-unknown { color: #d0c7df; }

/* A compact shelf keeps seasonal events together without pushing the collection far away. */
.rc-events { margin: 24px 0; }
.rc-events > .rc-lede { max-width: 75ch; line-height: 1.5; }
.rc-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rc-event { min-width: 0; overflow: hidden; border: 2px solid #ae7b9e; border-radius: 20px; background: #30213f; color: #fff3df; }
/* position: relative keeps each scene (.rc-scene is absolute) inside its own box, not across the Card House. */
.rc-event-art { position: relative; height: 145px; overflow: hidden; background: #253551; }
.rc-event-copy { padding: 16px; }
.rc-event-copy .rc-hh { margin: 10px 0; }
.rc-event-copy .btn { margin-top: 12px; min-height: 44px; }
.rc-season-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rc-season-tags span { display: inline-block; border: 1px solid #dcb47e; border-radius: 999px; padding: 4px 10px; color: #ffe5ae; font-size: .85rem; font-weight: 800; }
.rc-season-dates { display: block; font-size: 14px; line-height: 1.5; color: var(--gold); margin-top: 8px; overflow-wrap: anywhere; }
.rc-p-diwali { background: linear-gradient(135deg, #763789, #39234f 60%, #c78443); }
.rc-p-scienceweek { background: linear-gradient(135deg, #266d78, #283550 60%, #6c6aab); }
.rc-p-thanksgiving { background: linear-gradient(135deg, #965846, #493050 60%, #c18447); }
.rc-p-diwali .rc-pk-art, .rc-p-scienceweek .rc-pk-art, .rc-p-thanksgiving .rc-pk-art { position: relative; overflow: hidden; }
@media (max-width: 760px) { .rc-event-grid { grid-template-columns: minmax(0, 1fr); } .rc-event { display: grid; grid-template-columns: 110px minmax(0, 1fr); } .rc-event-art { height: 100%; min-height: 180px; } }
@media (max-width: 390px) { .rc-event { grid-template-columns: 80px minmax(0, 1fr); } .rc-event-copy { padding: 12px; } }
/* Gentle shimmer only while inspecting/revealing a card, never across the whole library. */
.rc-live .rc-firework { animation: rc-sky-glow 5s ease-in-out infinite alternate; }
.rc-live .rc-firework:nth-of-type(2n) { animation-delay: -2s; }
@keyframes rc-sky-glow { from { opacity: .6; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rc-live .rc-firework { animation: none; } }
html.lite .rc-live .rc-firework { animation: none; }
