/* EL3AB v3 — Design System from DESIGN.md */

:root {
  --bg-0: #030A12;
  --bg-1: #081420;
  --bg-2: #0F1F30;
  --bg-3: #182B42;
  --bg-glass: rgba(8, 20, 32, 0.88);

  --gold: #F5B731;
  --gold-dim: rgba(245, 183, 49, 0.12);
  --gold-glow: rgba(245, 183, 49, 0.3);
  --cyan: #00D4FF;
  --purple: #8B5CF6;

  --chess-1: #2563EB;
  --chess-2: #F5B731;
  --ludo-1: #8B5CF6;
  --ludo-2: #EC4899;
  --domino-1: #10B981;
  --domino-2: #06B6D4;
  --backgammon-1: #F59E0B;
  --backgammon-2: #EF4444;

  --win: #34D399;
  --win-dim: rgba(52, 211, 153, 0.12);
  --loss: #F87171;
  --loss-dim: rgba(248, 113, 113, 0.12);
  --online: #22C55E;

  --text-1: #F8FAFC;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --text-inv: #0F172A;

  --border: rgba(255, 255, 255, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --touch: 44px;
  --header-h: 56px;
  --nav-h: 64px;

  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { direction: rtl; font-family: var(--font); color: var(--text-1); background: var(--bg-0); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overflow-x: hidden; overscroll-behavior: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select { font: inherit; color: inherit; background: none; border: none; outline: none; }
img { display: block; max-width: 100%; }

/* === SHELL === */
.shell { min-height: 100dvh; padding-top: var(--header-h); padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }

.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--bg-glass); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top); transition: transform 0.3s var(--ease);
}
.hdr.hide { transform: translateY(-100%); }
.hdr-brand { font-weight: 800; font-size: 20px; color: var(--gold); letter-spacing: -0.5px; }
.hdr-mid { display: flex; align-items: center; gap: 12px; }
.hdr-stat { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hdr-stat svg { width: 14px; height: 14px; }
.hdr-end { display: flex; align-items: center; gap: 4px; }
.hdr-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-2); }
.hdr-btn:active { background: var(--bg-2); }

.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-glass); backdrop-filter: blur(20px); border-top: 1px solid var(--border);
  transition: transform 0.3s var(--ease);
}
.nav.hide { transform: translateY(100%); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: var(--nav-h); color: var(--text-3); font-size: 10px; font-weight: 500;
  transition: color 0.15s;
}
.nav-item.active { color: var(--gold); }
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:active svg { transform: scale(0.85); transition: transform 0.1s var(--ease-bounce); }

.main { width: 100%; max-width: 500px; margin: 0 auto; padding: 16px; }

@media (min-width: 768px) {
  .main { max-width: 600px; padding: 24px; }
}
@media (min-width: 1024px) {
  .main { max-width: 680px; }
}

/* === CARDS === */
.card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform 0.15s var(--ease);
}
.card:active { transform: scale(0.97); }
.card-pad { padding: 16px; }

/* === GAME GRID === */
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.15s var(--ease-bounce); box-shadow: var(--shadow);
}
.game-card:active { transform: scale(0.95); }

.game-card-hero {
  height: clamp(80px, 20vw, 110px); display: flex; align-items: center; justify-content: center;
}
.game-card-hero--chess { background: linear-gradient(135deg, var(--chess-1), var(--chess-2)); }
.game-card-hero--ludo { background: linear-gradient(135deg, var(--ludo-1), var(--ludo-2)); }
.game-card-hero--domino { background: linear-gradient(135deg, var(--domino-1), var(--domino-2)); }
.game-card-hero--backgammon { background: linear-gradient(135deg, var(--backgammon-1), var(--backgammon-2)); }

.game-card-hero-icon { font-size: 36px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)); }

.game-card-body {
  padding: 12px; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-1);
}
.game-card-name { font-size: 14px; font-weight: 700; }
.game-card-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--online); animation: pulse 2s infinite; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === STREAK === */
.streak {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.streak-fire { font-size: 28px; animation: fire 1.5s ease-in-out infinite alternate; }
@keyframes fire { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.1) rotate(3deg); } }
.streak-info { flex: 1; }
.streak-day { font-size: 14px; font-weight: 600; }
.streak-reward { font-size: 12px; color: var(--text-2); }
.streak-btn {
  min-height: 36px; padding: 8px 16px; background: var(--gold); color: var(--text-inv);
  font-size: 13px; font-weight: 700; border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px var(--gold-glow); transition: transform 0.1s;
}
.streak-btn:active { transform: scale(0.93); }
.streak-btn:disabled { opacity: 0.4; box-shadow: none; }

/* === STATS === */
.stats-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.stats-scroll::-webkit-scrollbar { display: none; }
.stat-pill {
  flex-shrink: 0; padding: 8px 14px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.stat-pill-val { font-variant-numeric: tabular-nums; color: var(--text-1); }
.stat-pill-lbl { color: var(--text-2); }

/* === ACTIVITY === */
.activity { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.activity-icon.win { background: var(--win-dim); color: var(--win); }
.activity-icon.loss { background: var(--loss-dim); color: var(--loss); }
.activity-text { flex: 1; font-size: 13px; font-weight: 500; }
.activity-result { font-size: 12px; font-weight: 700; }

/* === SECTION === */
.sec { margin-bottom: 20px; }
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-title { font-size: 16px; font-weight: 700; }
.sec-link { font-size: 12px; color: var(--cyan); font-weight: 500; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 20px; font-weight: 600; font-size: 14px;
  border-radius: var(--radius-sm); transition: transform 0.1s; white-space: nowrap;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-gold { background: var(--gold); color: var(--text-inv); box-shadow: 0 4px 16px var(--gold-glow); }
.btn-cyan { background: var(--cyan); color: var(--text-inv); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; font-weight: 700; border-radius: var(--radius); }

/* === INPUTS === */
.input {
  width: 100%; height: var(--touch); padding: 0 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-1); font-size: 14px; transition: border-color 0.15s;
}
.input:focus { border-color: var(--cyan); }
.input::placeholder { color: var(--text-3); }

/* === CHIPS === */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 36px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-2); transition: all 0.15s;
}
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--text-inv); }

/* === BOTTOM SHEET === */
.sheet-bg { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 151;
  background: var(--bg-1); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.35s var(--ease);
  max-height: 80vh; overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; background: var(--text-3); border-radius: var(--radius-pill); margin: 0 auto 16px; }

/* === LOGIN === */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-brand { font-weight: 800; font-size: 44px; color: var(--gold); text-align: center; text-shadow: 0 0 40px var(--gold-glow); margin-bottom: 8px; }
.login-sub { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 32px; }
.login-err { padding: 12px; background: var(--loss-dim); border: 1px solid rgba(248,113,113,0.2); border-radius: var(--radius-sm); color: var(--loss); font-size: 13px; text-align: center; margin-top: 16px; animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px)} 40%{transform:translateX(4px)} 60%{transform:translateX(-2px)} 80%{transform:translateX(2px)} }

/* === EMPTY === */
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 14px; }

/* === SKELETON === */
.skel { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: skel 1.5s infinite linear; border-radius: var(--radius-sm); }
@keyframes skel { 0%{background-position:-200% 0} 100%{background-position:200% 0} }

/* === IMMERSIVE (in-game) === */
.shell.immersive .hdr { transform: translateY(-100%); }
.shell.immersive .nav { transform: translateY(100%); }
.shell.immersive { padding-top: 0; padding-bottom: 0; }

/* === UTILITIES === */
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.text-center { text-align: center; }

/* === CHESS GAME LAYOUT === */
.chess-game-wrap {
  display: flex; flex-direction: column; align-items: center;
  min-height: 100dvh; justify-content: center; padding: 8px 8px env(safe-area-inset-bottom);
}
.chess-top-bar, .chess-bottom-bar {
  width: 100%; max-width: 400px; padding: 6px 4px;
}
.chess-player-bar {
  display: flex; align-items: center; justify-content: space-between;
}
.chess-player-name { font-size: 13px; font-weight: 600; }
.chess-clock {
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 10px; background: var(--bg-2); border-radius: var(--radius-sm);
  min-width: 60px; text-align: center;
}
.chess-clock.active { background: var(--gold); color: var(--text-inv); }
.chess-clock.low { background: var(--loss); color: white; animation: pulse 1s infinite; }

.chess-move-list-wrap {
  width: 100%; max-width: 400px; max-height: 80px; overflow-y: auto;
  margin: 4px 0; scrollbar-width: thin;
}
.chess-move-list {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.chess-actions {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px;
}

/* === RESPONSIVE GAME BOARD === */
/* board-wrapper is styled in chessboard.css — we just constrain its width inline */

/* === MATCHMAKING RADAR === */
.matchmaking-radar {
  position: relative; width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.radar-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--gold); opacity: 0;
  animation: radar-expand 2s ease-out infinite;
}
.radar-ring.r2 { animation-delay: 0.6s; }
.radar-ring.r3 { animation-delay: 1.2s; }
@keyframes radar-expand {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* === JUICE: BUTTON RIPPLE === */
.btn, .streak-btn, .chip, .game-card, .nav-item, .hdr-btn {
  position: relative;
  overflow: hidden;
}
.btn::after, .streak-btn::after, .game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.btn:active::after, .streak-btn:active::after, .game-card:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* === JUICE: BUTTON GLOW PULSE (gold buttons) === */
.btn-gold {
  animation: btn-glow 3s ease-in-out infinite;
}
@keyframes btn-glow {
  0%, 100% { box-shadow: 0 4px 16px var(--gold-glow); }
  50% { box-shadow: 0 4px 28px var(--gold-glow), 0 0 60px rgba(245, 183, 49, 0.1); }
}

/* === JUICE: SHIMMER ON GOLD BUTTONS === */
.btn-gold::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer { 0%{left:-100%} 50%{left:150%} 100%{left:150%} }

/* === JUICE: CARD ENTRANCE ANIMATION === */
.game-card {
  animation: card-pop 0.4s var(--ease-bounce) both;
}
.game-card:nth-child(1) { animation-delay: 0ms; }
.game-card:nth-child(2) { animation-delay: 80ms; }
.game-card:nth-child(3) { animation-delay: 160ms; }
.game-card:nth-child(4) { animation-delay: 240ms; }

@keyframes card-pop {
  0% { opacity: 0; transform: scale(0.85) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* === JUICE: GAME CARD HOVER GLOW === */
.game-card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.game-card:hover .game-card-hero::after,
.game-card:active .game-card-hero::after { opacity: 1; }

/* === JUICE: GAME CARD ICON FLOAT === */
.game-card-hero-icon {
  animation: icon-float 3s ease-in-out infinite;
}
.game-card:nth-child(1) .game-card-hero-icon { animation-delay: 0s; }
.game-card:nth-child(2) .game-card-hero-icon { animation-delay: 0.5s; }
.game-card:nth-child(3) .game-card-hero-icon { animation-delay: 1s; }
.game-card:nth-child(4) .game-card-hero-icon { animation-delay: 1.5s; }
@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* === JUICE: NAV ACTIVE INDICATOR === */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--gold);
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  animation: nav-dot-in 0.3s var(--ease-bounce);
}
.nav-item { position: relative; }
@keyframes nav-dot-in { 0%{transform:translateX(-50%) scaleX(0)} 100%{transform:translateX(-50%) scaleX(1)} }

/* === JUICE: NAV TAP BOUNCE === */
.nav-item:active {
  transform: scale(0.9);
  transition: transform 0.1s var(--ease-bounce);
}

/* === JUICE: STREAK CLAIM CELEBRATION === */
.streak-btn.claimed {
  animation: claim-pop 0.5s var(--ease-bounce);
  background: var(--win);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}
@keyframes claim-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* === JUICE: PAGE TRANSITIONS === */
.main {
  animation: page-in 0.3s var(--ease) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === JUICE: SECTION FADE-IN ON SCROLL === */
.sec {
  animation: sec-in 0.4s var(--ease) both;
}
.sec:nth-child(1) { animation-delay: 0ms; }
.sec:nth-child(2) { animation-delay: 100ms; }
.sec:nth-child(3) { animation-delay: 200ms; }
.sec:nth-child(4) { animation-delay: 300ms; }
.sec:nth-child(5) { animation-delay: 400ms; }
@keyframes sec-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === JUICE: ACTIVITY ITEMS SLIDE IN === */
.activity-item {
  animation: item-slide 0.3s var(--ease) both;
}
.activity-item:nth-child(1) { animation-delay: 50ms; }
.activity-item:nth-child(2) { animation-delay: 100ms; }
.activity-item:nth-child(3) { animation-delay: 150ms; }
.activity-item:nth-child(4) { animation-delay: 200ms; }
.activity-item:nth-child(5) { animation-delay: 250ms; }
@keyframes item-slide {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === JUICE: CHIP SELECTION POP === */
.chip.on {
  animation: chip-select 0.25s var(--ease-bounce);
}
@keyframes chip-select {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* === JUICE: INPUT FOCUS GLOW === */
.input:focus {
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
  border-color: var(--cyan);
}
.input {
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* === JUICE: STAT PILL HOVER === */
.stat-pill {
  transition: transform 0.15s var(--ease-bounce), background 0.15s;
}
.stat-pill:active {
  transform: scale(0.95);
  background: var(--bg-3);
}

/* === JUICE: BRAND LOGO PULSE === */
.hdr-brand {
  transition: text-shadow 0.3s;
}
.hdr-brand:active {
  text-shadow: 0 0 20px var(--gold-glow);
}

/* === JUICE: ONLINE DOT PING === */
.game-card-dot {
  position: relative;
}
.game-card-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--online);
  animation: dot-ping 2s ease-out infinite;
  opacity: 0;
}
@keyframes dot-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* === JUICE: LOGIN BRAND FLOAT === */
.login-brand {
  animation: brand-float 4s ease-in-out infinite;
}
@keyframes brand-float {
  0%, 100% { transform: translateY(0); text-shadow: 0 0 40px var(--gold-glow); }
  50% { transform: translateY(-4px); text-shadow: 0 0 60px var(--gold-glow), 0 8px 32px rgba(245, 183, 49, 0.15); }
}

/* === JUICE: CARD SHADOW ON PRESS === */
.card {
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.card:active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* === JUICE: HEADER CURRENCY TICK === */
.hdr-stat span {
  transition: transform 0.2s var(--ease-bounce);
}
.hdr-stat span.tick {
  transform: scale(1.3);
  color: var(--gold);
}

/* === JUICE: AMBIENT GRADIENT SHIFT ON BODY === */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(245, 183, 49, 0.02) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(0, 212, 255, 0.015) 0%, transparent 50%);
  animation: ambient 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}
@keyframes ambient {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(3%, 3%) rotate(2deg); }
}

/* === JUICE: TOAST ANIMATION === */
.toast-msg {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%; transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: toast-in 0.3s var(--ease-bounce), toast-out 0.3s var(--ease) 2.7s forwards;
  pointer-events: none;
}
.toast-msg.success { border-color: var(--win); }
.toast-msg.error { border-color: var(--loss); }
@keyframes toast-in { from{opacity:0;transform:translateX(-50%) translateY(-12px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
@keyframes toast-out { to{opacity:0;transform:translateX(-50%) translateY(-8px)} }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  body::before { display: none; }
}
