@font-face{
  font-family:'CreepsterLocal';
  src:url('../assets/fonts/Creepster-Regular.ttf') format('truetype');
}

/* -----------------------------------------
   THEME VARIABLES (Mood Toggle will swap these)
----------------------------------------- */
:root{
  --neon: #15ff00;

  /* Accent as RGB so we can reuse with alpha */
  --accentRgb: 255, 60, 120;      /* Blood Moon default */
  --accentText: rgba(255, 209, 223, 0.92);

  /* Controls */
  --fogOpacity: 0.22;              /* ✅ less red haze */
  --panelOpacity: 0.76;            /* ✅ more HUD-like */
  --tabRailOpacity: 0.62;          /* ✅ darker backdrop behind tabs */

  /* background grading */
  --gradeTop: rgba(0,0,0,0.52);
  --gradeBottom: rgba(0,0,0,0.80);

  /* ✅ IMAGE PATHS (edit these if filenames differ) */
  --altarImg: url('../assets/backgrounds/matches/altar-landscape.png');

  /* Replace heart moon with tarot cards */
  --tarot1Img: url('../assets/backgrounds/matches/tarot-1.png');
  --tarot2Img: url('../assets/backgrounds/matches/tarot-2.png');
  /* optional third card */
  --tarot3Img: url('../assets/backgrounds/matches/tarot-3.png');

  /* Fog image (non-tiling) */
  --fogImg:   url('../assets/backgrounds/matches/crimson-fog.png');

  /* Sigil behind the card panel (transparent PNG recommended) */
  --sigilImg: url('../assets/backgrounds/matches/sigil-circle.png');
}

/* -----------------------------------------
   OPTIONAL THEME CLASSES (Mood Toggle uses these)
----------------------------------------- */
body.theme-blood{
  --accentRgb: 255, 60, 120;
  --accentText: rgba(255, 209, 223, 0.92);
  --fogOpacity: 0.22;
  --panelOpacity: 0.76;
}
body.theme-grave{
  --accentRgb: 70, 235, 255;      /* cyan/ice */
  --accentText: rgba(200, 255, 255, 0.92);
  --fogOpacity: 0.16;             /* colder, less haze */
  --panelOpacity: 0.78;
}
body.theme-gold{
  --accentRgb: 255, 190, 90;      /* ember/gold */
  --accentText: rgba(255, 236, 205, 0.92);
  --fogOpacity: 0.18;
  --panelOpacity: 0.78;
}

:root{
  --neon: #15ff00;

  /* default theme values (blood as default) */
  --uiText: #ffd1df;
  --uiBorder: rgba(255,60,120,0.35);
  --uiGlow: rgba(255,60,120,0.20);

  --panelBg: rgba(0,0,0,0.70);
  --panelBorder: rgba(255,60,120,0.22);

  --roomImg:  url('../assets/backgrounds/matches/rooms/blood/room.png');
  --fogImg:   url('../assets/backgrounds/matches/rooms/blood/fog.png');
  --sigilImg: url('../assets/backgrounds/matches/rooms/blood/sigil.png');

  --tarot1: url('../assets/backgrounds/matches/rooms/blood/tarot1.png');
  --tarot2: url('../assets/backgrounds/matches/rooms/blood/tarot2.png');
  --tarot3: url('../assets/backgrounds/matches/rooms/blood/tarot3.png');

  --embersImg: url('../assets/backgrounds/matches/rooms/blood/embers.png');

  /* fog strength per theme */
  --fogOpacity: 0.28;
}

body[data-theme="blood"]{
  --uiText: #ffd1df;
  --uiBorder: rgba(255,60,120,0.35);
  --uiGlow: rgba(255,60,120,0.20);
  --panelBg: rgba(0,0,0,0.70);
  --panelBorder: rgba(255,60,120,0.22);
  --fogOpacity: 0.28;

  --roomImg:  url('../assets/backgrounds/matches/rooms/blood/room.png');
  --fogImg:   url('../assets/backgrounds/matches/rooms/blood/fog.png');
  --sigilImg: url('../assets/backgrounds/matches/rooms/blood/sigil.png');
  --tarot1: url('../assets/backgrounds/matches/rooms/blood/tarot1.png');
  --tarot2: url('../assets/backgrounds/matches/rooms/blood/tarot2.png');
  --tarot3: url('../assets/backgrounds/matches/rooms/blood/tarot3.png');
  --embersImg: url('../assets/backgrounds/matches/rooms/blood/embers.png');
}

body[data-theme="grave"]{
  /* “men-leaning” = colder, steel/green, more game-hud */
  --uiText: #d7f6ff;
  --uiBorder: rgba(120,220,255,0.28);
  --uiGlow: rgba(120,220,255,0.16);
  --panelBg: rgba(0,0,0,0.78);
  --panelBorder: rgba(120,220,255,0.22);
  --fogOpacity: 0.18;

  --roomImg:  url('../assets/backgrounds/matches/rooms/grave/room.png');
  --fogImg:   url('../assets/backgrounds/matches/rooms/grave/fog.png');
  --sigilImg: url('../assets/backgrounds/matches/rooms/grave/sigil.png');
  --tarot1: url('../assets/backgrounds/matches/rooms/grave/tarot1.png');
  --tarot2: url('../assets/backgrounds/matches/rooms/grave/tarot2.png');
  --tarot3: url('../assets/backgrounds/matches/rooms/grave/tarot3.png');
  --embersImg: url('../assets/backgrounds/matches/rooms/grave/embers.png');
}

body[data-theme="gold"]{
  /* neutral “artifact” vibe */
  --uiText: #ffe9b8;
  --uiBorder: rgba(255,200,90,0.30);
  --uiGlow: rgba(255,200,90,0.16);
  --panelBg: rgba(0,0,0,0.74);
  --panelBorder: rgba(255,200,90,0.20);
  --fogOpacity: 0.22;

  --roomImg:  url('../assets/backgrounds/matches/rooms/gold/room.png');
  --fogImg:   url('../assets/backgrounds/matches/rooms/gold/fog.png');
  --sigilImg: url('../assets/backgrounds/matches/rooms/gold/sigil.png');
  --tarot1: url('../assets/backgrounds/matches/rooms/gold/tarot1.png');
  --tarot2: url('../assets/backgrounds/matches/rooms/gold/tarot2.png');
  --tarot3: url('../assets/backgrounds/matches/rooms/gold/tarot3.png');
  --embersImg: url('../assets/backgrounds/matches/rooms/gold/embers.png');
}

/* -----------------------------------------
   BASE
----------------------------------------- */
html, body{
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overflow-x:hidden;
  margin:0
}

/* base black belongs on html */
html{ background:#000; }

body{
  display:flex;flex-direction:column;min-height:100vh;
  font-family:'CreepsterLocal',cursive;
  color:var(--neon);
  text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;
  background: transparent;
  position: relative;
}

/* Force UI above background layers */
body > header, body > main, body {
  position: relative !important;
  z-index: 50 !important;
}

/* keep header readable */
body > header{
  background: rgba(0,0,0,0.92) !important;
  backdrop-filter: blur(8px);
}

/* -----------------------------------------
   CINEMATIC BACKGROUND LAYERS
----------------------------------------- */

/* Base altar + cinematic grade */
body::before{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.10) 40%, rgba(0,0,0,0.88) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.78)),
    var(--roomImg);
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
  z-index:-4;
  pointer-events:none;
}

/* Fog + embers (combined in one layer so we don't add more pseudo-elements) */
body::after{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.00) 60%, rgba(0,0,0,0.35) 100%),
    var(--roomImg);
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
  z-index:-4;
  pointer-events:none;
}

/* -----------------------------------------
   HERO OVERLAY: FLOATING TAROT CARDS (2–3)
   (behind UI, above background)
----------------------------------------- */
.deck-wrap{width:100%;max-width:980px;margin:0 auto;position:relative}

/* Card 1 */
.deck-wrap::before{
  content:"";
  position:fixed; inset:0;
  background: var(--tarot1Img);
  background-repeat:no-repeat;
  background-position: 18% 28%;
  background-size: clamp(180px, 18vw, 280px);
  opacity: 0.22;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55));
  transform: rotate(-6deg);
  animation: tarotFloat1 14s ease-in-out infinite;
  z-index: 1;           /* below UI (UI is 50), above bg (-4/-2) */
  pointer-events:none;
}

/* Card 2 + optional Card 3 via multi-bg */
.deck-wrap::after{
  content:"";
  position:fixed; inset:0;
  background:
    var(--tarot2Img),
    var(--tarot3Img);
  background-repeat:no-repeat,no-repeat;
  background-position: 78% 34%, 70% 78%;
  background-size: clamp(190px, 20vw, 300px), clamp(150px, 16vw, 240px);
  opacity: 0.20;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55));
  transform: rotate(7deg);
  animation: tarotFloat2 16s ease-in-out infinite;
  z-index: 1;
  pointer-events:none;
}

/* -----------------------------------------
   HEADER / NAV
----------------------------------------- */
header{
  background:#000;display:flex;justify-content:space-between;align-items:center;padding:10px 20px;
}
header .logo{font-size:1.5em;color:#a0ff00;font-weight:bold}
nav a{
  color:#fff;margin:0 10px;text-decoration:none;background:#111;padding:6px 12px;border-radius:10px;border:2px solid #5eff7e;
}

/* Moon badge */
.moon-badge{
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 60;
  display:flex; gap:10px; align-items:center;
  padding:8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(var(--accentRgb),0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}
.moon-ico{filter: drop-shadow(0 0 10px rgba(var(--accentRgb),0.35))}
.moon-txt{color:var(--accentText); text-shadow:none; font-family: system-ui, sans-serif; font-size: 12px; letter-spacing: .2px}

/* User menu */
.user-menu{position:relative;cursor:pointer}

.user-menu.open .dropdown{display:flex;flex-direction:column}
.user-menu .dropdown a{padding:10px;color:var(--neon);text-decoration:none;border-bottom:1px solid #222}
.user-menu .dropdown a:last-child{border-bottom:none}
.user-menu .dropdown a:hover{background:#333;color:#fff}

/* Avatar */
.avatar-btn{
  background:none;border:none;padding:0;margin:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;
}
.avatar-btn img, .user-menu img{
  width:40px;height:40px;border-radius:50%;
  border:2px solid var(--neon);
  object-fit:cover;
}
.avatar-btn:focus,.avatar-btn:active{outline:none;background:none}

/* Footer */
footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
}

:root{
  --footerH: 64px; /* adjust to match your footer height */
}

main{
  padding-bottom: calc(var(--footerH) + 24px);
}

/* extra safety if anything else can reach the bottom */
body{
  padding-bottom: calc(var(--footerH) + 24px);
}

/* Layout */
main{flex:1 0 auto;display:flex;justify-content:center;align-items:flex-start;padding:30px}

/* -----------------------------------------
   TABS: ✅ higher contrast + darker rail
----------------------------------------- */
.matches-tabs{
  display:flex; gap:10px;
  max-width:760px;
  margin: 0 auto 12px auto;
  padding: 10px;
  border-radius: 16px;
  background: rgba(0,0,0,var(--tabRailOpacity));
  border: 1px solid rgba(var(--accentRgb),0.22);
  box-shadow: 0 14px 44px rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}

.tab{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border: 1px solid rgba(var(--accentRgb),0.40); /* ✅ stronger */
  background: rgba(0,0,0,0.55);                  /* ✅ darker */
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.tab:hover{
  border-color: rgba(var(--accentRgb),0.60);
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
}

.tab.active{
  border-color: rgba(var(--accentRgb),0.85);
  background: rgba(var(--accentRgb),0.14);
  box-shadow: 0 0 0 1px rgba(var(--accentRgb),0.35) inset, 0 12px 32px rgba(0,0,0,0.55);
}

/* -----------------------------------------
   CARD PANEL: ✅ more HUD pop + sigil stamp
----------------------------------------- */
.card-panel{
  background: var(--panelBg);
  border: 2px solid var(--panelBorder);
}
.tab{
  border: 1px solid var(--uiBorder);
  color: var(--uiText);
}

/* Sigil stamp behind content */
.card-panel::after{
  content:"";
  position:absolute; inset:-10%;
  background: var(--sigilImg);
  background-repeat:no-repeat;
  background-position: center;
  background-size: min(520px, 80%);
  opacity: 0.10; /* faint */
  filter: blur(0.2px);
  mix-blend-mode: screen;
  pointer-events:none;
  z-index:0;
}

/* Ritual reveal overlay (kept, but tuned to theme) */
.card-panel::before{
  content:"";
  position:absolute; inset:-30%;
  background:
    radial-gradient(circle at 65% 15%, rgba(var(--accentRgb),0.14), transparent 45%),
    radial-gradient(circle at 40% 60%, rgba(var(--accentRgb),0.10), transparent 55%);
  filter: blur(12px);
  opacity: .9;
  animation: fogDrift 16s linear infinite;
  pointer-events:none;
  z-index:1;
}

/* Ensure content stays above sigil/glow */
.ritual-top, .photo, .meta, .actions { position:relative; z-index:2; }

/* Ritual header */
.ritual-top{text-align:center; margin-bottom:10px}
.prompt{
  margin: 0 0 4px 0;
  font-size:1.35rem;
  letter-spacing: .6px;
  color:var(--accentText);
  text-shadow: 0 0 16px rgba(var(--accentRgb),0.20), -1px -1px 0 #000, 1px 1px 0 #000;
}
.ritual-sub{
  margin:0;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  text-shadow:none;
}

/* Photo */
.photo{
  display:flex;justify-content:center;align-items:center;
  margin:10px auto 12px auto;
  width: clamp(180px, 50vw, 340px);
}
.photo img{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(var(--accentRgb),0.55);
  box-shadow: 0 10px 26px rgba(0,0,0,0.55);
  transition: filter .2s ease, transform .2s ease;
}

/* Meta */
.meta{text-align:center;margin:6px 0 10px 0}
.meta h3{margin:6px 0 4px 0;color:rgba(var(--accentRgb),0.92)}
.meta .line{margin:0 0 6px 0}
.compat{margin:8px 0 0 0; color:var(--accentText); text-shadow:none; font-family: system-ui, sans-serif; font-size: 12px}

/* Bond meter */
.bond{margin:10px 0 10px 0}
.bond-row{
  display:flex; justify-content:space-between; align-items:center;
  max-width: 420px; margin: 0 auto 8px auto;
  font-family: system-ui, sans-serif;
  color:var(--accentText);
  text-shadow:none;
  font-size: 12px;
}
.bond-bar{
  position:relative;
  height: 12px;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(var(--accentRgb),0.25);
  overflow:hidden;
}
.bond-fill{
  height:100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(var(--accentRgb),0.20), rgba(var(--accentRgb),0.78));
  transition: width .25s ease;
}
.bond-fog{
  position:absolute; inset:-40%;
  background: radial-gradient(circle at 40% 60%, rgba(var(--accentRgb),0.18), transparent 60%);
  filter: blur(10px);
  animation: fogDrift 14s linear infinite;
  opacity: 0.8;
}

/* Veil */
.veil{margin-top:10px}
.veil-btn{
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(0,0,0,0.35);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}
.veil-btn:active{transform: translateY(1px)}
.veil-hint{
  margin:6px 0 0 0;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  text-shadow:none;
}

/* Bio teaser */
.bio-teaser{
  margin:10px auto 0 auto;
  max-width: 520px;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  text-shadow:none;
}

/* Pickup */
.pickup{margin-top:12px}
.pickup-btn{
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(0,0,0,0.35);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}
.pickup-box{
  margin:10px auto 0 auto;
  max-width: 520px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.25);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
}
.pickup-text{
  margin:0 0 10px 0;
  font-family: system-ui, sans-serif;
  color:var(--accentText);
  text-shadow:none;
}
.pickup-copy{
  padding:8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(var(--accentRgb),0.12);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}

/* Row for Reveal / View Profile / Summon a Line */
.sub-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* Make them behave like the main action buttons */
.sub-actions .veil-btn,
.sub-actions .view-btn,
.sub-actions .pickup-btn{
  margin: 0 !important;          /* overrides old margins */
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align:center;
  line-height: 1.1;
}

/* <a> needs button-like flex behavior */
.sub-actions .view-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

/* Mobile: stack nicely */
@media (max-width:768px){
  .sub-actions{
    flex-direction: column;
    gap:10px;
  }
  .sub-actions .veil-btn,
  .sub-actions .view-btn,
  .sub-actions .pickup-btn{
    width:100%;
    max-width: 340px;
  }
}

/* Actions */
.actions{
  display:flex;gap:14px;justify-content:center;align-items:center;margin:14px 0 6px;
}
.btn{
  min-width:140px;padding:10px 14px;border-radius:14px;border:1px solid rgba(255,255,255,0.55);
  cursor:pointer;font-weight:700;
  box-shadow: 0 10px 24px rgba(0,0,0,0.55);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
  background: rgba(255,255,255,0.85);
  color:#111;
}
.btn:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(0,0,0,0.65)}
.btn.yes{border-color: rgba(var(--accentRgb),0.85)}
.btn.no{border-color:#ff4444}
.btn.maybe{border-color:#f0c040}
.btn.yes:hover{background: rgba(var(--accentRgb),0.90); color:#120007}
.btn.no:hover{background:#ff4444;color:#fff}
.btn.maybe:hover{background:#f0c040;color:#111}

.microcopy{
  margin: 10px 0 0 0;
  text-align:center;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  text-shadow:none;
}

/* Status colors */
.status.online{color:#00ff00}
.status.recent{color:#ffff00}
.status.ghosted{color:#888}

.view-btn{
  display:inline-block;margin-top:10px;padding:8px 12px;background:#111;color:var(--neon);
  font-weight:bold;border:1px solid rgba(var(--accentRgb),0.35);
  border-radius:12px;text-decoration:none
}
.view-btn:hover{background: rgba(var(--accentRgb),0.20); color:var(--accentText); border-color: rgba(var(--accentRgb),0.55)}

/* Altar panel */
.altar-panel{
  max-width:760px;margin:0 auto;
  background: rgba(0,0,0,0.70);
  border:2px solid rgba(var(--accentRgb),0.22);
  border-radius:16px;
  padding:14px;
  box-shadow:0 14px 44px rgba(0,0,0,0.55);
  backdrop-filter: blur(7px);
}
.altar-title{margin:0 0 4px 0; color:var(--accentText); text-shadow:none}
.altar-sub{
  margin:0 0 12px 0;
  font-family: system-ui, sans-serif;
  color: rgba(255,255,255,0.72);
  text-shadow:none;
  font-size: 12px;
}
.altar-list{display:flex; flex-direction:column; gap:10px}
.altar-item{
  display:flex; gap:10px; align-items:center;
  padding:10px;
  border-radius:14px;
  background: rgba(0,0,0,0.35);
  border:1px solid rgba(var(--accentRgb),0.25);
}
.altar-item img{
  width:56px; height:56px; border-radius:14px; object-fit:cover;
  border:1px solid rgba(var(--accentRgb),0.35);
}
.altar-info{flex:1}
.altar-name{margin:0; color:var(--accentText); text-shadow:none}
.altar-line{
  margin:4px 0 0 0;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  text-shadow:none;
}
.altar-actions{display:flex; gap:8px}
.altar-actions button{
  padding:8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(var(--accentRgb),0.10);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}
.altar-empty{
  margin: 12px 0 0 0;
  font-family: system-ui, sans-serif;
  color: rgba(255,255,255,0.70);
  text-shadow:none;
}

/* Fallback */
.fallback{max-width:760px;margin:16px auto;text-align:center;background:#000;border:2px solid #5eff7e;border-radius:12px;padding:12px}
.hidden{display:none!important}

/* Decision animations */
.card-panel.anim-like{animation: pact 220ms ease forwards}
.card-panel.anim-pass{animation: banish 220ms ease forwards}
.card-panel.anim-maybe{animation: haunt 220ms ease forwards}

@keyframes pact{
  0%{transform:translateY(0) scale(1); filter: saturate(1)}
  100%{transform:translateY(-6px) scale(1.02); filter: saturate(1.4)}
}
@keyframes banish{
  0%{transform:translateX(0) rotate(0deg); opacity:1}
  100%{transform:translateX(-16px) rotate(-2deg); opacity:0.0}
}
@keyframes haunt{
  0%{transform:translateY(0); opacity:1; filter: blur(0)}
  100%{transform:translateY(10px); opacity:0.0; filter: blur(2px)}
}

/* Modal */
.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.65);
  display:flex; align-items:center; justify-content:center;
  z-index: 9999;
}
.modal-card{
  width:min(520px, 92vw);
  border-radius: 18px;
  padding: 16px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(var(--accentRgb),0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  position:relative;
}
.modal-title{margin:0 0 4px 0; color:var(--accentText); text-shadow:none}
.modal-sub{
  margin:0 0 12px 0;
  font-family: system-ui, sans-serif;
  color: rgba(255,255,255,0.72);
  text-shadow:none;
  font-size: 12px;
}
.offer-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
.offer{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(var(--accentRgb),0.10);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}
.offer:hover{background: rgba(var(--accentRgb),0.18)}
.modal-x{
  position:absolute; top:10px; right:10px;
  border:none; background:transparent; color:var(--accentText);
  font-size: 18px; cursor:pointer;
}
.offer-result{
  margin-top:12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.25);
  background: rgba(0,0,0,0.35);
}
.offer-msg{
  margin:0 0 10px 0;
  font-family: system-ui, sans-serif;
  color:var(--accentText);
  text-shadow:none;
}
.offer-actions{display:flex; gap:10px}
.offer-copy,.offer-close{
  padding:10px 12px;border-radius: 14px;
  border: 1px solid rgba(var(--accentRgb),0.35);
  background: rgba(var(--accentRgb),0.12);
  color:var(--accentText);
  font-family: system-ui, sans-serif;
  cursor:pointer;
}

/* -----------------------------------------
   ANIMATIONS
----------------------------------------- */
@keyframes fogDrift{
  0%{transform:translate3d(0,0,0)}
  100%{transform:translate3d(120px, -60px, 0)}
}

/* fog animation without tiling */
@keyframes fogMove{
  0%{
    background-position:
      0 0, 40px 60px, 120px 80px,
      50% 50%,
      50% 70%, 15% 35%, 80% 40%;
  }
  100%{
    background-position:
      90px -70px, 140px 20px, 240px 10px,
      58% 46%,
      50% 70%, 15% 35%, 80% 40%;
  }
}

/* ember drift (tiny, constant motion) */
@keyframes emberDrift{
  0%{ filter: blur(0.6px); }
  100%{ filter: blur(0.7px); }
}

/* tarot drifts */
@keyframes tarotFloat1{
  0%,100%{ transform: translate3d(0,0,0) rotate(-6deg); opacity:0.22; }
  50%{ transform: translate3d(12px, -10px, 0) rotate(-4deg); opacity:0.26; }
}
@keyframes tarotFloat2{
  0%,100%{ transform: translate3d(0,0,0) rotate(7deg); opacity:0.20; }
  50%{ transform: translate3d(-10px, 12px, 0) rotate(5deg); opacity:0.24; }
}

@media (max-width:768px){
  .btn{min-width:110px;padding:10px 12px}
  main{padding:18px}
  .moon-badge{top:68px; right:12px}
  .offer-grid{grid-template-columns:1fr}

  /* portrait swaps */
  :root{
    --altarImg: url('../assets/backgrounds/matches/altar-portrait.png');
  }

  /* move tarot so it doesn't crowd on mobile */
  .deck-wrap::before{ background-position: 10% 22%; opacity:0.16; }
  .deck-wrap::after{ background-position: 86% 22%, 76% 86%; opacity:0.14; }
}

.mood-toggle{display:flex; gap:6px; margin-left:8px;}
.mood-toggle button{
  padding:6px 8px; border-radius:999px;
  border:1px solid rgba(var(--accentRgb),0.35);
  background: rgba(0,0,0,0.35);
  color: var(--accentText);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  cursor:pointer;
}
.mood-toggle button:hover{background: rgba(var(--accentRgb),0.14);}

/* Always-on embers (subtle) */
.deck-wrap::after{
  content:"";
  position:fixed; inset:0;
  background: var(--embersImg) center/cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
  animation: embersDrift 10s linear infinite;
  z-index:-1;
  pointer-events:none;
}

/* Faint sigil behind the card panel */
.card-panel::after{
  content:"";
  position:absolute; inset:-20%;
  background: var(--sigilImg) center/contain no-repeat;
  opacity: 0.10;
  filter: blur(0.2px);
  transform: rotate(-6deg);
  pointer-events:none;
  z-index: 0; /* behind panel content */
}

/* 2–3 drifting tarot cards */
.tarot-float{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index: 1; /* behind UI (UI is at 50), above room */
}
.tarot-float::before,
.tarot-float::after{
  content:"";
  position:absolute;
  width: clamp(120px, 14vw, 220px);
  aspect-ratio: 2 / 3;
  background: var(--tarot1) center/contain no-repeat;
  opacity: 0.18;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.6));
  animation: tarotDriftA 18s ease-in-out infinite;
}
.tarot-float::after{
  background-image: var(--tarot2);
  left: 8%;
  top: 62%;
  opacity: 0.14;
  animation: tarotDriftB 22s ease-in-out infinite;
}
.tarot-float::before{
  left: 78%;
  top: 18%;
}

.tarot3{
  position:absolute;
  left: 42%;
  top: 8%;
  width: clamp(110px, 13vw, 200px);
  aspect-ratio: 2 / 3;
  background: var(--tarot3) center/contain no-repeat;
  opacity: 0.12;
  animation: tarotDriftC 26s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.6));
}

@keyframes embersDrift{
  0%{ transform: translate3d(0,0,0); }
  100%{ transform: translate3d(-60px, 40px, 0); }
}
@keyframes tarotDriftA{
  0%,100%{ transform: translate(0,0) rotate(-2deg); }
  50%{ transform: translate(-18px, 12px) rotate(3deg); }
}
@keyframes tarotDriftB{
  0%,100%{ transform: translate(0,0) rotate(2deg); }
  50%{ transform: translate(22px, -14px) rotate(-3deg); }
}
@keyframes tarotDriftC{
  0%,100%{ transform: translate(0,0) rotate(1deg); }
  50%{ transform: translate(-16px, 18px) rotate(-2deg); }
}

.skin-btn.active{
  border-color: var(--uiBorder);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 18px var(--uiGlow);
}
