/* ==========================================================================
   THE SCRY HARDS — MAGIC: THE GATHERING "REALITY FRACTURE" THEME
   Modern shadcn/ui Component Architecture & HSL Design Tokens
   Deep Planar Void, Aether Cyan, Planar Rift Violet, Cosmic Magenta & Mythic Gold
   ========================================================================== */

:root, body, .scryhard-app-wrapper, .scryhard-root {
  /* -------------------------------------------------------------------------
     shadcn/ui Core Base Tokens (HSL Channels for Alpha Composition)
     ------------------------------------------------------------------------- */
  --background: 246 45% 4%;            /* #07060d - Deep Planar Void */
  --foreground: 210 40% 98%;           /* #f8fafc - Aether Silver */

  --card: 250 33% 7%;                 /* #0e0c18 - Obsidian Plate Glass */
  --card-foreground: 210 40% 98%;

  --popover: 252 35% 10%;             /* #141122 - Elevated Dark Surface */
  --popover-foreground: 210 40% 98%;

  --primary: 271 81% 56%;             /* #9333ea - Planar Rift Violet */
  --primary-foreground: 210 40% 98%;

  --secondary: 189 94% 43%;           /* #06b6d4 - Crystalline Aether Cyan */
  --secondary-foreground: 246 45% 4%;

  --muted: 250 25% 15%;               /* #1c1830 - Muted Void Surface */
  --muted-foreground: 215 20% 65%;    /* #94a3b8 - Subdued Text */

  --accent: 38 92% 50%;               /* #f59e0b - Mythic Gold */
  --accent-foreground: 246 45% 4%;

  --destructive: 0 84% 60%;           /* #ef4444 - Damage Crimson */
  --destructive-foreground: 210 40% 98%;

  --border: 270 30% 20%;              /* rgba(168, 85, 247, 0.22) - Cosmic Rift Border */
  --input: 250 20% 18%;               /* #201c34 - Crisp Input Field */
  --ring: 189 94% 43%;                /* #06b6d4 - Aether Cyan Focus Ring */

  --radius: 0.75rem;                  /* 12px Container Rounding */
  --radius-sm: 0.5rem;                /* 8px Button/Input Rounding */
  --radius-lg: 1rem;                  /* 16px Card/Modal Rounding */
  --radius-pill: 9999px;              /* Full Pill Rounding */

  /* -------------------------------------------------------------------------
     MTG "Reality Fracture" Thematic Accents
     ------------------------------------------------------------------------- */
  --deep-planar-void: #07060d;
  --rift-violet: 271 81% 56%;         /* #9333ea */
  --rift-violet-glow: 271 81% 56% / 0.4;
  --aether-cyan: 189 94% 43%;         /* #06b6d4 */
  --aether-cyan-glow: 189 94% 43% / 0.35;
  --cosmic-magenta: 330 81% 60%;      /* #ec4899 - Void Fuchsia */
  --cosmic-magenta-glow: 330 81% 60% / 0.35;
  --void-fuchsia: 330 81% 60%;
  --mythic-gold: 38 92% 50%;          /* #f59e0b */
  --mythic-gold-hi: 48 96% 53%;       /* #fde047 */
  --mythic-gold-glow: 38 92% 50% / 0.35;

  /* MTG Five-Color Canonical Mana Pips */
  --mana-w: 48 94% 68%;               /* Plains - Sunburst Ivory #fef08a */
  --mana-u: 217 91% 60%;              /* Island - Sapphire Stream #60a5fa */
  --mana-b: 262 52% 47%;              /* Swamp - Nether Twilight #a855f7 */
  --mana-r: 0 84% 60%;                /* Mountain - Pyretic Flame #ef4444 */
  --mana-g: 142 71% 45%;              /* Forest - Verdant Growth #22c55e */
  --mana-c: 215 16% 47%;              /* Colorless - Astral Slate #94a3b8 */

  /* -------------------------------------------------------------------------
     Backwards-Compatible & Component-Level Aliases
     ------------------------------------------------------------------------- */
  --bg-deep: hsl(var(--background));
  --bg-surface: hsl(250 35% 6%);
  --bg-card: hsl(var(--card) / 0.85);
  --bg-card-hover: hsl(250 30% 12% / 0.95);
  --bg-card-elevated: hsl(var(--popover) / 0.98);
  --bg-field: hsl(var(--input) / 0.85);
  --bg-field-focus: hsl(250 22% 14%);

  --line: hsl(var(--border));
  --line-gold: hsl(var(--mythic-gold) / 0.45);
  --line-soft: hsl(270 30% 25% / 0.35);
  --line-highlight: hsl(var(--secondary) / 0.3);

  --ink: hsl(var(--foreground));
  --ink-bright: #ffffff;
  --muted-color: hsl(var(--muted-foreground));
  --faint: hsl(var(--muted-foreground) / 0.7);

  --gold: hsl(var(--mythic-gold));
  --gold-hi: hsl(var(--mythic-gold-hi));
  --gold-dark: #b45309;
  --gold-glow: hsl(var(--mythic-gold-glow));
  --gold-gradient: linear-gradient(135deg, hsl(var(--mythic-gold-hi)) 0%, hsl(var(--mythic-gold)) 50%, #b45309 100%);
  --gold-foil-border: linear-gradient(135deg, rgba(253, 224, 71, 0.6), rgba(245, 158, 11, 0.4), rgba(180, 83, 9, 0.5));
  --rift-gradient: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
  --cosmic-gradient: linear-gradient(135deg, hsl(var(--cosmic-magenta)) 0%, hsl(var(--primary)) 50%, hsl(var(--secondary)) 100%);

  --mana-white: hsl(var(--mana-w));
  --mana-blue: hsl(var(--mana-u));
  --mana-black: hsl(var(--mana-b));
  --mana-red: hsl(var(--mana-r));
  --mana-green: hsl(var(--mana-g));

  --blood: hsl(var(--destructive));
  --blood-hi: #f87171;
  --blood-bg: hsl(var(--destructive) / 0.18);
  --moss: hsl(var(--mana-g));
  --moss-glow: hsl(var(--mana-g) / 0.3);

  /* Typography Stacks */
  --serif: 'Cinzel', Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shadows & Elevations */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 24px hsl(var(--primary) / 0.15);
  --shadow-gold: 0 0 30px hsl(var(--mythic-gold-glow));
  --shadow-rift: 0 0 25px hsl(var(--primary) / 0.3);
  --shadow-cyan: 0 0 25px hsl(var(--secondary) / 0.3);
  --radius-md: var(--radius);
}

*, *::before, *::after {
  box-sizing: border-box;
}

::selection {
  background: hsl(var(--primary) / 0.45);
  color: #ffffff;
}

/* Base Body Resets */
body.scryhard-fullscreen-app {
  margin: 0;
  padding: 0;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Navigation Bar (App Header)
   ========================================================================== */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: hsl(var(--card) / 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.app-navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--secondary)) 25%, hsl(var(--primary)) 50%, hsl(var(--mythic-gold)) 75%, transparent 100%);
  opacity: 0.8;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spark-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px hsl(var(--mythic-gold-glow)));
  animation: sparkPulse 4s ease-in-out infinite alternate;
}

@keyframes sparkPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 8px hsl(var(--mythic-gold) / 0.3)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 18px hsl(var(--secondary) / 0.6)); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px hsl(var(--mythic-gold) / 0.3);
}

.brand-sub {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
}

.nav-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: hsl(142 71% 45% / 0.12);
  border: 1px solid hsl(142 71% 45% / 0.35);
  border-radius: var(--radius-pill);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.badge-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: #1a1408;
  background: var(--gold-gradient);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 10px hsl(var(--mythic-gold) / 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px hsl(var(--mythic-gold) / 0.55);
  filter: brightness(1.08);
}

/* ==========================================================================
   Animated Ambient Mana Auroras (Reality Fracture Cosmic Flux)
   ========================================================================== */
.mana-aurora-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.mana-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
}

/* Cosmic Magenta / Void Fuchsia Orb */
.mana-orb-red {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #ec4899 0%, #9333ea 45%, transparent 70%);
  top: -80px;
  right: 5%;
  animation: floatOrbRed 24s ease-in-out infinite alternate;
}

/* Crystalline Aether Cyan Orb */
.mana-orb-blue {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, #06b6d4 0%, #2563eb 45%, transparent 70%);
  bottom: 5%;
  left: -120px;
  animation: floatOrbBlue 28s ease-in-out infinite alternate;
}

/* Mythic Amber Gold Orb */
.mana-orb-gold {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f59e0b 0%, #d97706 45%, transparent 70%);
  top: 35%;
  right: -80px;
  animation: floatOrbGold 22s ease-in-out infinite alternate;
}

/* Planar Rift Violet / Verdant Leyline Orb */
.mana-orb-green {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #8b5cf6 0%, #059669 45%, transparent 70%);
  bottom: -100px;
  right: 30%;
  animation: floatOrbGreen 26s ease-in-out infinite alternate;
}

@keyframes floatOrbRed {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, 90px) scale(1.12); }
  100% { transform: translate(-20px, 150px) scale(0.96); }
}

@keyframes floatOrbBlue {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, -70px) scale(1.15); }
  100% { transform: translate(50px, -130px) scale(1.02); }
}

@keyframes floatOrbGold {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-90px, -50px) scale(1.1); }
  100% { transform: translate(-120px, 70px) scale(0.92); }
}

@keyframes floatOrbGreen {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -90px) scale(1.1); }
  100% { transform: translate(70px, -50px) scale(0.95); }
}

/* ==========================================================================
   shadcn/ui Button Primitive (.scry-btn & .btn)
   ========================================================================== */
.scry-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  padding: 10px 18px;
  height: 40px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.scry-btn:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.scry-btn:disabled, .btn:disabled, .btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Default / Primary Variant: Planar Rift Violet */
.scry-btn-primary, .btn-primary, .btn:not(.sec):not(.del):not(.ghost):not(.outline):not(.gold):not(.nav-quick-btn):not(.art-zoom-btn):not(.showcase-arrow):not(.showcase-shuffle):not(.swatch-btn) {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(271 81% 68% / 0.4);
  box-shadow: 0 2px 10px hsl(var(--primary) / 0.35);
}

.scry-btn-primary:hover, .btn-primary:hover, .btn:not(.sec):not(.del):not(.ghost):not(.outline):not(.gold):not(.nav-quick-btn):not(.art-zoom-btn):not(.showcase-arrow):not(.showcase-shuffle):not(.swatch-btn):hover {
  background: hsl(271 81% 62%);
  border-color: hsl(271 81% 75% / 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px hsl(var(--primary) / 0.55);
}

.scry-btn-primary:active, .btn-primary:active, .btn:not(.sec):not(.del):not(.ghost):not(.outline):not(.gold):not(.nav-quick-btn):not(.art-zoom-btn):not(.showcase-arrow):not(.showcase-shuffle):not(.swatch-btn):active {
  transform: translateY(0);
  box-shadow: 0 1px 6px hsl(var(--primary) / 0.3);
}

/* Secondary Variant: Clean Elevated Dark Surface */
.scry-btn-secondary, .btn.sec, .btn-secondary {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-sm);
}

.scry-btn-secondary:hover, .btn.sec:hover, .btn-secondary:hover {
  background: hsl(250 25% 20%);
  border-color: hsl(270 40% 35%);
  color: #ffffff;
  transform: translateY(-1px);
}

.scry-btn-secondary:active, .btn.sec:active, .btn-secondary:active {
  transform: translateY(0);
}

/* Destructive Variant: Damage Crimson */
.scry-btn-destructive, .btn.del, .btn.sec.del, .btn-destructive {
  background: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
  border: 1px solid hsl(var(--destructive) / 0.35);
}

.scry-btn-destructive:hover, .btn.del:hover, .btn.sec.del:hover, .btn-destructive:hover {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
  box-shadow: 0 4px 16px hsl(var(--destructive) / 0.45);
  transform: translateY(-1px);
}

/* Outline Variant */
.scry-btn-outline, .btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.scry-btn-outline:hover, .btn-outline:hover {
  background: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--secondary) / 0.6);
  color: hsl(var(--secondary));
  transform: translateY(-1px);
}

/* Ghost Variant */
.scry-btn-ghost, .btn-ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: 1px solid transparent;
}

.scry-btn-ghost:hover, .btn-ghost:hover {
  background: hsl(var(--muted) / 0.6);
  color: hsl(var(--foreground));
}

/* Mythic Gold Variant */
.scry-btn-gold, .btn.gold, .btn-gold {
  background: var(--gold-gradient);
  color: #140e02;
  border: 1px solid rgba(253, 224, 71, 0.5);
  font-weight: 600;
  box-shadow: 0 2px 12px hsl(var(--mythic-gold) / 0.35);
}

.scry-btn-gold:hover, .btn.gold:hover, .btn-gold:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 20px hsl(var(--mythic-gold) / 0.55);
}

/* Button Sizing */
.scry-btn-sm, .btn.mini, .btn-sm {
  height: 32px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: calc(var(--radius-sm) - 2px);
}

.scry-btn-lg, .btn-lg {
  height: 48px;
  padding: 12px 24px;
  font-size: 15px;
}

.scry-btn-icon, .btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   shadcn/ui Card Component Primitive (.scry-card & .card)
   ========================================================================== */
.scry-card, .card, .panel-card {
  position: relative;
  background: hsl(var(--card) / 0.85);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px 28px;
  margin-bottom: 24px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.scry-card:hover, .card:hover, .panel-card:hover {
  border-color: hsl(var(--rift-violet) / 0.4);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.65), 0 0 24px hsl(var(--rift-violet) / 0.12);
}

.scry-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.scry-card-title, .card h2, .panel-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.8px;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 12px;
}

.scry-card-title::before, .card h2::before, .panel-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, hsl(var(--primary)), hsl(var(--secondary)));
  border-radius: 2px;
  box-shadow: 0 0 10px hsl(var(--primary));
}

.card h3 {
  margin: 22px 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.6px;
  color: hsl(var(--mythic-gold-hi));
  display: flex;
  align-items: center;
  gap: 8px;
}

.scry-card-description, .sub, .panel-subtitle {
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
  margin: 4px 0 18px;
  line-height: 1.5;
}

.scry-card-content {
  position: relative;
}

.scry-card-footer {
  display: flex;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border) / 0.4);
}

.grid2, .arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 960px) {
  .grid2, .arena-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   shadcn/ui Badge Primitive (.scry-badge, .badge, .pill, .status-pill)
   ========================================================================== */
.scry-badge, .badge, .pill, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: hsl(var(--muted) / 0.7);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  transition: all 0.2s ease;
}

.scry-badge-secondary, .pill:not(.live):not(.fin) {
  background: hsl(var(--muted) / 0.7);
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

/* Live Tournament State: Pulsing Crimson */
.scry-badge-live, .pill.live {
  background: hsl(var(--destructive) / 0.15);
  border-color: hsl(var(--destructive) / 0.5);
  color: #fca5a5;
  box-shadow: 0 0 10px hsl(var(--destructive) / 0.25);
}

.scry-badge-live::before, .pill.live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--destructive));
  box-shadow: 0 0 6px hsl(var(--destructive));
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 8px hsl(var(--destructive)); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Finished / Bye State: Resonant Emerald */
.scry-badge-done, .pill.fin {
  background: hsl(142 71% 45% / 0.15);
  border-color: hsl(142 71% 45% / 0.45);
  color: #86efac;
}

/* Thematic Color Variants */
.scry-badge-violet {
  background: hsl(var(--primary) / 0.15);
  border-color: hsl(var(--primary) / 0.4);
  color: #d8b4fe;
}

.scry-badge-cyan {
  background: hsl(var(--secondary) / 0.15);
  border-color: hsl(var(--secondary) / 0.4);
  color: #67e8f9;
}

.scry-badge-gold {
  background: hsl(var(--mythic-gold) / 0.15);
  border-color: hsl(var(--mythic-gold) / 0.45);
  color: hsl(var(--mythic-gold-hi));
}

/* Mana Pips Badges */
.mana-badge-w { border-color: hsl(var(--mana-w) / 0.5); color: #fef08a; background: hsl(var(--mana-w) / 0.1); }
.mana-badge-u { border-color: hsl(var(--mana-u) / 0.5); color: #7dd3fc; background: hsl(var(--mana-u) / 0.1); }
.mana-badge-b { border-color: hsl(var(--mana-b) / 0.5); color: #d8b4fe; background: hsl(var(--mana-b) / 0.1); }
.mana-badge-r { border-color: hsl(var(--mana-r) / 0.5); color: #fca5a5; background: hsl(var(--mana-r) / 0.1); }
.mana-badge-g { border-color: hsl(var(--mana-g) / 0.5); color: #86efac; background: hsl(var(--mana-g) / 0.1); }

/* ==========================================================================
   shadcn/ui Segmented Navigation Tabs Primitive (.tabs, .tabs-nav, .scry-tabs)
   ========================================================================== */
.tabs-bar-wrap {
  max-width: 1440px;
  margin: 24px auto 0;
  padding: 0 28px;
}

.scry-tabs-list, .tabs, .tabs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  overflow-x: auto;
  scrollbar-width: none;
}

.scry-tabs-list::-webkit-scrollbar, .tabs::-webkit-scrollbar, .tabs-nav::-webkit-scrollbar {
  display: none;
}

.scry-tab-trigger, .tabs button, .tabs-nav button, .tab-btn, .nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scry-tab-trigger:hover, .tabs button:hover, .tabs-nav button:hover, .tab-btn:hover, .nav-tab:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--border) / 0.5);
}

.scry-tab-trigger.active, .tabs button.active, .tabs-nav button.active, .tab-btn.active, .nav-tab.active {
  color: #ffffff !important;
  font-weight: 600 !important;
  background: linear-gradient(180deg, hsl(250 30% 14%) 0%, hsl(250 35% 9%) 100%) !important;
  border: 1px solid hsl(var(--primary) / 0.7) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 16px hsl(var(--primary) / 0.25) !important;
}

.tabs button.active span, .tab-btn.active span, .nav-tab.active span {
  filter: drop-shadow(0 0 4px hsl(var(--secondary)));
}

/* Tab View Showing / Hiding Mechanism */
section.tab, .tab, .tab-view {
  display: none !important;
}

section.tab.active, .tab.active, .tab-view.active {
  display: block !important;
  animation: tabFadeIn 0.22s ease-out;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Main Content Stage
   ========================================================================== */
.app-main-stage, main {
  max-width: 1440px;
  margin: 24px auto 60px;
  padding: 0 28px;
  flex: 1;
}

/* ==========================================================================
   Stat Strip (KPI Dashboard Cards)
   ========================================================================== */
.statstrip, .stat-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.statstrip div, .stat-box {
  background: hsl(var(--card) / 0.75);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.statstrip div::after, .stat-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.6), transparent);
}

.statstrip div:hover, .stat-box:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--secondary) / 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px hsl(var(--secondary) / 0.15);
}

.statstrip b, .stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.statstrip span, .stat-lbl {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: hsl(var(--muted-foreground));
}

/* ==========================================================================
   shadcn/ui Table Primitive (.scry-table & .tablewrap)
   ========================================================================== */
.scry-table-wrapper, .tablewrap, .table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  margin: 14px 0;
}

.scry-table, .table-standings, .pairings-table, table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  text-align: left;
}

.scry-table th, .table-standings th, .pairings-table th, th {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--mythic-gold));
  background: hsl(250 35% 8% / 0.95);
  padding: 12px 18px;
  border-bottom: 2px solid hsl(var(--border));
  white-space: nowrap;
}

.scry-table td, .table-standings td, .pairings-table td, td {
  padding: 13px 18px;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border) / 0.35);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease;
}

tr:hover td {
  background: hsl(var(--muted) / 0.22);
}

tr.leader td {
  background: hsl(var(--mythic-gold) / 0.08);
}

tr.dropped td {
  opacity: 0.5;
  filter: grayscale(0.8);
}

/* Standings Badges & Progress Bars */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(180, 83, 9, 0.35));
  border: 1px solid hsl(var(--mythic-gold));
  color: hsl(var(--mythic-gold-hi));
  box-shadow: 0 0 12px hsl(var(--mythic-gold) / 0.3);
}

.rank-2 {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.2), rgba(148, 163, 184, 0.3));
  border: 1px solid #cbd5e1;
  color: #f8fafc;
}

.rank-3 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(180, 83, 9, 0.3));
  border: 1px solid #d97706;
  color: #fde68a;
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(20, 18, 30, 0.95));
  border: 1px solid hsl(var(--mythic-gold) / 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  color: hsl(var(--mythic-gold-hi));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--gold-gradient);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px hsl(var(--mythic-gold) / 0.4);
}

/* ==========================================================================
   Match Cards & Champion Banner
   ========================================================================== */
.match, .match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: hsl(var(--card) / 0.7);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.match:hover, .match-card:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--card));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px hsl(var(--primary) / 0.1);
}

.match.done, .match-card.done {
  border-color: hsl(142 71% 45% / 0.35);
  background: hsl(142 71% 45% / 0.05);
}

.match .vs {
  font-family: var(--sans);
  font-weight: 600;
  color: hsl(var(--foreground));
}

.match .vs em {
  font-family: var(--serif);
  color: hsl(var(--secondary));
  font-style: normal;
  font-weight: 700;
  margin: 0 6px;
}

.match input[type=number] {
  width: 48px;
  padding: 6px 8px;
  text-align: center;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}

.match input[type=number]:focus {
  outline: none;
  border-color: hsl(var(--secondary));
  box-shadow: 0 0 0 2px hsl(var(--secondary) / 0.3);
}

.champion {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(180, 83, 9, 0.28) 100%);
  border: 1px solid hsl(var(--mythic-gold));
  border-radius: var(--radius-md);
  padding: 16px 24px;
  text-align: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--mythic-gold-hi));
  margin-bottom: 20px;
  box-shadow: 0 0 24px hsl(var(--mythic-gold) / 0.2);
}

.champion span {
  color: hsl(var(--mythic-gold));
  margin: 0 8px;
}

/* ==========================================================================
   shadcn/ui Input Primitive (.scry-input, input, select, textarea)
   ========================================================================== */
.scry-label, label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scry-input, .form-control, .input, input[type=text], input[type=date], select, textarea, .textarea, .form-input, .form-select, .form-textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 14px;
  height: 40px;
  background: hsl(var(--input) / 0.75);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: hsl(var(--foreground));
  font-family: var(--sans);
  font-size: 14px;
  transition: all 0.15s ease;
}

textarea, .scry-textarea, .textarea {
  height: auto;
  min-height: 95px;
  resize: vertical;
  line-height: 1.5;
}

.scry-input::placeholder, .input::placeholder, input::placeholder, textarea::placeholder, .textarea::placeholder {
  color: hsl(var(--muted-foreground) / 0.55);
}

.scry-input:focus, .form-control:focus, .input:focus, input[type=text]:focus, input[type=date]:focus, select:focus, textarea:focus, .textarea:focus {
  outline: none;
  background: hsl(var(--input));
  border-color: hsl(var(--secondary));
  box-shadow: 0 0 0 2px hsl(var(--secondary) / 0.25);
}

.row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.row > * {
  flex: 1;
}

.status {
  font-family: var(--mono);
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-left: 8px;
}

.status.done {
  color: #34d399;
}

/* ==========================================================================
   Mythic Art Showcase Banner & Pageantry Frame
   ========================================================================== */
.mythic-showcase-wrap {
  max-width: 1440px;
  margin: 24px auto 0;
  padding: 0 28px;
  position: relative;
  z-index: 10;
}

.legendary-frame, #mythicHero {
  position: relative;
  height: 580px;
  min-height: 520px;
  border-radius: var(--radius-lg);
  border: 2px solid hsl(var(--mythic-gold));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 45px var(--art-glow, hsl(var(--mythic-gold) / 0.3));
  overflow: hidden;
  background: #090810;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 1.4s ease, border-color 1.4s ease;
}

@media (max-width: 900px) {
  .legendary-frame {
    height: 500px;
    min-height: 460px;
  }
}

@media (max-width: 600px) {
  .legendary-frame {
    height: 440px;
    min-height: 400px;
  }
}

/* Shortcode Embedded Header & Responsive Gold Bar Remediation */
header.top {
  position: relative;
  text-align: center;
  padding: 24px 16px 16px;
}

header.top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, 90vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--mythic-gold-hi)), transparent);
  box-shadow: 0 0 16px hsl(var(--mythic-gold));
}

header.top h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 5vw, 36px);
  margin: 0 0 6px;
  color: hsl(var(--foreground));
}

header.top h1 span {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header.top p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  margin: 0;
}

header.top .masthead-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  color: hsl(var(--mythic-gold));
}

header.top .masthead-orn i {
  display: block;
  width: min(60px, 15vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--mythic-gold)));
}

header.top .masthead-orn i:last-child {
  background: linear-gradient(90deg, hsl(var(--mythic-gold)), transparent);
}

/* Responsive, Proportionally Centered Crown Ornament (Gold Bar Remediated) */
.legendary-crown-ornament {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, 80vw);
  height: 20px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.9));
}

.crown-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Atmospheric Ambient Canvas - Fills Frame Without Cropping Subject */
.art-ambient-glow {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center center;
  filter: blur(50px) saturate(2);
  opacity: 0.35;
  z-index: 0;
  transition: opacity 1.2s ease, background-image 1.2s ease;
  pointer-events: none;
}

.art-backdrop-blur {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center center;
  filter: blur(35px) brightness(0.24) saturate(1.8);
  opacity: 0.95;
  z-index: 1;
  transition: background-image 1.2s ease;
  pointer-events: none;
}

.art-vignette {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 95% 85% at 50% 45%, transparent 35%, rgba(7, 6, 13, 0.45) 75%, rgba(7, 6, 13, 0.92) 100%),
    linear-gradient(180deg, rgba(7, 6, 13, 0.35) 0%, transparent 20%, transparent 70%, rgba(7, 6, 13, 0.95) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Uncropped Centered Card Art Stage */
.art-stage-center {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 30px 20px 8px;
  overflow: hidden;
}

.art-frame-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-height: 420px;
  max-width: 95%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px var(--art-glow, hsl(var(--mythic-gold) / 0.35));
  border: 2px solid hsl(var(--mythic-gold));
  background: #050508;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (max-width: 900px) {
  .art-frame-container {
    max-height: 350px;
  }
}

@media (max-width: 600px) {
  .art-frame-container {
    max-height: 270px;
  }
}

.art-frame-container:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.98), 0 0 50px var(--art-glow, #f59e0b);
  border-color: #ffffff;
}

.art-full-image {
  max-height: 420px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (max-width: 900px) {
  .art-full-image {
    max-height: 350px;
  }
}

@media (max-width: 600px) {
  .art-full-image {
    max-height: 270px;
  }
}

.art-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid hsl(var(--mythic-gold) / 0.4);
  border-radius: var(--radius-pill);
  color: hsl(var(--mythic-gold-hi));
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s ease;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.art-frame-container:hover .art-zoom-btn {
  opacity: 1;
  transform: translateY(0);
}

.art-zoom-btn:hover {
  background: hsl(var(--mythic-gold));
  color: #110e06;
  box-shadow: 0 0 14px hsl(var(--mythic-gold));
}

.art-foil-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.2) 48%, rgba(253, 224, 116, 0.3) 50%, rgba(6, 182, 212, 0.2) 53%, transparent 65%);
  background-size: 250% 250%;
  background-position: -150% 0;
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 5;
  animation: foilSweep 10s infinite ease-in-out;
}

@keyframes foilSweep {
  0% { background-position: -150% 0; }
  35% { background-position: 150% 150%; }
  100% { background-position: 150% 150%; }
}

/* Minimalist Lore Bar & Floating Showcase Controls */
.art-content-overlay {
  position: relative;
  z-index: 6;
  padding: 12px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(9, 8, 16, 0.65) 30%, rgba(7, 6, 13, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid hsl(var(--mythic-gold) / 0.18);
}

.art-meta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
}

.art-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid hsl(var(--mythic-gold) / 0.4);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 13px;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.art-pip-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--mythic-gold));
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.art-title-text {
  font-family: var(--serif);
  font-weight: 700;
  color: hsl(var(--mythic-gold-hi));
  letter-spacing: 0.3px;
}

.art-set-tag {
  color: hsl(var(--muted-foreground));
  font-size: 11.5px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 8px;
}

.art-flavor-text {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: #f1e9da;
  max-width: 600px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  letter-spacing: 0.2px;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .art-flavor-text {
    display: none;
  }
}

.showcase-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: hsl(var(--card) / 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--mythic-gold) / 0.35);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.showcase-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: hsl(var(--mythic-gold-hi));
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.showcase-arrow:hover {
  background: hsl(var(--mythic-gold));
  color: #110e06;
  box-shadow: 0 0 12px hsl(var(--mythic-gold));
  transform: scale(1.1);
}

.showcase-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 220px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}

.showcase-dots::-webkit-scrollbar {
  display: none;
}

.showcase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.showcase-dot.active {
  width: 16px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  box-shadow: 0 0 8px hsl(var(--mythic-gold));
}

.showcase-shuffle {
  padding: 4px 12px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  color: hsl(var(--foreground));
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.showcase-shuffle:hover {
  background: hsl(var(--mythic-gold) / 0.25);
  border-color: hsl(var(--mythic-gold));
  color: hsl(var(--mythic-gold-hi));
}

/* ==========================================================================
   Full-Resolution Art Lightbox Modal (.art-lightbox)
   Accessible shadcn/Radix-Style Dialog with Backdrop Blur & Scale-In FX
   ========================================================================== */
.art-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 8, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease-out;
}

.art-lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.art-lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 78vh;
  max-width: 90vw;
}

.art-lightbox-img {
  max-height: 78vh;
  max-width: 90vw;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 2px solid hsl(var(--mythic-gold));
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.98), 0 0 60px hsl(var(--mythic-gold) / 0.35);
  display: block;
}

.art-lightbox-close {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #181628;
  border: 1.5px solid hsl(var(--mythic-gold));
  color: hsl(var(--mythic-gold-hi));
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 15;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.art-lightbox-close:hover,
.art-lightbox-close:focus-visible {
  background: hsl(var(--mythic-gold));
  color: #110e06;
  transform: scale(1.1);
  outline: 2px solid #ffffff;
}

.art-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 16, 30, 0.88);
  backdrop-filter: blur(10px);
  border: 1.5px solid hsl(var(--mythic-gold) / 0.6);
  color: hsl(var(--mythic-gold-hi));
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 12;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.art-lightbox-nav.prev { left: -26px; }
.art-lightbox-nav.next { right: -26px; }

@media (max-width: 768px) {
  .art-lightbox-nav.prev { left: 8px; }
  .art-lightbox-nav.next { right: 8px; }
  .art-lightbox-close { top: 4px; right: 4px; }
}

.art-lightbox-nav:hover,
.art-lightbox-nav:focus-visible {
  background: hsl(var(--mythic-gold));
  color: #110e06;
  border-color: #ffffff;
  transform: translateY(-50%) scale(1.12);
  outline: 2px solid hsl(var(--secondary));
}

.art-lightbox-caption {
  margin-top: 14px;
  text-align: center;
  font-family: var(--serif);
  color: hsl(var(--foreground));
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  max-width: 820px;
  width: 100%;
}

.art-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.art-lightbox-title {
  font-size: 17px;
  font-weight: 700;
  color: hsl(var(--mythic-gold-hi));
  letter-spacing: 0.5px;
}

.art-lightbox-counter {
  font-size: 11px;
  font-family: var(--mono);
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.art-lightbox-flavor {
  margin: 6px 0 0;
  font-style: italic;
  color: #e2e8f0;
  font-size: 13.5px;
  line-height: 1.5;
}

.art-lightbox-meta {
  margin-top: 4px;
  font-size: 11.5px;
  font-family: var(--sans);
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   Multiverse Art Archive Gallery & Modern Control System
   ========================================================================== */
.gallery-container-card {
  padding: 24px;
}

.gallery-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.gallery-count-badge {
  font-size: 12px;
  font-weight: 600;
  background: hsl(var(--muted) / 0.8);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--mythic-gold-hi));
}

/* Modern Filter & Search Controls Bar */
.gallery-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: hsl(var(--popover) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gallery-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.gallery-search-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

.gallery-search-input {
  width: 100%;
  padding-left: 40px;
  padding-right: 36px;
  height: 42px;
  background: hsl(var(--background) / 0.7);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: hsl(var(--foreground));
  font-size: 14px;
  transition: all 0.2s ease;
}

.gallery-search-input:focus {
  border-color: hsl(var(--secondary));
  box-shadow: 0 0 0 2px hsl(var(--secondary) / 0.25), 0 0 16px hsl(var(--secondary) / 0.2);
  outline: none;
}

.gallery-clear-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.gallery-clear-btn:hover {
  color: #ffffff;
  background: hsl(var(--muted));
}

.gallery-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mana Color Filter Pills */
.gallery-mana-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-mana-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.gallery-mana-pill:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  transform: translateY(-1px);
}

.gallery-mana-pill.active {
  background: hsl(var(--primary) / 0.3);
  border-color: hsl(var(--secondary));
  color: #ffffff;
  box-shadow: 0 0 12px hsl(var(--secondary) / 0.35);
}

.gallery-mana-pill.mana-w.active {
  background: rgba(254, 240, 138, 0.2);
  border-color: #fef08a;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(254, 240, 138, 0.35);
}

.gallery-mana-pill.mana-u.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.gallery-mana-pill.mana-b.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.gallery-mana-pill.mana-r.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.gallery-mana-pill.mana-g.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #86efac;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.gallery-mana-pill.mana-c.active {
  background: rgba(148, 163, 184, 0.2);
  border-color: #94a3b8;
  color: #f1f5f9;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
}

.mana-symbol {
  font-size: 13px;
  line-height: 1;
}

/* Set Selector Dropdown */
.gallery-set-wrap {
  min-width: 200px;
}

.gallery-set-select {
  width: 100%;
  height: 38px;
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: hsl(var(--foreground));
  font-size: 13px;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-set-select:focus {
  border-color: hsl(var(--secondary));
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--secondary) / 0.25);
}

/* Accessible Empty State */
.gallery-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: hsl(var(--popover) / 0.3);
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
  margin-top: 20px;
}

.gallery-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px hsl(var(--primary) / 0.4));
}

.gallery-empty-title {
  font-family: var(--serif);
  font-size: 20px;
  color: hsl(var(--foreground));
  margin: 0 0 6px;
}

.gallery-empty-desc {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  max-width: 440px;
  margin: 0 auto 20px;
}

/* ==========================================================================
   Responsive shadcn/ui Card Grid with Aspect Ratio 16/10 & Ambient Pip Glow
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.gallery-card {
  background: hsl(var(--card) / 0.88);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), 
              border-color 0.28s ease;
  cursor: pointer;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-pip-color, hsl(var(--secondary)));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.92), 
              0 0 30px var(--card-pip-glow, hsl(var(--primary) / 0.35));
}

/* Aspect Ratio 16/10 Container with Ambient Backlight Glow */
.gallery-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle, rgba(22, 20, 36, 0.92) 0%, rgba(8, 7, 14, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}

/* Ambient Backlight Glow Tinted by Card Mana Pip */
.gallery-card-pip-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle at center, var(--card-pip-color, #9333ea) 0%, transparent 72%);
  opacity: 0.32;
  filter: blur(28px);
  z-index: 1;
  transition: opacity 0.35s ease, filter 0.35s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-pip-glow {
  opacity: 0.75;
  filter: blur(22px);
}

.gallery-card-ambient {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.65) saturate(1.8);
  opacity: 0.4;
  z-index: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-ambient {
  opacity: 0.7;
}

.gallery-card-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.88);
  position: relative;
  z-index: 2;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.045);
}

.gallery-card-badges {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
}

.gallery-card-mana-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.gallery-card-zoom-badge {
  background: hsl(var(--card) / 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-pill);
  color: hsl(var(--secondary));
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.gallery-card:hover .gallery-card-zoom-badge {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card-info {
  padding: 14px 16px;
  border-top: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card) / 0.96);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.gallery-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gallery-card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: hsl(var(--mythic-gold-hi));
  margin: 0;
  line-height: 1.3;
}

.gallery-card-flavor {
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  color: hsl(var(--muted-foreground));
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Planeswalker Avatar System & Pixel Sprites
   ========================================================================== */
.avatar-sprite-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--primary) / 0.25) 0%, hsl(250 35% 8%) 75%);
  border: 1.5px solid hsl(var(--mythic-gold));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 10px hsl(var(--mythic-gold) / 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  vertical-align: middle;
}

.avatar-sprite-wrap:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px hsl(var(--secondary));
  border-color: #ffffff;
}

.avatar-sprite-wrap svg.pw-sprite {
  width: 32px;
  height: 44px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
}

.avatar-sprite-wrap.mini {
  width: 30px;
  height: 30px;
}
.avatar-sprite-wrap.mini svg.pw-sprite {
  width: 22px;
  height: 30px;
}

.avatar-sprite-wrap.large {
  width: 72px;
  height: 72px;
}
.avatar-sprite-wrap.large svg.pw-sprite {
  width: 52px;
  height: 72px;
}

.avatar-chip:hover .avatar-sprite-wrap {
  transform: scale(1.15);
  box-shadow: 0 0 16px hsl(var(--secondary));
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
}

.avatar-stack .avatar-sprite-wrap,
.avatar-stack .avatar-art-circle {
  margin-left: -10px;
  width: 28px;
  height: 28px;
  border: 1.5px solid #090810;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.avatar-stack .avatar-sprite-wrap svg.pw-sprite {
  width: 20px;
  height: 28px;
}

.avatar-stack .avatar-sprite-wrap:first-child,
.avatar-stack .avatar-art-circle:first-child {
  margin-left: 0;
}

.avatar-art-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid hsl(var(--mythic-gold));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 10px hsl(var(--mythic-gold) / 0.35);
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================================================
   Planeswalker Forge Modal (shadcn/ui Dialog Architecture)
   ========================================================================== */
.forge-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 8, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.forge-modal-card {
  width: 100%;
  max-width: 820px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.95), 0 0 45px hsl(var(--primary) / 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.forge-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(250 35% 8% / 0.9);
}

.forge-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.forge-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.forge-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  transition: color 0.2s;
}
.forge-close-btn:hover { color: hsl(var(--mythic-gold-hi)); }

.forge-body-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 680px) {
  .forge-body-grid {
    grid-template-columns: 1fr;
  }
}

.forge-preview-pane {
  background: hsl(250 35% 6% / 0.92);
  border-right: 1px solid hsl(var(--border) / 0.5);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.forge-pedestal {
  width: 150px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pedestal-rune-circle {
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, hsl(var(--primary) / 0.3) 0%, transparent 70%);
  border: 1.5px solid hsl(var(--primary) / 0.5);
  box-shadow: 0 0 20px hsl(var(--primary) / 0.4);
  animation: runePulse 3s ease-in-out infinite alternate;
}

@keyframes runePulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 8px hsl(var(--secondary))); }
}

.pedestal-sprite-stage {
  position: relative;
  z-index: 2;
}

.pedestal-sprite-stage svg.pw-sprite {
  width: 104px;
  height: 144px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.9));
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.forge-preview-info h3 {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-size: 18px;
  color: #ffffff;
}

.forge-controls-pane {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: hsl(var(--card) / 0.7);
}

.forge-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.forge-lbl {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: hsl(var(--mythic-gold));
}

.forge-select {
  padding: 8px 12px;
  background: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 14px;
}

.forge-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  color: hsl(var(--foreground));
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swatch-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: hsl(var(--secondary) / 0.5);
}

.swatch-btn.active {
  background: hsl(var(--primary) / 0.25);
  border-color: hsl(var(--secondary));
  color: #ffffff;
  box-shadow: 0 0 12px hsl(var(--secondary) / 0.3);
}

.swatch-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.swatch-icon {
  font-size: 14px;
}

.forge-footer {
  padding: 16px 26px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(250 35% 8% / 0.95);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   Rivalries Duel Bar
   ========================================================================== */
.duel-bar {
  height: 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  margin: 16px auto;
  max-width: 600px;
}

.duel-bar-a {
  background: linear-gradient(90deg, #f59e0b, #fde047);
  box-shadow: 0 0 12px hsl(var(--mythic-gold) / 0.5);
  transition: width 0.4s ease;
}

.duel-bar-dr {
  background: #64748b;
}

.duel-bar-b {
  background: linear-gradient(90deg, #06b6d4, #0284c7);
  box-shadow: 0 0 12px hsl(var(--secondary) / 0.5);
  transition: width 0.4s ease;
}

.score {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.score b {
  font-family: var(--serif);
  font-size: 24px;
  color: hsl(var(--mythic-gold-hi));
}

.score em {
  font-style: normal;
  color: hsl(var(--muted-foreground));
  margin: 0 8px;
}

/* ==========================================================================
   Message Board Posts
   ========================================================================== */
.post {
  padding: 18px 22px;
  background: hsl(var(--card) / 0.7);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  position: relative;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.post:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--card));
}

.post .del {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ==========================================================================
   Modern App Footer
   ========================================================================== */
.app-footer {
  margin-top: auto;
  padding: 40px 24px 30px;
  background: hsl(var(--card) / 0.95);
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-ornament i {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary)));
}

.footer-ornament i:last-child {
  background: linear-gradient(90deg, hsl(var(--primary)), transparent);
}

.footer-ornament span {
  color: hsl(var(--secondary));
  font-size: 18px;
  filter: drop-shadow(0 0 8px hsl(var(--secondary)));
}

.footer-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: hsl(var(--mythic-gold));
  margin-bottom: 4px;
}

.footer-motto {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 11px;
  color: hsl(var(--muted-foreground) / 0.7);
}

/* ==========================================================================
   Reality Fracture Utility Helper Classes
   ========================================================================== */
.text-planar-rift { color: hsl(var(--primary)) !important; }
.text-aether-cyan { color: hsl(var(--secondary)) !important; }
.text-mythic-gold { color: hsl(var(--mythic-gold)) !important; }
.text-cosmic-magenta { color: hsl(var(--cosmic-magenta)) !important; }
.border-planar-rift { border-color: hsl(var(--primary)) !important; }
.border-aether-cyan { border-color: hsl(var(--secondary)) !important; }
.bg-planar-void { background-color: hsl(var(--background)) !important; }
.bg-obsidian-card { background-color: hsl(var(--card)) !important; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .nav-status-badge {
    display: none;
  }
  .tabs-bar-wrap, .app-main-stage, main {
    padding: 0 16px;
  }
  .row {
    flex-direction: column;
    gap: 10px;
  }
}


/* ==========================================================================
   BIG-SCREEN LIVE TOURNAMENT VIEW (1080p / 4K OPTIMIZED & 10-FOOT UI)
   Requirement R5 & Milestone M4
   ========================================================================== */

/* Fullscreen Overlay Container */
.scryhard-bigscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: hsl(var(--background));
  background-image: 
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(147, 51, 234, 0.22) 0%, transparent 70%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 15% 95%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  color: hsl(var(--foreground));
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* 2D Particle Canvas */
.bigscreen-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100000;
}

/* Fullscreen Planar Warp Flash FX */
.planar-rift-warp-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.75) 0%, rgba(6, 182, 212, 0.5) 45%, rgba(236, 72, 153, 0.4) 75%, transparent 100%);
  mix-blend-mode: screen;
}

.planar-rift-warp-fx.active {
  animation: planarRiftWarp 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes planarRiftWarp {
  0% {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(0px) hue-rotate(0deg);
  }
  30% {
    opacity: 0.92;
    transform: scale(1.04);
    filter: blur(10px) hue-rotate(90deg) saturate(2.2);
  }
  65% {
    opacity: 0.6;
    transform: scale(1.01);
    filter: blur(4px) hue-rotate(180deg) saturate(1.8);
  }
  100% {
    opacity: 0;
    transform: scale(1);
    filter: blur(0px) hue-rotate(360deg);
  }
}

/* Round Advance Announcement Banner */
.round-announce-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  background: rgba(7, 6, 13, 0.85);
  backdrop-filter: blur(16px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.round-announce-banner.banner-show {
  opacity: 1;
}

.round-announce-banner.banner-fade {
  opacity: 0;
}

.round-announce-content {
  text-align: center;
  padding: 40px 60px;
  background: radial-gradient(ellipse at center, rgba(30, 24, 52, 0.95) 0%, rgba(12, 10, 22, 0.98) 100%);
  border: 2px solid hsl(var(--mythic-gold));
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(147, 51, 234, 0.6), 0 0 100px rgba(245, 158, 11, 0.4);
  transform: scale(0.95);
  animation: bannerScaleIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes bannerScaleIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.round-announce-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  margin: 0 0 8px;
  text-shadow: 0 0 24px rgba(253, 224, 71, 0.8), 0 0 45px rgba(245, 158, 11, 0.6);
}

.round-announce-sub {
  font-family: var(--sans);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 700;
  letter-spacing: 4px;
  color: hsl(var(--secondary));
  text-shadow: 0 0 16px rgba(6, 182, 212, 0.8);
  margin: 0;
}

/* Big Screen Frame Container */
.bigscreen-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
}

/* Top HUD (10-Foot Legibility Header) */
.bigscreen-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: hsl(var(--card) / 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7);
  z-index: 10;
  flex-shrink: 0;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-emblem {
  font-size: 28px;
  filter: drop-shadow(0 0 10px hsl(var(--primary)));
}

.hud-title {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  margin: 0 0 4px;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.hud-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-format-badge {
  background: hsl(var(--primary) / 0.25);
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--primary) / 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hud-round-badge {
  background: hsl(var(--secondary) / 0.25);
  color: hsl(var(--secondary));
  border: 1px solid hsl(var(--secondary) / 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Center HUD: Countdown Clock & Progress */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.hud-clock-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-display {
  font-family: var(--mono);
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(6, 182, 212, 0.5);
  min-width: 130px;
  text-align: center;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.clock-display.timer-warning {
  color: hsl(var(--destructive));
  text-shadow: 0 0 24px rgba(239, 68, 68, 0.85);
  animation: timerWarningPulse 1s infinite alternate ease-in-out;
}

@keyframes timerWarningPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.3); }
}

.clock-controls {
  display: flex;
  gap: 6px;
}

.clock-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.clock-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: hsl(var(--secondary) / 0.5);
}

.hud-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
  gap: 3px;
}

.hud-progress-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  letter-spacing: 1px;
}

.hud-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hud-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 50%, #10b981 100%);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.7);
  transition: width 0.45s ease;
}

/* Right HUD: Controls & Exit */
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.hud-sound-toggle {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.hud-sound-toggle.muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

.hud-sound-toggle:hover {
  filter: brightness(1.2);
}

.hud-fs-toggle {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.hud-fs-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: hsl(var(--secondary) / 0.5);
}

.hud-exit-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
}

/* Main Split-Screen Stage */
.bigscreen-stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  padding: 24px 28px;
  flex: 1;
  overflow: hidden;
  box-sizing: border-box;
}

.bigscreen-col-left, .bigscreen-col-right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: hsl(var(--card) / 0.7);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.col-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.col-header h2 {
  font-family: var(--serif);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.col-sub {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* Pairings Column */
.bigscreen-pairings {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

/* Big Screen Table Card (10-Foot Distance) */
.bigscreen-table-card {
  background: hsl(var(--card) / 0.95);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.bigscreen-table-card.match-in-play {
  border-color: hsl(var(--secondary) / 0.7);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2), inset 0 0 12px rgba(6, 182, 212, 0.05);
}

.bigscreen-table-card.match-done {
  border-color: rgba(16, 185, 129, 0.4);
  opacity: 0.88;
}

.bigscreen-table-card.match-bye {
  border-color: hsl(var(--mythic-gold) / 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(14, 12, 24, 0.95) 100%);
}

.table-card-cascade {
  animation: tableCascadeIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes tableCascadeIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.table-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-number {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: hsl(var(--mythic-gold-hi));
}

.match-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
}

/* Match Competitors Row */
.table-duel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.player-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.player-side.side-b {
  justify-content: flex-end;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name {
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 700;
  color: #ffffff;
}

.duel-vs-divider {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  padding: 0 8px;
}

/* Tactile Win Pip Buttons */
.pip-counter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tactile-pip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.tactile-pip:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.1);
}

.tactile-pip:active {
  transform: scale(0.92);
}

.tactile-pip.active {
  background: #10b981;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.85);
}

.score-indicator {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  padding: 0 4px;
}

/* Quick Action Presets Row */
.table-presets-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.preset-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-pill:hover {
  background: hsl(var(--primary) / 0.25);
  border-color: hsl(var(--secondary));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.preset-pill:active {
  transform: translateY(0);
}

/* Winner Avatar Golden Aura Pulse */
@keyframes winnerAuraPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.9), 0 0 25px rgba(245, 158, 11, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 35px 12px rgba(253, 224, 71, 0.95), 0 0 70px 20px rgba(245, 158, 11, 0.85);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 20px 4px rgba(245, 158, 11, 0.5), 0 0 30px rgba(245, 158, 11, 0.3);
    transform: scale(1.05);
  }
}

.winner-aura-glow, .winner-glow {
  animation: winnerAuraPulse 1.4s ease-out forwards;
  border-radius: 50%;
  position: relative;
  z-index: 5;
}

/* Standings Leaderboard Column */
.bigscreen-standings-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  background: hsl(var(--card) / 0.6);
}

.bigscreen-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.bigscreen-table th {
  background: hsl(var(--muted) / 0.7);
  padding: 12px 14px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: hsl(var(--mythic-gold));
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 2;
}

.bigscreen-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.bigscreen-table tr.leader td {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, transparent 80%);
}

.bigscreen-table tr.row-updated-flash td {
  animation: rowUpdatedFlash 1.2s ease-out;
}

@keyframes rowUpdatedFlash {
  0% { background-color: rgba(6, 182, 212, 0.35); }
  100% { background-color: transparent; }
}

.bigscreen-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.04);
}

.bigscreen-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.bs-action-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
}

.bs-action-btn#bsPairNextBtn.ready-pulse {
  animation: pairReadyPulse 1.6s infinite ease-in-out;
}

@keyframes pairReadyPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    border-color: hsl(var(--secondary));
  }
  70% {
    box-shadow: 0 0 25px 8px rgba(6, 182, 212, 0);
    border-color: #38bdf8;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
}

.bs-status-msg {
  margin-top: 8px;
  font-size: 13px;
  min-height: 20px;
  color: hsl(var(--muted-foreground));
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .bigscreen-stage {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .bigscreen-hud {
    flex-wrap: wrap;
    gap: 12px;
  }
  .bigscreen-col-left, .bigscreen-col-right {
    overflow: visible;
  }
}

/* ==========================================================================
   Big Screen Bye Section
   ========================================================================== */
.bs-bye-section {
  margin: 12px 0 4px;
  padding: 12px 16px;
  background: linear-gradient(135deg, hsl(var(--mythic-gold) / 0.12), hsl(var(--primary) / 0.08));
  border: 1px solid hsl(var(--mythic-gold) / 0.45);
  border-radius: var(--radius);
  animation: byePulse 3s ease-in-out infinite alternate;
}

@keyframes byePulse {
  0%   { box-shadow: 0 0 0 0 hsl(var(--mythic-gold) / 0); }
  100% { box-shadow: 0 0 14px 2px hsl(var(--mythic-gold) / 0.22); }
}

.bye-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bye-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bye-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: 0.03em;
}

.bye-label {
  font-size: 11px;
  color: hsl(var(--mythic-gold));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.bye-badge {
  background: hsl(var(--mythic-gold) / 0.2) !important;
  color: hsl(var(--mythic-gold)) !important;
  border-color: hsl(var(--mythic-gold) / 0.5) !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 11px;
  padding: 4px 10px;
}

/* ==========================================================================
   Spell-Cast Victory & Defeated Avatar Animations
   ========================================================================== */

/* Winner glows gold and surges forward with a casting pose */
@keyframes spellCastWinner {
  0%   { transform: scale(1) translateX(0) rotate(0deg); filter: drop-shadow(0 0 0px transparent); }
  15%  { transform: scale(1.18) translateX(10px) rotate(-6deg); filter: drop-shadow(0 0 18px #f59e0b) drop-shadow(0 0 36px #9333ea); }
  35%  { transform: scale(1.22) translateX(16px) rotate(-8deg); filter: drop-shadow(0 0 28px #f59e0b) drop-shadow(0 0 55px #06b6d4); }
  60%  { transform: scale(1.1) translateX(8px) rotate(-3deg); filter: drop-shadow(0 0 14px #f59e0b); }
  100% { transform: scale(1) translateX(0) rotate(0deg); filter: drop-shadow(0 0 0px transparent); }
}

/* Loser tips backward and falls, fading out in defeat */
@keyframes avatarDefeated {
  0%   { transform: scale(1) rotate(0deg) translateY(0); opacity: 1; filter: grayscale(0); }
  20%  { transform: scale(0.95) rotate(8deg) translateY(-4px); opacity: 0.9; }
  45%  { transform: scale(0.88) rotate(35deg) translateY(6px); opacity: 0.7; filter: grayscale(0.5); }
  70%  { transform: scale(0.8) rotate(70deg) translateY(14px); opacity: 0.45; filter: grayscale(0.85); }
  100% { transform: scale(0.75) rotate(90deg) translateY(20px); opacity: 0.22; filter: grayscale(1); }
}

/* Spell projectile flying from winner to loser */
@keyframes spellProjectile {
  0%   { transform: translateX(0) scale(1); opacity: 1; }
  60%  { transform: translateX(var(--spell-travel, 80px)) scale(1.3); opacity: 1; }
  100% { transform: translateX(calc(var(--spell-travel, 80px) * 1.15)) scale(0.4); opacity: 0; }
}

/* Loser card border flash red on defeat */
@keyframes defeatFlash {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  30%  { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.8), 0 0 30px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.avatar-spell-cast {
  animation: spellCastWinner 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.avatar-defeated {
  animation: avatarDefeated 1.1s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.bigscreen-table-card.defeat-flash {
  animation: defeatFlash 0.8s ease-out;
}

/* The spell projectile element (injected dynamically, position:fixed set inline) */
.spell-projectile {
  pointer-events: none;
  font-size: 28px;
  z-index: 9999;
  animation: spellProjectile 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
  filter: drop-shadow(0 0 12px #9333ea) drop-shadow(0 0 24px #06b6d4);
}

/* ==========================================================================
   Reality Fracture Field Guide & Infographic Styles
   ========================================================================== */
.setguide-hero-card {
  background: linear-gradient(135deg, hsl(var(--card) / 0.95), hsl(var(--card) / 0.75));
  border: 1px solid hsl(var(--primary) / 0.35);
  position: relative;
  overflow: hidden;
}

.setguide-badge-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.setguide-infographic-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  background: #030206;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.setguide-infographic-wrap:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary));
  box-shadow: 0 15px 40px rgba(147, 51, 234, 0.25);
}

.setguide-infographic-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.infographic-expand-pill {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(14, 11, 22, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--primary) / 0.6);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.archetypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.archetype-card {
  background: hsl(var(--card) / 0.75);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.2s ease;
}

.archetype-card:hover {
  background: hsl(var(--card) / 0.95);
  border-color: hsl(var(--secondary) / 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.arch-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arch-mana {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.arch-title {
  font-family: var(--display);
  font-size: 16px;
  color: hsl(var(--foreground));
}

.arch-desc {
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.arch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.arch-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border));
  padding: 2px 8px;
  border-radius: 999px;
  color: hsl(var(--foreground));
}

.chase-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.chase-card {
  background: hsl(var(--card) / 0.85);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.chase-rank {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: hsl(var(--mythic-gold));
  margin-bottom: 4px;
}

.chase-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.chase-badge.mythic {
  background: rgba(211, 90, 37, 0.25);
  color: #ff7b47;
  border: 1px solid rgba(211, 90, 37, 0.6);
}

.chase-badge.rare {
  background: rgba(225, 175, 45, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(225, 175, 45, 0.5);
}

.chase-name {
  font-family: var(--display);
  font-size: 15px;
  margin: 0 0 4px;
  color: #ffffff;
}

.chase-meta {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.chase-desc {
  font-size: 12px;
  color: hsl(var(--foreground));
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   Planeswalker Nemesis Matrix Table
   ========================================================================== */
.nemesis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: center;
}

.nemesis-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  font-family: var(--display);
  font-size: 12px;
  border: 1px solid hsl(var(--border));
}

.nemesis-table td {
  padding: 8px 6px;
  border: 1px solid hsl(var(--border));
}

.nemesis-row-header {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
}

.nemesis-self {
  background: rgba(0, 0, 0, 0.35);
  color: hsl(var(--muted-foreground));
}

.nemesis-cell-win {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.nemesis-cell-loss {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.nemesis-cell-even {
  color: hsl(var(--foreground));
}

/* ==========================================================================
   Mobile MTG Companion 2-Player Split Life Tracker & Dice Roller
   ========================================================================== */
.lifetracker-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lifetracker-container {
  width: 100vw;
  height: 100vh;
  max-width: 540px;
  background: #07060b;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.lifetracker-player {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-2-side {
  transform: rotate(180deg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-1-side {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lt-player-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.lt-art-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: saturate(1.2) contrast(1.1);
}

.lt-overlay-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 8, 16, 0.4) 0%, rgba(5, 4, 8, 0.9) 100%);
}

.lt-name-bar {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.lt-player-title {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lt-life-stage {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.lt-touch-btn {
  width: 32%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lt-touch-btn:active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lt-number-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lt-life-display {
  font-family: var(--mono);
  font-size: clamp(86px, 24vw, 120px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
  user-select: none;
}

.lt-delta-float {
  position: absolute;
  top: -24px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
}

.lt-delta-float.show {
  opacity: 1;
  transform: translateY(-8px);
}

.lt-delta-float.pos {
  color: #34d399;
}

.lt-delta-float.neg {
  color: #f87171;
}

.lt-side-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.lt-tool-btn {
  background: rgba(15, 14, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  min-width: 58px;
  transition: all 0.15s ease;
}

.lt-tool-btn:active {
  transform: scale(0.95);
  border-color: hsl(var(--primary));
}

.lt-tool-icon {
  font-size: 16px;
}

.lt-tool-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

.lt-badge {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.lifetracker-center-hub {
  height: 48px;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 20;
}

.lt-hub-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.lt-spark-hub {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lt-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

.lt-dice-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 11, 24, 0.95);
  border: 2px solid hsl(var(--mythic-gold));
  border-radius: var(--radius-md);
  padding: 16px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.4);
  z-index: 50;
  animation: tableCascadeIn 0.25s ease-out;
}

.lt-dice-val {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
}
