/* Strona giveawaya: styl świąteczny (domyślny) i zwykły - codzienny (html[data-theme="classic"], na końcu pliku).
   Wydajność: animowane są tylko opacity i transform (bez przeliczania układu), bez backdrop-filter i animowanych cieni;
   tło to jeden statyczny obrazek SVG na osobnej warstwie, śnieg rysuje skrypt na jednym płótnie. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #e23b3b;
  --red-2: #ff5d5d;
  --red-dark: #a3171d;
  --green: #2fbf71;
  --green-dark: #14513a;
  --gold: #f6c453;
  --gold-2: #ffe29a;
  --snow: #f8f5ee;
  --night: #0d1b3d;
  --card: rgba(16, 26, 58, 0.985);
  --card-2: rgba(28, 42, 86, 0.985);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fbf8f2;
  --text-2: #c9d2ea;
  --text-3: #8f9bc0;
  --accent: var(--red);
  --accent-ink: #fff;
  --kick: #53fc18;
  --discord: #5865f2;
  --radius: 18px;
  --font-display: "Unbounded", "Montserrat", system-ui, sans-serif;
  --font-num: "Space Grotesk", "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font: 500 16px/1.55 var(--font-body);
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
.img-missing {
  visibility: hidden;
}
button,
a.btn {
  font: inherit;
}
a {
  color: var(--gold-2);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- tło: niebo + pejzaż (warstwa stała, bez przerysowywania przy przewijaniu) ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    url("/assets/scene.svg") center bottom / cover no-repeat,
    radial-gradient(1200px 600px at 80% 8%, rgba(255, 223, 150, 0.12), transparent 60%),
    linear-gradient(180deg, #081230 0%, #102457 38%, #24326f 62%, #3b2f68 82%, #4b2f5e 100%);
  transform: translateZ(0);
}
.snow {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(0.4px);
}

/* ---------- lampki na górze ---------- */

.lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 1vw;
  pointer-events: none;
  overflow: hidden;
}
.lights::before {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: -36px;
  height: 60px;
  border-bottom: 2px solid #1e3324;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.bulb {
  position: relative;
  width: 11px;
  height: 17px;
  margin-top: calc(14px + var(--sag, 0px));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--c);
  box-shadow: 0 0 14px 3px var(--c);
  animation: twinkle 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  will-change: opacity; /* osobna warstwa - miganie bez przerysowywania strony */
}
.bulb.is-still {
  animation: none;
  will-change: auto;
}
.bulb::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -5px;
  width: 7px;
  height: 6px;
  border-radius: 2px;
  background: #2a3a2c;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ---------- układ ---------- */

.app {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 72px 20px 140px;
}
.boot {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--text-2);
}
.boot-gift {
  font-size: 64px;
  animation: bounce 1.2s ease-in-out infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
.noscript {
  text-align: center;
  padding: 40px;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 18px 50px rgba(3, 8, 25, 0.45);
}
.section {
  margin-top: 26px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.section-head h2 {
  margin: 0;
  font: 800 clamp(18px, 2.4vw, 22px) / 1.2 var(--font-display);
  letter-spacing: 0.01em;
}
.section-head .orn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-size: 20px;
  flex: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  border-radius: 26px;
  padding: 4px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 14px, var(--snow) 14px 28px);
  box-shadow: 0 30px 80px rgba(3, 8, 25, 0.55);
}
.hero-inner {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(160deg, #112048, #241430);
  padding: clamp(22px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
}
.hero-inner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 196, 83, 0.22), transparent 65%);
  pointer-events: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(47, 191, 113, 0.16);
  border: 1px solid rgba(47, 191, 113, 0.45);
  color: #b9f5d2;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.is-ended {
  background: rgba(246, 196, 83, 0.14);
  border-color: rgba(246, 196, 83, 0.45);
  color: var(--gold-2);
}
.badge.is-cancelled {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
  color: var(--text-2);
}
.title {
  margin: 16px 0 12px;
  font: 800 clamp(26px, 4.2vw, 46px) / 1.1 var(--font-display);
  text-wrap: balance;
  background: linear-gradient(100deg, #fff 0%, var(--gold-2) 45%, var(--gold) 70%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: break-word; /* długie słowo (nick) łamie się dopiero, gdy nie mieści się w całej linii */
}
.desc {
  margin: 0;
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.hero-art {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transform: rotate(1.5deg);
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-art.is-empty {
  display: grid;
  place-items: center;
  font-size: 110px;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      90deg,
      transparent calc(50% - 9px),
      rgba(246, 196, 83, 0.92) calc(50% - 9px) calc(50% + 9px),
      transparent calc(50% + 9px)
    ),
    linear-gradient(0deg, transparent calc(50% - 9px), rgba(246, 196, 83, 0.92) calc(50% - 9px) calc(50% + 9px), transparent calc(50% + 9px));
  opacity: 0;
}
.hero-art.is-empty::after {
  opacity: 1;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 24px;
  max-width: 440px;
}
.cd {
  position: relative;
  text-align: center;
  padding: 12px 4px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff5252, #b51d23);
  overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}
.cd::before {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(246, 196, 83, 0.55);
}
.cd b {
  position: relative;
  display: block;
  font: 700 clamp(24px, 4vw, 34px) / 1 var(--font-num);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.cd small {
  position: relative;
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe9e9;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.fact b {
  color: var(--text);
  font-family: var(--font-num);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--red-2), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(226, 59, 59, 0.35);
}
.btn-big {
  min-height: 56px;
  padding: 0 28px;
  font-size: 17px;
  border-radius: 16px;
}
.btn-discord {
  background: var(--discord);
  color: #fff;
}
.btn-kick {
  background: var(--kick);
  color: #0b1406;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn .ico {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- nagrody ---------- */

.prizes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.prize {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.prize:hover {
  transform: translateY(-4px) rotate(-0.4deg);
}
.prize-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1e8a55, var(--green-dark));
  display: grid;
  place-items: center;
  font-size: 64px;
}
.prize-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prize-body {
  padding: 14px 16px 16px;
}
.prize-name {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.prize-qty {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(47, 191, 113, 0.18);
  color: #8fe8b6;
  font: 700 13px var(--font-num);
}
.prize-value + .prize-qty {
  margin-left: 6px;
}
.prize-value {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.16);
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 700;
}
.ribbon {
  position: absolute;
  top: 12px;
  left: -6px;
  padding: 4px 12px 4px 14px;
  background: var(--red);
  color: #fff;
  font: 700 12px/1.4 var(--font-num);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ---------- kroki ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.step {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.step.is-ok {
  background: rgba(47, 191, 113, 0.1);
  border-color: rgba(47, 191, 113, 0.4);
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2b3d78, #1b2958);
  border: 2px solid rgba(255, 255, 255, 0.16);
  font: 700 17px var(--font-num);
}
.step.is-ok .step-num {
  background: var(--green);
  border-color: transparent;
  color: #062213;
  animation: pop 0.45s ease;
}
@keyframes pop {
  0% {
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
.step-text b {
  display: block;
}
.step-text small {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  margin-top: 2px;
}
.step-text small.warn {
  color: var(--gold-2);
}
.step-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* link do wymiany Steam: pole pod opisem kroku, na całą szerokość */
.steam-form {
  grid-column: 2 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.steam-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: 500 14px var(--font-body, inherit);
}
.steam-input:focus {
  outline: 2px solid var(--gold-2);
  outline-offset: 1px;
  border-color: transparent;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.pill-ok {
  background: rgba(47, 191, 113, 0.18);
  color: #b9f5d2;
}
.pill-wait {
  background: rgba(246, 196, 83, 0.14);
  color: var(--gold-2);
}
.spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 226, 154, 0.3);
  border-top-color: var(--gold-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 700;
  max-width: 220px;
}
.account img,
.account .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #2b3d78;
  flex: none;
}
.account .av {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkish {
  background: none;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 4px;
}
.kick-ch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kick-ch img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.join-box {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.status-banner {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}
.status-banner .big {
  font-size: 30px;
}
.status-banner.ok {
  background: linear-gradient(90deg, rgba(47, 191, 113, 0.25), rgba(47, 191, 113, 0.08));
  border: 1px solid rgba(47, 191, 113, 0.45);
}
.status-banner.wait {
  background: linear-gradient(90deg, rgba(246, 196, 83, 0.2), rgba(246, 196, 83, 0.05));
  border: 1px solid rgba(246, 196, 83, 0.4);
}
.status-banner.bad {
  background: rgba(226, 59, 59, 0.16);
  border: 1px solid rgba(226, 59, 59, 0.45);
}
.status-banner small {
  display: block;
  font-weight: 500;
  color: var(--text-2);
}

/* ---------- tryb testowy ---------- */

.test-bar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  width: min(1120px, calc(100% - 40px));
  margin: 56px auto -48px;
  padding: 10px 16px;
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  color: #1a1200;
  background: repeating-linear-gradient(135deg, #f6c453 0 18px, #ffd86b 18px 36px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}
.test-bar b {
  letter-spacing: 0.08em;
}
.test-bar .btn {
  color: #1a1200;
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.25);
}

/* ---------- zasady ---------- */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.rules li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.rules li::before {
  content: "❄";
  position: absolute;
  left: 4px;
  top: 0;
  color: #bfe3ff;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.custom-steps {
  margin: 0;
  padding-left: 22px;
  color: var(--text-2);
  display: grid;
  gap: 8px;
}

/* ---------- zwycięzcy ---------- */

.winners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.winner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.2), rgba(226, 59, 59, 0.12));
  border: 1px solid rgba(246, 196, 83, 0.45);
}
.winner img,
.winner .av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #2b3d78;
  border: 2px solid var(--gold);
  flex: none;
}
.winner b {
  display: block;
  overflow-wrap: anywhere;
}
.winner small {
  color: var(--text-2);
}
.won {
  text-align: center;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.28), rgba(226, 59, 59, 0.22));
  border: 1px solid rgba(246, 196, 83, 0.6);
  margin-bottom: 18px;
}
.won h3 {
  margin: 6px 0 4px;
  font: 800 24px/1.2 var(--font-display);
}

.winner.is-me {
  box-shadow:
    0 0 0 2px var(--gold),
    0 10px 30px rgba(246, 196, 83, 0.25);
}
.winner-prize {
  display: block;
  margin: 2px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-2);
  overflow-wrap: anywhere;
}
.won-steam {
  margin-top: 14px;
  text-align: left;
}
.won-prize {
  margin: 4px 0;
  font-weight: 800;
  color: var(--gold-2);
}
.replay {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ---------- animacja losowania ---------- */

html.rv-lock {
  overflow: hidden;
}
.rv {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 35%, rgba(40, 60, 130, 0.55), rgba(5, 9, 24, 0.96) 70%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: rv-in 0.3s ease-out;
}
@keyframes rv-in {
  from {
    opacity: 0;
  }
}
.rv-inner {
  display: grid;
  gap: 14px;
  width: min(940px, 100%);
  justify-items: center;
}
.rv-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.rv-title {
  margin: 0;
  flex: 1;
  font: 800 clamp(18px, 3.4vw, 26px) / 1.2 var(--font-display);
}
.rv-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red, #e23b3b);
}
.rv-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: rv-twinkle 1.2s ease-in-out infinite;
}
html[data-theme="classic"] .rv-live {
  background: var(--accent);
}
/* po pokazaniu wyników: „Zakończono” - bez migającej kropki */
.rv-live.is-over,
html[data-theme="classic"] .rv-live.is-over {
  background: rgba(47, 191, 113, 0.22);
  color: #9af0c0;
}
.rv-live.is-over::before {
  content: "✓";
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  animation: none;
  font-size: 12px;
  line-height: 1;
}
.rv-sound {
  min-width: 40px;
}
.rv-sound.is-blocked {
  border-color: var(--gold);
  color: var(--gold-2);
  animation: rv-nudge 1.6s ease-in-out 2;
}
@keyframes rv-nudge {
  50% {
    scale: 1.06;
  }
}
.rv-count {
  font: 700 15px var(--font-num);
  color: var(--text-2);
}
.rv-prize {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}
.rv-prize-img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.rv-prize-text {
  display: grid;
  gap: 2px;
  text-align: left;
}
.rv-prize-text small {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.rv-prize-text b {
  font: 800 clamp(17px, 3vw, 22px) / 1.25 var(--font-display);
  overflow-wrap: anywhere;
}
.rv-stage {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 210px;
}

/* prezent (styl świąteczny) / skrzynka (styl zwykły) */
.rv-box {
  --box: #c8262f;
  --box-2: #e23b3b;
  --band: var(--gold);
  position: relative;
  width: 150px;
  height: 150px;
  animation: rv-drop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes rv-drop {
  from {
    transform: translateY(-40px) scale(0.85);
    opacity: 0;
  }
}
.rv-base,
.rv-lid {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  border-radius: 8px;
  overflow: hidden;
}
.rv-base {
  bottom: 0;
  width: 128px;
  height: 100px;
  background: linear-gradient(180deg, var(--box-2), var(--box));
  box-shadow:
    inset 0 -10px 0 rgba(0, 0, 0, 0.18),
    0 18px 30px rgba(0, 0, 0, 0.45);
}
.rv-lid {
  bottom: 96px;
  width: 146px;
  height: 34px;
  overflow: visible;
  background: linear-gradient(180deg, var(--box-2), var(--box));
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2);
  transform-origin: 20% 100%;
}
.rv-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 22px;
  translate: -50% 0;
  background: var(--band);
}
/* kokarda: dwie pętle ze wstążki */
.rv-bow {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 0;
}
.rv-bow::before,
.rv-bow::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 40px;
  height: 30px;
  border: 9px solid var(--band);
  border-radius: 50% 50% 12% 50%;
  box-sizing: border-box;
}
.rv-bow::before {
  right: 0;
  transform: rotate(-24deg);
  transform-origin: 100% 100%;
}
.rv-bow::after {
  left: 0;
  transform: scaleX(-1) rotate(-24deg);
  transform-origin: 0 100%;
}
.rv-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 20px;
  height: 20px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, 0.95), rgba(246, 196, 83, 0) 70%);
  opacity: 0;
}
.rv-box.is-shake {
  animation: rv-shake 0.5s ease-in-out infinite;
}
@keyframes rv-shake {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-7deg) translateY(-3px);
  }
  40% {
    transform: rotate(6deg);
  }
  60% {
    transform: rotate(-4deg) translateY(-2px);
  }
  80% {
    transform: rotate(3deg);
  }
}
.rv-box.is-open {
  animation: none;
}
.rv-box.is-open .rv-lid {
  animation: rv-lid 0.55s cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}
@keyframes rv-lid {
  to {
    transform: translate(-30px, -90px) rotate(-38deg);
    opacity: 0;
  }
}
.rv-box.is-open .rv-glow {
  animation: rv-glow 0.6s ease-out forwards;
}
@keyframes rv-glow {
  to {
    width: 340px;
    height: 340px;
    opacity: 1;
  }
}
/* styl zwykły: skrzynka - ciemny metal, okucia w kolorze przycisków, zamek */
html[data-theme="classic"] .rv-box {
  --box: #1b1f30;
  --box-2: #2d3352;
  --band: var(--accent);
}
html[data-theme="classic"] .rv-base,
html[data-theme="classic"] .rv-lid {
  border: 2px solid color-mix(in srgb, var(--accent) 60%, #000);
}
.rv-padlock {
  display: none;
}
html[data-theme="classic"] .rv-padlock {
  display: block;
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 22px;
  height: 20px;
  translate: -50% 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3f4f8, #9aa1b8);
  box-shadow:
    0 0 0 2px #1b1f30,
    0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}
html[data-theme="classic"] .rv-bow {
  display: none;
}
html[data-theme="classic"] .rv-base,
html[data-theme="classic"] .rv-lid {
  border-radius: 4px;
}
html[data-theme="classic"] .rv-band {
  width: 8px;
  box-shadow:
    40px 0 0 var(--band),
    -40px 0 0 var(--band);
}
html[data-theme="classic"] .rv-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, #fff), transparent 70%);
}
html[data-theme="classic"] .rv-tile.is-win {
  outline-color: var(--accent);
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 65%, transparent);
}
html[data-theme="classic"] .rv-winner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, transparent), rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
html[data-theme="classic"] .rv-winner .rv-av,
html[data-theme="classic"] .rv-winner .rv-initial {
  border-color: var(--accent);
}
html[data-theme="classic"] .rv-winner small,
html[data-theme="classic"] .rv-prize-text small,
html[data-theme="classic"] .rv-sum-prize,
html[data-theme="classic"] .rv-sum-name em {
  color: color-mix(in srgb, var(--accent) 55%, #fff);
}
html[data-theme="classic"] .rv-winner.is-me,
html[data-theme="classic"] .rv-sum-row.is-me {
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 40px color-mix(in srgb, var(--accent) 40%, transparent);
  border-color: var(--accent);
}

/* styl świąteczny: śnieg w oknie losowania */
.rv-snow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.rv-snow i {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  animation: rv-fall linear infinite;
}
@keyframes rv-fall {
  to {
    transform: translate(var(--drift, 0px), 105vh);
  }
}
.rv-inner {
  position: relative;
}
/* lampki nad paskiem */
.rv-garland {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 22px;
  padding: 0 6px;
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50% 50% 0 0 / 14px 14px 0 0;
}
.rv-bulb {
  width: 9px;
  height: 13px;
  margin-top: 2px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--b);
  box-shadow: 0 0 10px var(--b);
  animation: rv-twinkle 1.6s ease-in-out infinite;
}
.rv-b0 {
  --b: #ff5d5d;
}
.rv-b1 {
  --b: #f6c453;
  animation-delay: -0.4s;
}
.rv-b2 {
  --b: #5ee0a0;
  animation-delay: -0.8s;
}
.rv-b3 {
  --b: #6fc3ff;
  animation-delay: -1.2s;
}
@keyframes rv-twinkle {
  50% {
    opacity: 0.35;
    box-shadow: none;
  }
}

/* pasek */
.rv-reel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 14px 0;
  border-radius: 16px;
  background: rgba(8, 13, 32, 0.85);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* styl świąteczny: śnieżna czapa na pasku */
html:not([data-theme="classic"]) .rv-reel {
  border-color: rgba(220, 235, 255, 0.28);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(140, 180, 255, 0.12);
}
html:not([data-theme="classic"]) .rv-reel::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle at 13px 0, #fff 7px, transparent 8px) 0 0 / 26px 10px repeat-x,
    linear-gradient(#fff, #fff) 0 0 / 100% 3px no-repeat;
  opacity: 0.85;
}
.rv-strip {
  position: relative;
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}
.rv-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  translate: -50% 0;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  border-radius: 2px;
}
.rv-marker::before,
.rv-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  translate: -50% 0;
  border: 8px solid transparent;
}
.rv-marker::before {
  top: 0;
  border-top-color: var(--gold);
}
.rv-marker::after {
  bottom: 0;
  border-bottom-color: var(--gold);
}
.rv-tile {
  --c: #4b69ff;
  position: relative;
  flex: none;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  width: 112px;
  height: 132px;
  padding: 10px 6px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), color-mix(in srgb, var(--c) 22%, transparent));
  background-color: rgba(20, 28, 60, 0.95);
  border-bottom: 4px solid var(--c);
  text-align: center;
}
.rv-c0 {
  --c: #4b69ff;
}
.rv-c1 {
  --c: #8847ff;
}
.rv-c2 {
  --c: #d32ce6;
}
.rv-c3 {
  --c: #eb4b4b;
}
.rv-c4 {
  --c: #e4ae39;
}
.rv-tile .rv-av,
.rv-tile .rv-initial {
  width: 56px;
  height: 56px;
}
.rv-av,
.rv-initial {
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: #2b3d78;
}
.rv-initial {
  --hue: 220;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font: 800 22px var(--font-display);
  color: #fff;
  background: hsl(var(--hue) 55% 42%);
}
.rv-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.rv-gift {
  font-size: 44px;
  line-height: 1;
}
.rv-tile.is-flip {
  perspective: 600px;
  background: none;
  border: 0;
  padding: 0;
}
.rv-face {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 10px 6px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), color-mix(in srgb, var(--c) 22%, transparent));
  background-color: rgba(20, 28, 60, 0.95);
  border-bottom: 4px solid var(--c);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.5s ease;
}
.rv-back {
  transform: rotateY(180deg);
}
.rv-tile.is-flip.is-win .rv-front {
  transform: rotateY(-180deg);
}
.rv-tile.is-flip.is-win .rv-back {
  transform: rotateY(0deg);
}
.rv-tile.is-win {
  z-index: 1;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 34px rgba(246, 196, 83, 0.65);
  animation: rv-pop 0.5s ease-out;
}
@keyframes rv-pop {
  50% {
    scale: 1.08;
  }
}
/* po zatrzymaniu linia znika (nie przecina nicku zwycięzcy), zostają trójkąty */
.rv-reel.is-done .rv-marker {
  background: transparent;
  box-shadow: none;
}
.rv-reel.is-done .rv-tile:not(.is-win) {
  opacity: 0.45;
  transition: opacity 0.4s;
}

/* wynik */
.rv-result {
  min-height: 84px;
  display: grid;
  place-items: center;
  width: 100%;
}
.rv-winner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.25), rgba(226, 59, 59, 0.15));
  border: 1px solid rgba(246, 196, 83, 0.55);
  animation: rv-drop 0.4s ease-out;
}
.rv-winner .rv-av,
.rv-winner .rv-initial {
  width: 64px;
  height: 64px;
  border: 2px solid var(--gold);
}
.rv-winner b {
  display: block;
  font: 800 clamp(18px, 3.2vw, 24px) / 1.2 var(--font-display);
  overflow-wrap: anywhere;
}
.rv-winner small {
  color: var(--gold-2);
  font-weight: 700;
}
.rv-winner.is-me {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 40px rgba(246, 196, 83, 0.4);
}
.rv-summary {
  display: grid;
  gap: 8px;
  width: min(560px, 100%);
  max-height: 52vh;
  overflow-y: auto;
}
.rv-sum-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.rv-sum-row.is-me {
  border-color: var(--gold);
}
.rv-sum-row .rv-av,
.rv-sum-row .rv-initial {
  width: 40px;
  height: 40px;
  font-size: 18px;
}
.rv-sum-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rv-sum-name em {
  color: var(--gold-2);
  font-style: normal;
  font-weight: 700;
}
.rv-sum-prize {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-2);
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 45%;
}
.rv-bottom {
  min-height: 46px;
}
.rv-inner.is-summary .rv-stage,
.rv-inner.is-summary .rv-prize {
  display: none;
}
html[data-theme="classic"] .rv {
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--accent) 28%, transparent), rgba(8, 10, 18, 0.96) 70%);
}
html[data-theme="classic"] .rv-reel:not(.is-done) .rv-marker {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
html[data-theme="classic"] .rv-marker::before {
  border-top-color: var(--accent);
}
html[data-theme="classic"] .rv-marker::after {
  border-bottom-color: var(--accent);
}
html[data-theme="classic"] .rv-reel,
html[data-theme="classic"] .rv-tile,
html[data-theme="classic"] .rv-face {
  background-color: #141826;
}
@media (max-width: 560px) {
  .rv-tile {
    width: 88px;
    height: 112px;
  }
  .rv-tile .rv-av,
  .rv-tile .rv-initial {
    width: 44px;
    height: 44px;
  }
  .rv-name {
    font-size: 12px;
  }
  .rv-gift {
    font-size: 34px;
  }
  .rv-box {
    scale: 0.85;
  }
  .rv-stage {
    min-height: 170px;
  }
  .rv-sum-row {
    flex-wrap: wrap;
  }
  .rv-sum-prize {
    max-width: 100%;
    text-align: left;
  }
}

/* ---------- strona główna: lista giveawayów ---------- */

.hub-inner {
  grid-template-columns: 1fr;
}
.hub-inner .title {
  margin-bottom: 10px;
}
.hub-guild {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: none;
}
.gcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.gcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.gcard:hover {
  transform: translateY(-4px);
}
.gcard-body {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px 16px 18px;
}
.gcard-body h3 {
  margin: 0;
  font: 800 18px/1.25 var(--font-display);
  overflow-wrap: anywhere;
}
.gcard-guild {
  color: var(--text-3);
  font-weight: 700;
}
.gcard-meta {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.gcard.is-ended .gcard-img {
  filter: saturate(0.75);
}

/* ---------- różne ---------- */

.muted {
  color: var(--text-3);
}
.note {
  font-size: 13px;
  color: var(--text-3);
  margin: 16px 0 0;
}
.empty-page {
  text-align: center;
  max-width: 560px;
  margin: 8vh auto 0;
}
.empty-page .big {
  font-size: 76px;
}
.empty-page h1 {
  font: 800 clamp(24px, 4vw, 34px) / 1.2 var(--font-display);
  margin: 10px 0;
}
.footer {
  margin: 36px auto 0;
  max-width: 820px;
  padding: 10px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  /* czytelnie także na tle z choinkami i śniegiem */
  background: rgba(10, 16, 40, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}
/* autor strony - ostatnia linia stopki */
.credit {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3, var(--text-2));
}
.credit a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.credit a:hover,
.credit a:focus-visible {
  color: var(--accent);
}
@media (max-width: 980px) {
  html.has-music .footer {
    margin-bottom: 72px;
  }
}
/* muzyka w tle: przycisk w lewym dolnym rogu (nad treścią, pod powiadomieniami i animacją losowania) */
.music-btn {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 19;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 16, 38, 0.74);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease;
}
.music-btn[hidden],
.music-hint[hidden] {
  display: none;
}
/* przeglądarka czeka na kliknięcie: podpowiedź obok przycisku */
.music-hint {
  position: fixed;
  left: calc(max(14px, env(safe-area-inset-left)) + 54px);
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 19;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 16, 38, 0.82);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: music-hint-in 0.4s ease both;
}
.music-hint:hover {
  border-color: var(--accent);
}
@keyframes music-hint-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
.music-btn:hover {
  transform: scale(1.06);
}
.music-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.music-btn[data-state="play"] {
  border-color: var(--accent);
}
.music-ico {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.music-ico i {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}
.music-ico i:nth-child(2) {
  height: 14px;
}
.music-ico i:nth-child(3) {
  height: 11px;
}
.music-ico i:nth-child(4) {
  height: 6px;
}
.music-btn[data-state="play"] .music-ico i {
  animation: music-eq 0.9s ease-in-out infinite alternate;
}
.music-btn[data-state="play"] .music-ico i:nth-child(2) {
  animation-delay: -0.45s;
}
.music-btn[data-state="play"] .music-ico i:nth-child(3) {
  animation-delay: -0.2s;
}
.music-btn[data-state="play"] .music-ico i:nth-child(4) {
  animation-delay: -0.7s;
}
@keyframes music-eq {
  from {
    height: 4px;
  }
  to {
    height: 18px;
  }
}
/* wyciszona: przekreślona */
.music-btn[data-state="pause"] {
  color: rgba(255, 255, 255, 0.7);
}
.music-btn[data-state="pause"]::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
/* czeka na kliknięcie: delikatne pulsowanie */
.music-btn[data-state="wait"] {
  animation: music-pulse 2.6s ease-in-out infinite;
}
@keyframes music-pulse {
  0%,
  100% {
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.35),
      0 0 0 0 rgba(255, 255, 255, 0.35);
  }
  60% {
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.35),
      0 0 0 10px rgba(255, 255, 255, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .music-btn,
  .music-btn .music-ico i {
    animation: none !important;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  pointer-events: none; /* ukryte nie łapie kliknięć */
  transform: translate(-50%, 20px);
  opacity: 0;
  max-width: min(520px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff;
  color: #1b1b1b;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
/* na telefonie powiadomienie nad przyciskiem muzyki (nie zasłania go) */
@media (max-width: 640px) {
  .toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
.toast.bad {
  background: #ffe1e1;
  color: #6b0d10;
}
.confetti {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(960px, 94vw);
  max-height: 92vh;
}
dialog.lightbox::backdrop {
  background: rgba(5, 10, 25, 0.86);
}
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  margin: 0 auto;
}
.lightbox p {
  text-align: center;
  color: #fff;
  font-weight: 700;
}
.lightbox .close {
  position: absolute;
  top: 8px;
  right: 8px;
}

@media (max-width: 820px) {
  .hero-inner,
  .two-col {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    transform: none;
  }
  .step {
    grid-template-columns: 40px 1fr;
  }
  .step-num {
    width: 40px;
    height: 40px;
  }
  .step-side {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .steam-form {
    grid-column: 1 / -1;
  }
  .card {
    padding: 20px;
  }
  .app {
    padding: 64px 14px 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   Styl zwykły (codzienny) - html[data-theme="classic"]
   Bez śniegu, lampek i pejzażu: spokojne tło z poświatą w kolorze przycisków (ustawianym w panelu),
   wszystko statyczne - zero animacji w tle. color-mix() ma przed sobą zwykły kolor dla starszych przeglądarek.
   ===================================================================== */

html[data-theme="classic"] {
  --accent: #7c5cff;
  --night: #0c0f1a;
  --card: #141826;
  --card-2: #1a1f31;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f4f8;
  --text-2: #b7bdd0;
  --text-3: #8089a3;
}
html[data-theme="classic"] .snow,
html[data-theme="classic"] .lights {
  display: none;
}
html[data-theme="classic"] .scene {
  background:
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.3px) 0 0 / 24px 24px,
    radial-gradient(900px 620px at 8% -8%, rgba(124, 92, 255, 0.3), transparent 62%),
    radial-gradient(760px 560px at 100% 4%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(1100px 700px at 50% 115%, rgba(124, 92, 255, 0.16), transparent 62%),
    linear-gradient(180deg, #0c0f1a 0%, #0e1220 100%);
  background:
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.3px) 0 0 / 24px 24px,
    radial-gradient(900px 620px at 8% -8%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    radial-gradient(760px 560px at 100% 4%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(1100px 700px at 50% 115%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    linear-gradient(180deg, #0c0f1a 0%, #0e1220 100%);
}
html[data-theme="classic"] a:not(.btn):not(.gcard) {
  color: #b9a8ff;
  color: color-mix(in srgb, var(--accent) 50%, #fff);
}
html[data-theme="classic"] :focus-visible {
  outline-color: #b9a8ff;
  outline-color: color-mix(in srgb, var(--accent) 50%, #fff);
}
html[data-theme="classic"] .app {
  padding-top: 48px;
}
html[data-theme="classic"] .card {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
html[data-theme="classic"] .section-head .orn {
  background: rgba(124, 92, 255, 0.18);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid rgba(124, 92, 255, 0.45);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

/* hero: cienka ramka z gradientem zamiast laski cukrowej */
html[data-theme="classic"] .hero {
  padding: 1px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), rgba(255, 255, 255, 0.1) 38%, rgba(255, 255, 255, 0.05) 62%, rgba(34, 211, 238, 0.7));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
html[data-theme="classic"] .hero-inner {
  border-radius: 23px;
  background: radial-gradient(640px 320px at 0% 0%, rgba(124, 92, 255, 0.2), transparent 70%), linear-gradient(160deg, #171b2d, #10131f);
  background: radial-gradient(640px 320px at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    linear-gradient(160deg, #171b2d, #10131f);
}
html[data-theme="classic"] .hero-inner::after {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
}
html[data-theme="classic"] .title {
  background: linear-gradient(100deg, #fff 0%, #d8cfff 50%, #fff 100%);
  background: linear-gradient(100deg, #fff 0%, color-mix(in srgb, var(--accent) 35%, #fff) 50%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
html[data-theme="classic"] .hero-art {
  transform: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, var(--accent), #1d2340);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
html[data-theme="classic"] .hero-art.is-empty::after {
  opacity: 0; /* bez wstążki prezentu */
}

/* odliczanie: ciemne kafelki z paskiem w kolorze przycisków */
html[data-theme="classic"] .cd {
  background: linear-gradient(180deg, #1f2439, #171b2c);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--accent);
}
html[data-theme="classic"] .cd::before {
  display: none;
}
html[data-theme="classic"] .cd b {
  text-shadow: none;
}
html[data-theme="classic"] .cd small {
  color: var(--text-3);
}

html[data-theme="classic"] .btn-primary {
  background: linear-gradient(180deg, #9a80ff, var(--accent));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #fff), var(--accent));
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.35);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}

/* nagrody */
html[data-theme="classic"] .prize:hover {
  transform: translateY(-4px);
}
html[data-theme="classic"] .prize-img {
  background: linear-gradient(135deg, #252b4a, #161a2c);
}
html[data-theme="classic"] .ribbon {
  background: var(--accent);
}

/* kroki i zasady */
html[data-theme="classic"] .step-num {
  background: linear-gradient(180deg, #262c47, #1b2033);
}
html[data-theme="classic"] .rules li::before {
  content: "";
  left: 9px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9a8ff;
  background: color-mix(in srgb, var(--accent) 60%, #fff);
}

/* zwycięzcy: złoto zostaje (to święto w każdym stylu), druga barwa - z koloru przycisków */
html[data-theme="classic"] .winner {
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.16), rgba(124, 92, 255, 0.12));
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.16), color-mix(in srgb, var(--accent) 14%, transparent));
}
html[data-theme="classic"] .winner img,
html[data-theme="classic"] .winner .av,
html[data-theme="classic"] .account img,
html[data-theme="classic"] .account .av {
  background: #262c47;
}
html[data-theme="classic"] .won {
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.24), rgba(124, 92, 255, 0.2));
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.24), color-mix(in srgb, var(--accent) 22%, transparent));
}
@media (max-width: 820px) {
  html[data-theme="classic"] .app {
    padding-top: 28px;
  }
}
