/* BowlOfMak design system — copied 1:1 from the live bowlofmak.com (base44 /
   shadcn token set). Same HSL tokens, fonts, glass-card, glow + nav treatment
   so the Card Camp reads as a native tab of her site. */

:root {
  --background: 0 0% 98%;
  --foreground: 340 10% 18%;
  --card: 340 8% 95%;
  --primary: 340 65% 52%;          /* raspberry rose #d4356a */
  --primary-foreground: 0 0% 100%;
  --secondary: 205 55% 48%;
  --muted: 340 5% 85%;
  --muted-foreground: 340 5% 45%;
  --accent: 205 50% 60%;
  --border: 340 10% 88%;
  --ring: 340 65% 52%;
  --radius: 1rem;

  /* her glow color is palevioletred rgba(219,112,147,*) */
  --glow: 219, 112, 147;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  min-height: 100vh;
}
.font-heading { font-family: var(--font-heading); }

a { color: hsl(var(--primary)); text-decoration: none; }
a:hover { text-decoration: none; opacity: 0.85; }

/* glow utilities (exact values from her CSS) */
.text-glow {
  text-shadow: 0 0 20px rgba(var(--glow), 0.45), 0 0 40px rgba(var(--glow), 0.2);
}
.glow {
  box-shadow: 0 0 20px rgba(var(--glow), 0.25), 0 0 60px rgba(var(--glow), 0.08);
}
.glass-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(var(--glow), 0.15);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* --- nav (mirrors her markup: fixed, blurred, logo + wordmark + links + CTA) --- */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.nav-wordmark { font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: hsl(var(--foreground)); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.2s;
}
.nav-link:hover { color: hsl(var(--foreground)); background: hsl(var(--muted) / 0.5); opacity: 1; }
.nav-link.active { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); }
.nav-burger { display: none; background: none; border: 0; font-size: 24px;
  color: hsl(var(--foreground)); cursor: pointer; padding: 6px 10px; }
@media (max-width: 820px) {
  .nav-burger { display: block; order: 3; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
    padding: 8px 16px 14px; gap: 2px; z-index: 60;
  }
  .nav-links.open .nav-link { padding: 12px; font-size: 16px; }
  .nav-inner > .btn { white-space: nowrap; font-size: 13px; padding: 8px 12px; }
}

/* simpler header used by internal/admin pages (logo + plain links) */
.camp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.camp-nav { display: flex; gap: 16px; align-items: center; }
.camp-nav a { color: hsl(var(--muted-foreground)); font-weight: 600; font-size: 14px; }
.camp-nav a:hover, .camp-nav a.active { color: hsl(var(--primary)); text-decoration: none; }

/* badges / pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--primary)); }

/* buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 500;
  border: 0;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-primary { color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--primary) / 0.3);
}
.btn-outline:hover { background: hsl(var(--primary) / 0.1); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 6px; }

/* layout */
main { padding-top: 0; }
.wrap { max-width: 80rem; margin: 0 auto; padding: 40px 24px 96px; }
.hero { text-align: center; padding: 36px 0 14px; }
.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin: 14px 0 12px;
  color: hsl(var(--foreground));
}
.hero h1 .rose { color: hsl(var(--primary)); }
.hero p { color: hsl(var(--muted-foreground)); font-size: 18px; margin: 0 auto; max-width: 40rem; }

/* store strip */
.store {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 18px;
  margin: 26px 0;
}
.store .balance {
  font-weight: 700;
  color: hsl(var(--foreground));
  background: hsl(var(--primary) / 0.1);
  padding: 8px 14px;
  border-radius: 999px;
}
.store .coin { color: hsl(var(--primary)); }

/* rarity legend */
.legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }
.legend .chip {
  display: flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 6px 13px;
  font-size: 13px; font-weight: 500;
}
.legend .swatch { width: 11px; height: 11px; border-radius: 50%; }
.legend .odds { color: hsl(var(--muted-foreground)); font-weight: 700; }

/* card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 18px;
  justify-items: center;
}
.grid-cell { text-align: center; }
.grid-cell .label { margin-top: 12px; font-family: var(--font-heading); font-weight: 700; font-size: 15px; }
.grid-cell .label.locked { color: hsl(var(--muted-foreground)); font-style: italic; }
.grid-cell .rarity-tag {
  display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* achievements / badges */
.achievements { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.ach { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
       font-size: 13px; font-weight: 700; border: 1px solid hsl(var(--border)); }
.ach .ach-icon { font-size: 15px; }
.ach.earned { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.3); }
.ach.locked { color: hsl(var(--muted-foreground)); opacity: 0.6; filter: grayscale(1); }

/* footer */
.camp-footer { border-top: 1px solid hsl(var(--border)); margin-top: 40px; padding: 24px; background: rgba(255, 255, 255, 0.5); }
.camp-footer-inner { max-width: 80rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.footer-links a { margin-left: 16px; color: hsl(var(--muted-foreground)); font-weight: 600; }
.footer-links a:hover { color: hsl(var(--primary)); }

/* deck switcher tabs */
.deck-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.deck-tab {
  padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); background: #fff;
}
.deck-tab:hover { color: hsl(var(--foreground)); text-decoration: none; }
.deck-tab.active { background: hsl(var(--primary)); color: #fff; border-color: transparent; }

/* on-site reveal modal (reuses the overlay's playPackOpen) */
.reveal-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 16, 40, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.reveal-stage { position: absolute; inset: 0; }

/* card detail modal */
.detail-modal {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 40, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.detail-panel {
  display: flex; gap: 28px; align-items: center;
  background: #fff; border-radius: 20px; padding: 28px;
  max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.detail-art {
  --rarity: #ccc;
  width: 200px; aspect-ratio: 553 / 832; border-radius: 16px; overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px var(--rarity), 0 0 22px -2px var(--rarity);
}
.detail-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { display: flex; flex-direction: column; gap: 8px; }
.detail-name { font-family: var(--font-heading); font-size: 28px; font-weight: 800; }
.detail-stars { font-size: 20px; letter-spacing: 2px; }
.detail-rarity { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; }
.detail-statline { font-weight: 700; margin-top: 4px; }
.detail-statline .atk { color: #d4356a; margin-right: 14px; }
.detail-statline .def { color: #4aa3e0; }
.detail-count { margin: 4px 0 10px; }
@media (max-width: 560px) {
  .detail-panel { flex-direction: column; gap: 18px; }
}

/* toast */
.toast-wrap {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: hsl(var(--foreground)); color: #fff; padding: 12px 20px;
  border-radius: 10px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.toast .new { color: #ffd1e0; font-weight: 800; }

.muted { color: hsl(var(--muted-foreground)); }
.center { text-align: center; }

/* --- trades + nav badge (R2) ------------------------------------------- */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 11px; font-weight: 700; text-align: center; vertical-align: middle;
}
.trade-section { margin: 26px 0; }
.trade-heading { font-family: var(--font-heading); margin: 0 0 12px; }
.trade-row {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 18px; margin-bottom: 12px; flex-wrap: wrap;
}
.trade-side { display: flex; align-items: center; gap: 10px; min-width: 180px; flex: 1; }
.trade-thumb { width: 48px; height: 66px; object-fit: cover; border-radius: 6px; }
.trade-arrow { font-size: 22px; opacity: .6; }
.trade-card-name { font-weight: 700; }
.trade-actions { display: flex; gap: 8px; margin-left: auto; }
.trade-status { margin-left: auto; font-weight: 700; text-transform: capitalize; }
.trade-row.is-declined, .trade-row.is-cancelled { opacity: .55; }
.status-accepted { color: #3f9d54; }
.status-declined, .status-cancelled { color: hsl(var(--muted-foreground)); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.field-label { display: block; margin: 12px 0; font-size: 14px; font-weight: 600; }
.field-input, select.field-input {
  width: 100%; margin-top: 6px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid hsl(var(--border)); background: #fff; color: inherit; font: inherit;
}
.trade-panel {
  display: block;                 /* override .detail-panel's flex-row squeeze */
  width: min(440px, 92vw);
}
.trade-panel .detail-name { margin-bottom: 6px; }

/* --- set-completion celebration, site side (R4) -------------------------- */
.confetti-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; top: -20px; display: block; animation: confetti-fall linear forwards; }
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
.celebrate-panel { text-align: center; }
.celebrate-kicker { font-weight: 800; letter-spacing: 4px; font-size: 14px; color: hsl(var(--primary)); margin-bottom: 6px; }
.celebrate-panel .detail-actions { justify-content: center; }

/* pack guarantee perk chip on store buttons (R5) */
.pack-perk {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px; padding: 2px 9px;
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
}

/* --- camp profile header (R6: "My Camp") -------------------------------- */
.camp-profile {
  display: flex; gap: 22px; align-items: center;
  padding: 26px 30px; margin: 30px 0 8px;
}
.camp-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid hsl(var(--primary) / 0.4);
  box-shadow: 0 0 24px rgba(var(--glow), 0.35);
  flex: 0 0 auto;
}
.camp-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--primary) / 0.15); color: hsl(var(--primary));
  font-family: var(--font-heading); font-size: 42px; font-weight: 900;
}
.camp-name { font-family: var(--font-heading); font-size: clamp(26px, 4vw, 40px); margin: 0 0 6px; }
.camp-name .pill { vertical-align: middle; margin-left: 8px; }
.camp-meta { display: flex; gap: 18px; flex-wrap: wrap; color: hsl(var(--muted-foreground)); font-size: 14px; font-weight: 600; }
.camp-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.badge-bronze { border-color: #c98a4b !important; color: #a56a33 !important; background: rgba(201,138,75,.12) !important; }
.badge-silver { border-color: #9fb2c8 !important; color: #64788f !important; background: rgba(159,178,200,.15) !important; }
.badge-gold   { border-color: #e3b341 !important; color: #a97e14 !important; background: rgba(227,179,65,.14) !important; }
.badge-honor  { border-color: #ff6a4d !important; color: #d94f33 !important; background: rgba(255,106,77,.12) !important; }
.badge-honor .badge-art { width: 22px; height: 22px; object-fit: contain; }
.badge-month  { border-color: hsl(var(--primary) / 0.4) !important; }
@media (max-width: 560px) {
  .camp-profile { flex-direction: column; text-align: center; }
  .camp-meta, .camp-badges { justify-content: center; }
}

/* trade history pairing (R12 audit) */
.trade-pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* admin pages on mobile (R12 audit): nav wraps instead of clipping; wide
   tables scroll inside their card instead of overflowing the viewport */
@media (max-width: 700px) {
  .camp-header { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 6px; }
  .camp-nav { flex-wrap: wrap; gap: 10px; row-gap: 4px; }
  .glass-card, .panel { overflow-x: auto; }
  table.settings { min-width: 560px; }
}
