
/* GLOBAL CONTRAST FIX — final override */
/* Rule: dark backgrounds = light text; light backgrounds = dark text. */

:root{
  --safe-dark:#0f1115;
  --safe-dark-2:#171a20;
  --safe-light:#f7f4ee;
  --safe-card:#ffffff;
  --safe-text:#f6f1e8;
  --safe-muted:#334155;
  --safe-light-text:#ffffff;
  --safe-light-muted:#eef2f6;
  --safe-accent:#8b6f47;
}

/* Base light page */
html, body{
  background:#f7f4ee !important;
  color:#f6f1e8 !important;
}
body *{
  text-shadow:none !important;
  opacity:1 !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Default text on light backgrounds */
p, li, span, small, label, div{
  color:inherit;
}
h1,h2,h3,h4,h5,h6,strong{
  color:#f6f1e8 !important;
}

/* Light cards and white sections */
.card, article, main, [class*="card"], [class*="Card"], [class*="box"], [class*="Box"], [class*="tile"], [class*="Tile"],
[class*="bg-white"], [style*="background:#fff"], [style*="background: #fff"], [style*="background-color:#fff"], [style*="background-color: #fff"]{
  color:#f6f1e8 !important;
}
.card *, article *, main *, [class*="card"] *, [class*="Card"] *, [class*="box"] *, [class*="Box"] *,
[class*="bg-white"] *{
  color:#f6f1e8 !important;
  -webkit-text-fill-color:#f6f1e8 !important;
}
.card p, article p, main p, [class*="card"] p, [class*="Card"] p, [class*="box"] p, [class*="Box"] p,
.card li, article li, main li, [class*="card"] li, [class*="Card"] li, [class*="box"] li, [class*="Box"] li{
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
}

/* Dark sections: force light text */
section[style*="background:#f6f1e8"], section[style*="background: #f6f1e8"],
section[style*="background:#f6f1e8"], section[style*="background: #f6f1e8"],
section[style*="background:#0"], section[style*="background: #0"],
section[style*="background:#1"], section[style*="background: #1"],
section[style*="background:#2"], section[style*="background: #2"],
[class*="dark"], [class*="Dark"], [class*="black"], [class*="Black"],
[class*="bg-black"], [class*="bg-dark"], [class*="bg-zinc"], [class*="bg-slate"], [class*="bg-neutral"],
footer{
  background-color:#0f1115 !important;
  color:#ffffff !important;
}

section[style*="background:#f6f1e8"] *, section[style*="background: #f6f1e8"] *,
section[style*="background:#f6f1e8"] *, section[style*="background: #f6f1e8"] *,
section[style*="background:#0"] *, section[style*="background: #0"] *,
section[style*="background:#1"] *, section[style*="background: #1"] *,
section[style*="background:#2"] *, section[style*="background: #2"] *,
[class*="dark"] *, [class*="Dark"] *, [class*="black"] *, [class*="Black"] *,
[class*="bg-black"] *, [class*="bg-dark"] *, [class*="bg-zinc"] *, [class*="bg-slate"] *, [class*="bg-neutral"] *,
footer *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Paragraphs in dark sections slightly softer but still readable */
section[style*="background:#f6f1e8"] p, section[style*="background: #f6f1e8"] p,
section[style*="background:#f6f1e8"] p, section[style*="background: #f6f1e8"] p,
section[style*="background:#0"] p, section[style*="background: #0"] p,
section[style*="background:#1"] p, section[style*="background: #1"] p,
section[style*="background:#2"] p, section[style*="background: #2"] p,
[class*="dark"] p, [class*="Dark"] p, [class*="black"] p, [class*="Black"] p,
[class*="bg-black"] p, [class*="bg-dark"] p, [class*="bg-zinc"] p, [class*="bg-slate"] p, [class*="bg-neutral"] p,
footer p, footer li, footer span, footer small{
  color:#eef2f6 !important;
  -webkit-text-fill-color:#eef2f6 !important;
}

/* The problematic themed/casino-style blocks: make them clean dark panel with white text */
[href*="wieczor"], [href*="kasyn"], [href*="casino"]{
  color:#ffffff !important;
}
section:has(a[href*="wieczor"]),
section:has(a[href*="kasyn"]),
section:has(a[href*="casino"]){
  background:#0f1115 !important;
  color:#ffffff !important;
}
section:has(a[href*="wieczor"]) *,
section:has(a[href*="kasyn"]) *,
section:has(a[href*="casino"]) *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Any text-gradient / transparent text must become normal readable text */
.text-transparent, [class*="text-transparent"], .bg-clip-text, [class*="bg-clip-text"]{
  background:none !important;
  background-image:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  color:inherit !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Buttons: readable in all cases */
button, .button, .btn, a[class*="btn"], a[class*="button"], input[type="submit"]{
  background:#8b6f47 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#8b6f47 !important;
  opacity:1 !important;
  font-weight:700 !important;
}
button *, .button *, .btn *, a[class*="btn"] *, a[class*="button"] *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Links on light background */
a{
  color:#5a4528 !important;
  opacity:1 !important;
}
footer a, section[style*="background:#f6f1e8"] a, section[style*="background:#f6f1e8"] a,
[class*="dark"] a, [class*="black"] a, [class*="bg-black"] a{
  color:#f3d28c !important;
  -webkit-text-fill-color:#f3d28c !important;
}

/* Inline grey overlays that made content unreadable */
[style*="opacity"]{
  opacity:1 !important;
}
