/* ════════════════════════════════════════════════════════════════════
   LEGENDS OF MARREN — portal graczy · styl „pixel-art MMO”
   • Font: GNU Unifont (16 px siatka pikseli, pełne polskie znaki, licencja OFL 1.1)
     Rozmiary tekstu TYLKO 16 / 32 / 48 px — wtedy każdy piksel fontu jest ostry.
   • Ramki: oryginalne grafiki UI z gry (cs_frame / cs_cavity / skill_slot) w skali 1:1.
   • Przyciski: czyste CSS z „ząbkowanymi” narożnikami 4 px (clip-path) i głębią jak w grze.
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "MarrenPixel";
  src: url("assets/fonts/unifont-pl.woff") format("woff");
  font-display: swap;
}

:root {
  /* tło nocnego nieba */
  --void: #0b0914;
  --night: #120f22;
  --night-2: #1a1530;
  --night-3: #251d40;
  --plum: #3a2b55;
  --ink: #07050c;

  /* drewno z ramek gry */
  --wood-0: #100b09;
  --wood-1: #241811;
  --wood-2: #422a18;
  --wood-3: #5a3c24;
  --wood-4: #704c2c;
  --wood-5: #92683e;

  /* złoto i żar z logo */
  --gold-0: #6b3c10;
  --gold-1: #c47a1e;
  --gold-2: #f0a830;
  --gold-3: #ffd66b;
  --gold-4: #fff2b8;
  --ember: #ff6a3d;
  --rose: #d63c5e;
  --wine: #5a1d3a;

  /* natura i waluta */
  --leaf: #7bd04f;
  --leaf-dark: #2f6b2a;
  --emerald: #47e08a;
  --emerald-2: #22b066;
  --emerald-dark: #0f5c37;
  --sky: #6cc8ff;
  --mana: #6b8cff;
  --violet: #b27dff;

  /* tekst */
  --cream: #f6ead0;
  --parchment: #e3d2ae;
  --muted: #a99bbd;
  --muted-2: #7c6f93;

  --px: 4px;
  --wrap: 1184px;
  --notch: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
  --notch-8: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px), 0 8px, 4px 8px, 4px 4px, 8px 4px);
}

[hidden] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--void);
  /* pikselowe gwiazdy (kwadraty 2×2 i 4×4, bez rozmycia) */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' shape-rendering='crispEdges'%3E%3Cg fill='%23ffffff'%3E%3Crect x='12' y='30' width='2' height='2' opacity='.5'/%3E%3Crect x='96' y='8' width='2' height='2' opacity='.35'/%3E%3Crect x='170' y='60' width='4' height='4' opacity='.18'/%3E%3Crect x='210' y='140' width='2' height='2' opacity='.45'/%3E%3Crect x='60' y='120' width='2' height='2' opacity='.3'/%3E%3Crect x='130' y='190' width='2' height='2' opacity='.5'/%3E%3Crect x='30' y='210' width='4' height='4' opacity='.12'/%3E%3C/g%3E%3Crect x='150' y='110' width='2' height='2' fill='%23ffd66b' opacity='.4'/%3E%3C/svg%3E");
  color: var(--parchment);
  font-family: "MarrenPixel", "Courier New", monospace;
  font-size: 16px;
  line-height: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold-3);
}

::selection {
  background: var(--gold-2);
  color: var(--ink);
}

:focus-visible {
  outline: 4px solid var(--gold-3);
  outline-offset: 2px;
}

code {
  font-family: inherit;
  color: var(--gold-3);
  background: rgba(255, 214, 107, 0.08);
  padding: 0 4px;
}

strong {
  color: var(--cream);
  font-weight: normal;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.px-icon,
.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ══════════════ RAMKI Z GRY (1:1, ostre) ══════════════ */
.oak-frame {
  border-style: solid;
  border-color: transparent;
  border-width: 28px 34px 30px 28px;
  border-image: url("assets/ui/cs_frame.png") 28 34 30 28 fill;
  image-rendering: pixelated;
}

.cavity-box {
  border: 4px solid transparent;
  border-image: url("assets/ui/cs_cavity.png") 4 fill;
  image-rendering: pixelated;
}

/* Panel „nocnego kamienia” — druga, chłodna faktura obok drewna */
.px-panel {
  position: relative;
  background: var(--night-2);
  clip-path: var(--notch);
  box-shadow:
    inset 0 0 0 4px var(--ink),
    inset 0 0 0 8px var(--plum),
    inset 0 -12px 0 0 rgba(0, 0, 0, 0.25);
}

/* ══════════════ PRZYCISKI PIKSELOWE ══════════════ */
.plank-btn {
  --b: var(--wood-3);
  --hl: var(--wood-5);
  --sh: var(--wood-1);
  --fg: var(--cream);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 20px 12px;
  border: 0;
  background-color: var(--b);
  background-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 8px, rgba(0, 0, 0, 0.08) 8px 12px);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  cursor: pointer;
  clip-path: var(--notch);
  box-shadow:
    inset 0 0 0 4px var(--ink),
    inset 0 8px 0 0 var(--hl),
    inset 0 -8px 0 0 var(--sh),
    inset 8px 0 0 0 color-mix(in srgb, var(--hl) 55%, var(--b)),
    inset -8px 0 0 0 color-mix(in srgb, var(--sh) 60%, var(--b));
  transition: transform 80ms steps(2), filter 80ms steps(2);
  user-select: none;
}

.plank-btn .px-icon {
  width: auto;
  height: 24px;
  max-width: 28px;
  object-fit: contain;
}

.plank-btn:hover {
  filter: brightness(1.14);
  --fg: var(--gold-4);
}

.plank-btn:active,
.plank-btn.is-pressed {
  transform: translateY(4px);
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow:
    inset 0 0 0 4px var(--ink),
    inset 0 4px 0 0 var(--sh),
    inset 0 -4px 0 0 var(--hl);
}

.plank-btn:disabled {
  filter: grayscale(0.7) brightness(0.75);
  cursor: wait;
}

.plank-btn.active {
  --b: var(--wood-4);
  --hl: #c99559;
  --fg: var(--gold-3);
  box-shadow:
    inset 0 0 0 4px var(--gold-3),
    inset 0 0 0 8px var(--ink),
    inset 0 12px 0 0 var(--hl),
    inset 0 -12px 0 0 var(--sh);
}

.plank-primary {
  --b: var(--gold-2);
  --hl: var(--gold-4);
  --sh: var(--gold-1);
  --fg: var(--ink);
  text-shadow: 2px 2px 0 rgba(255, 242, 184, 0.6);
}

.plank-primary:hover {
  --fg: var(--ink);
  filter: brightness(1.08) saturate(1.1);
}

.plank-emerald {
  --b: var(--emerald-2);
  --hl: #9cf7bd;
  --sh: var(--emerald-dark);
  --fg: #04140b;
  text-shadow: 2px 2px 0 rgba(200, 255, 220, 0.45);
}

.plank-emerald:hover {
  --fg: #04140b;
}

.plank-ember {
  --b: var(--rose);
  --hl: #ff9a86;
  --sh: var(--wine);
  --fg: var(--cream);
}

.plank-night {
  --b: var(--night-3);
  --hl: #4b3b70;
  --sh: var(--ink);
  --fg: var(--cream);
}

.plank-sm {
  min-height: 40px;
  padding: 6px 14px 10px;
}

.plank-xs {
  min-height: 32px;
  padding: 2px 10px 6px;
  gap: 4px;
}

.plank-lg {
  min-height: 64px;
  padding: 16px 28px 20px;
}

.plank-btn.plank-sm .px-icon,
.plank-btn.plank-xs .px-icon {
  height: 16px;
}

/* ══════════════ NAWIGACJA ══════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 5, 12, 0.94);
  box-shadow: 0 4px 0 var(--plum), 0 8px 0 var(--ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold-3);
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--wine);
  white-space: nowrap;
}

.brand-shield {
  width: 40px;
  height: 44px;
}

.brand small {
  display: block;
  color: var(--muted);
  text-shadow: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 8px 10px;
  white-space: nowrap;
  color: var(--parchment);
  text-decoration: none;
}

.nav-links a::before {
  content: "▸";
  position: absolute;
  left: -2px;
  color: var(--gold-3);
  opacity: 0;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--gold-3);
}

.nav-links a:hover::before,
.nav-links a.is-current::before {
  opacity: 1;
  animation: px-blink 0.8s steps(2) infinite;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--muted);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--night-3);
  white-space: nowrap;
}

.srv-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--muted-2);
}

.server-pill.online {
  color: #b6f5c9;
  box-shadow: inset 0 0 0 4px var(--emerald-dark);
}

.server-pill.online .srv-dot {
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(71, 224, 138, 0.25);
  animation: px-blink 1.2s steps(2) infinite;
}

.server-pill.offline {
  color: #f4a7a0;
  box-shadow: inset 0 0 0 4px var(--wine);
}

.server-pill.offline .srv-dot {
  background: var(--rose);
}

.gem-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 14px 4px 8px;
  border: 0;
  background: #0b2a1a;
  color: #b8ffd2;
  font: inherit;
  cursor: pointer;
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--emerald-dark), inset 0 -8px 0 rgba(0, 0, 0, 0.3);
}

.gem-pill .px-icon {
  width: 32px;
  height: 32px;
}

.gem-pill:hover {
  filter: brightness(1.2);
}

.gem-pill-lg {
  min-height: 48px;
}

/* ══════════════ HERO ══════════════ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100vh, 920px);
  min-height: min(100svh, 920px);
  padding: 72px 0 120px;
  overflow: hidden;
  isolation: isolate;
  background: var(--void) url("assets/video/promo_wedkowanie.webp") center / cover no-repeat;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity 0.6s steps(6);
}

.hero-video.is-ready {
  opacity: 1;
}

#fireflies-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(11, 9, 20, 0.85) 0%, rgba(11, 9, 20, 0.35) 22%, rgba(11, 9, 20, 0.45) 60%, var(--void) 100%),
    radial-gradient(ellipse at 50% 45%, rgba(11, 9, 20, 0.15) 0%, rgba(11, 9, 20, 0.7) 75%);
}

/* subtelny dithering 2×2 jak na starych monitorach */
.hero-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='2' height='2' fill='%23000'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23000'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.sanctuary-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 10px;
  background: rgba(7, 5, 12, 0.86);
  color: var(--gold-3);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--gold-1), inset 0 0 0 8px var(--ink);
  letter-spacing: 1px;
}

.sanctuary-pill .px-icon {
  width: 20px;
  height: 22px;
}

.sanctuary-pill .release-tag {
  padding: 0 8px;
  background: var(--rose);
  color: var(--cream);
}

.hero-logo {
  width: 678px;
  max-width: 92vw;
  height: auto;
  margin: 28px auto 12px;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 0 rgba(7, 5, 12, 0.75));
  animation: logo-bob 3.2s steps(4) infinite;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 0 0 var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* Pasek szybkiego dostępu jak w MMO (1–4) */
.hud-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 1136px;
  margin-top: 48px;
  padding: 8px;
  background: rgba(7, 5, 12, 0.82);
}

.hud-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  text-align: left;
}

.hud-slot {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  background: url("assets/ui/skill_slot_frame.png") center / 64px 64px no-repeat;
  image-rendering: pixelated;
}

.hud-slot .px-icon {
  width: 32px;
  height: auto;
  max-height: 32px;
  object-fit: contain;
}

.hud-key {
  position: absolute;
  top: -6px;
  left: -6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: var(--gold-3);
  box-shadow: inset 0 0 0 2px var(--gold-1);
}

.hud-pill strong {
  display: block;
  color: var(--gold-3);
}

.hud-pill span {
  display: block;
  color: var(--muted);
}

.hero-clip-bar {
  position: absolute;
  left: 24px;
  bottom: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(7, 5, 12, 0.85);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--night-3);
  color: var(--muted);
}

.hero-clip-bar .clip-label {
  min-width: 15ch;
  color: var(--cream);
}

.clip-dots {
  display: flex;
  gap: 6px;
}

.clip-dot {
  width: 16px;
  height: 16px;
  border: 0;
  background: var(--night-3);
  cursor: pointer;
  box-shadow: inset 0 0 0 4px var(--ink);
}

.clip-dot.active {
  background: var(--gold-2);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  color: var(--gold-3);
  text-decoration: none;
  animation: px-bounce 1.2s steps(2) infinite;
}

/* ══════════════ SEKCJE + MURY ZAMKOWE ══════════════ */
.section {
  --sec-bg: var(--void);
  position: relative;
  padding: 96px 0 104px;
  background-color: var(--sec-bg);
}

.section-dark {
  --sec-bg: var(--night);
}

/* krenelaż (blanki) na górnej krawędzi każdej sekcji */
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  background-color: var(--sec-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' shape-rendering='crispEdges'%3E%3Crect y='12' width='48' height='12'/%3E%3Crect x='0' y='0' width='24' height='12'/%3E%3C/svg%3E") 0 0 / 48px 24px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' shape-rendering='crispEdges'%3E%3Crect y='12' width='48' height='12'/%3E%3Crect x='0' y='0' width='24' height='12'/%3E%3C/svg%3E") 0 0 / 48px 24px repeat-x;
  pointer-events: none;
}

.sec-head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 0 12px;
  color: var(--gold-3);
  background: var(--wine);
  box-shadow: 4px 0 0 var(--wine), -4px 0 0 var(--wine), 0 4px 0 var(--ink);
  letter-spacing: 2px;
}

.eyebrow::before {
  content: "◆ ";
  color: var(--ember);
}

h1,
h2,
h3,
h4 {
  font-weight: normal;
  line-height: 1.25;
}

.sec-head h2,
.download-board h2,
.trailer-copy h2,
.premiere-band h2 {
  font-size: 32px;
  line-height: 40px;
  color: var(--gold-3);
  /* stopniowane złoto jak w logo + pikselowy obrys */
  background: linear-gradient(180deg, var(--gold-4) 0 30%, var(--gold-3) 30% 58%, var(--gold-2) 58% 82%, var(--ember) 82% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink)) drop-shadow(0 4px 0 var(--wine));
}

.sec-lead {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
}

h3 {
  color: var(--gold-3);
  font-size: 16px;
}

h4 {
  color: var(--cream);
  font-size: 16px;
}

.mini-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-2);
  letter-spacing: 1px;
}

.status-tag {
  display: inline-block;
  padding: 0 8px;
  background: var(--night-3);
  color: var(--muted);
}

.status-tag.on {
  background: var(--emerald-dark);
  color: #c4ffd9;
}

.status-tag.warn {
  background: var(--wine);
  color: #ffc2b8;
}

/* ══════════════ TRAILER + GAMEPLAY ══════════════ */
.trailer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.trailer-frame {
  position: relative;
}

.yt-facade {
  position: relative;
  display: block;
  font: inherit;
  color: inherit;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--ink) center / cover no-repeat;
  cursor: pointer;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s steps(4);
}

.yt-facade:hover img {
  transform: scale(1.03);
}

.yt-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 5, 12, 0) 45%, rgba(7, 5, 12, 0.85) 100%);
}

.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.yt-play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.yt-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cream);
  text-align: left;
  text-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
}

.yt-caption span:last-child {
  color: var(--muted);
}

.yt-frame-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--ink);
}

.yt-note {
  margin-top: 12px;
  color: var(--muted-2);
}

.trailer-copy h2 {
  margin-bottom: 12px;
}

.trailer-copy p {
  color: var(--muted);
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.clip-card {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
  clip-path: var(--notch);
}

.clip-card video,
.clip-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.clip-card .clip-name {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 4px 8px;
  background: rgba(7, 5, 12, 0.82);
}

.clip-card .clip-name::before {
  content: "▶ ";
  color: var(--gold-3);
}

.clip-card::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 4px var(--plum);
  pointer-events: none;
}

.clip-card:hover::after,
.clip-card:focus-visible::after {
  box-shadow: inset 0 0 0 4px var(--gold-2);
}

/* ══════════════ PREMIERA + DISCORD ══════════════ */
.premiere-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-top: 56px;
  padding: 28px 32px;
}

.premiere-year {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  background: var(--wine);
  color: var(--gold-3);
  font-size: 48px;
  line-height: 48px;
  text-align: center;
  clip-path: var(--notch-8);
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--rose), inset 0 -16px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 4px 4px 0 var(--ink);
}

.premiere-year small {
  display: block;
  font-size: 16px;
  line-height: 24px;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}

.premiere-band h2 {
  text-align: left;
}

.premiere-band p {
  margin-top: 8px;
  color: var(--muted);
}

.premiere-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pixel-chat {
  width: 24px;
  height: 24px;
}

/* ══════════════ KRONIKA: FRAKCJE ══════════════ */
.faction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.faction-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.faction-portrait-wrap {
  align-self: start;
  padding: 4px;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--gold-1), 0 8px 0 4px var(--ink);
}

.faction-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.faction-goblin .faction-portrait-wrap {
  box-shadow: 0 0 0 4px var(--leaf-dark), 0 8px 0 4px var(--ink);
}

.faction-tag {
  color: var(--ember);
  letter-spacing: 1px;
}

.faction-goblin .faction-tag {
  color: var(--leaf);
}

.faction-body h3 {
  margin: 4px 0 8px;
  font-size: 32px;
  line-height: 40px;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}

.faction-body p {
  color: var(--muted);
}

.lore-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}

.lore-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.lore-list .px-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-top: 0;
}

.threat-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  padding: 24px;
}

.threat-side {
  display: flex;
  align-items: center;
  gap: 20px;
}

.threat-right {
  justify-content: flex-end;
  text-align: right;
}

.threat-divider {
  background: repeating-linear-gradient(180deg, var(--wood-3) 0 8px, transparent 8px 16px);
}

.threat-label {
  color: var(--violet);
  letter-spacing: 1px;
}

.threat-label.gold {
  color: var(--gold-3);
}

.threat-side h4 {
  margin: 2px 0 6px;
  color: var(--cream);
}

.threat-side p {
  color: var(--muted);
}

.pillar-badge {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  background: url("assets/ui/skill_slot_frame.png") center / 72px 72px no-repeat;
  image-rendering: pixelated;
}

.pillar-badge .px-icon {
  width: 48px;
  height: 48px;
}

/* ══════════════ KLASY ══════════════ */
.class-board {
  padding: 8px;
}

.class-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.class-stage {
  display: grid;
  grid-template-columns: 488px minmax(0, 1fr);
  gap: 32px;
  padding: 24px;
}

.class-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.stage-frame {
  position: relative;
  padding: 4px;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--wood-4), 0 0 0 8px var(--ink);
}

.stage-canvas {
  width: 488px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 244 / 172;
  image-rendering: pixelated;
  cursor: pointer;
}

.stage-arrow {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 48px;
  border: 0;
  background: rgba(7, 5, 12, 0.85);
  color: var(--gold-3);
  font: inherit;
  font-size: 32px;
  line-height: 40px;
  cursor: pointer;
  transform: translateY(-50%);
  clip-path: var(--notch);
}

.stage-arrow:hover {
  background: var(--wood-3);
}

.stage-arrow-l {
  left: 8px;
}

.stage-arrow-r {
  right: 8px;
}

.stage-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.race-switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--ink);
}

.race-btn {
  padding: 4px 16px;
  border: 0;
  background: var(--night-3);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.race-btn.active {
  background: var(--gold-2);
  color: var(--ink);
}

.stage-hint {
  color: var(--muted-2);
}

.cls-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cls-role {
  color: var(--ember);
  letter-spacing: 1px;
}

.cls-header h3 {
  font-size: 48px;
  line-height: 56px;
  color: var(--cream);
  text-shadow: 4px 4px 0 var(--ink);
}

.cls-weapons {
  padding: 0 8px;
  background: var(--night-3);
  color: var(--sky);
}

.cls-desc {
  margin: 16px 0;
  color: var(--muted);
}

.cls-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--parchment);
}

.stat-top .px-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}

.stat-bar-bg,
.xp-bar-bg {
  position: relative;
  height: 16px;
  margin-top: 4px;
  background: var(--ink);
  box-shadow: inset 0 0 0 4px var(--wood-1);
}

.stat-bar-fill,
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(180deg, var(--gold-4) 0 25%, var(--gold-2) 25% 75%, var(--gold-1) 75%);
  box-shadow: inset 0 0 0 4px rgba(7, 5, 12, 0.35);
}

.xp-bar-fill {
  background: linear-gradient(180deg, #b8ffd0 0 25%, var(--emerald) 25% 75%, var(--emerald-2) 75%);
}

.cls-skills-wrap {
  margin-top: 24px;
}

.skill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-slot {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 0;
  background: url("assets/ui/skill_slot_frame.png") center / 80px 80px no-repeat;
  cursor: pointer;
  image-rendering: pixelated;
}

.skill-slot img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.skill-slot:hover,
.skill-slot.active {
  background-image: url("assets/ui/skill_slot_frame_hover.png");
  transform: translateY(-4px);
}

.skill-detail {
  min-height: 72px;
  margin-top: 12px;
  padding: 12px 16px;
}

.skill-detail strong {
  display: block;
  color: var(--gold-3);
}

.skill-detail span {
  color: var(--muted);
}

/* ══════════════ RANKING ══════════════ */
.ranking-board {
  padding: 8px;
}

.ranking-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rank-class-tabs,
.rank-controls,
.shop-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-tab,
.shop-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 0;
  background: var(--ink);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--wood-2);
}

.rank-tab .px-icon {
  width: 16px;
  height: 16px;
}

.rank-tab:hover,
.shop-cat-btn:hover {
  color: var(--cream);
}

.rank-tab.active,
.shop-cat-btn.active {
  background: var(--gold-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--gold-1);
}

.rpg-input {
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 0 0 4px var(--wood-2), inset 0 8px 0 0 rgba(0, 0, 0, 0.6);
  clip-path: var(--notch);
}

.rpg-input::placeholder {
  color: var(--muted-2);
}

.rpg-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 4px var(--gold-2), inset 0 8px 0 0 rgba(0, 0, 0, 0.6);
}

.rpg-select {
  padding-right: 32px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffd66b' d='M0 0h12v2H0zM2 2h8v2H2zM4 4h4v2H4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.rank-meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
}

.rank-table-wrap {
  overflow-x: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th {
  padding: 12px;
  background: var(--wood-1);
  color: var(--gold-2);
  text-align: left;
  font-weight: normal;
  letter-spacing: 1px;
  white-space: nowrap;
}

.rank-table td {
  padding: 10px 12px;
  border-top: 4px solid var(--wood-0);
  vertical-align: middle;
}

.rank-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.rank-table tbody tr:hover td {
  background: rgba(255, 214, 107, 0.06);
}

.col-pos {
  width: 56px;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  background: var(--night-3);
  color: var(--muted);
  clip-path: var(--notch);
}

.rank-badge.r1 {
  background: var(--gold-2);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--gold-1), inset 0 4px 0 var(--gold-4);
}

.rank-badge.r2 {
  background: #c7d0de;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 #7e8aa0;
}

.rank-badge.r3 {
  background: #d98a4e;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 #8a4a22;
}

.rank-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rank-hero-name {
  color: var(--cream);
}

.rank-online-tag {
  padding: 0 6px;
  background: var(--emerald-dark);
  color: #c4ffd9;
}

.rank-hero-title {
  display: block;
  color: var(--violet);
}

.rank-cls-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.rank-cls-cell .px-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.rank-lvl-pill {
  display: inline-block;
  padding: 0 8px;
  background: var(--wine);
  color: var(--gold-3);
  white-space: nowrap;
}

.col-xp {
  min-width: 180px;
}

.xp-bar-txt {
  margin-top: 2px;
  color: var(--muted-2);
}

.rank-empty {
  padding: 32px !important;
  color: var(--muted);
  text-align: center;
}

/* ══════════════ ITEM SHOP ══════════════ */
.shop-board {
  padding: 8px;
}

.wallet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

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

.gem-emblem {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: url("assets/ui/skill_slot_frame.png") center / 72px 72px no-repeat;
  image-rendering: pixelated;
}

.gem-emblem .px-icon {
  width: 64px;
  height: 64px;
  animation: gem-shine 2.4s steps(2) infinite;
}

.wallet-eyebrow {
  color: var(--emerald);
  letter-spacing: 1px;
}

.wallet-val {
  color: var(--cream);
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.shop-cat-bar {
  margin-bottom: 16px;
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.shop-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: var(--night-2);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--plum), inset 0 -12px 0 rgba(0, 0, 0, 0.25);
  transition: transform 80ms steps(2);
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--gold-1), inset 0 -12px 0 rgba(0, 0, 0, 0.25);
}

.shop-card-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.shop-icon-box {
  display: grid;
  place-items: center;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  background: url("assets/ui/skill_slot_frame.png") center / 80px 80px no-repeat;
  image-rendering: pixelated;
}

.shop-icon-box img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.shop-badge {
  display: inline-block;
  padding: 0 6px;
  background: var(--gold-2);
  color: var(--ink);
}

.shop-card h4 {
  margin: 6px 0 2px;
  color: var(--cream);
}

.shop-card-meta {
  color: var(--muted-2);
}

.shop-card-desc {
  color: var(--muted);
}

.shop-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 4px dashed var(--night-3);
}

.shop-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
}

.shop-price .px-icon {
  width: 32px;
  height: 32px;
}

.gem-packs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gem-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 32px 16px 20px;
  background: #0c1f17;
  text-align: center;
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--emerald-dark), inset 0 -16px 0 rgba(0, 0, 0, 0.3);
}

.gem-pack-card.popular {
  background: #12301f;
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--gold-2), inset 0 -16px 0 rgba(0, 0, 0, 0.3);
}

.pack-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 0 4px;
  background: var(--emerald-dark);
  color: #c4ffd9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gem-pack-card.popular .pack-tag {
  background: var(--gold-2);
  color: var(--ink);
}

.pack-gem-stack img {
  width: 96px;
  height: 96px;
  margin: 8px auto 0;
  image-rendering: pixelated;
  animation: gem-float 2.4s steps(4) infinite;
}

.pack-amount {
  color: var(--emerald);
  font-size: 32px;
  line-height: 40px;
  text-shadow: 2px 2px 0 var(--ink);
}

.pack-name {
  color: var(--cream);
}

.pack-bonus,
.pack-methods {
  color: var(--muted-2);
}

.pack-price {
  margin: 8px 0;
  color: var(--gold-3);
  font-size: 32px;
  line-height: 40px;
  text-shadow: 2px 2px 0 var(--ink);
}

.pack-buy-btn {
  width: 100%;
}

.voucher-box {
  margin-top: 24px;
  padding: 20px;
}

.voucher-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.voucher-head .px-icon {
  width: 32px;
  height: 32px;
}

.voucher-head p {
  color: var(--muted);
}

.voucher-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.voucher-input {
  flex: 1 1 260px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.safe-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(15, 92, 55, 0.18);
  box-shadow: inset 4px 0 0 var(--emerald-2);
  color: var(--muted);
}

.safe-note strong {
  color: #b8ffd2;
}

/* ══════════════ ATLAS ══════════════ */
.atlas-board {
  padding: 8px;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 16px;
}

.atlas-map-wrap {
  padding: 8px;
}

.atlas-map-stage {
  position: relative;
}

.atlas-map-img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.atlas-pins {
  position: absolute;
  inset: 0;
}

.atlas-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 0;
  background: var(--gold-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--ink);
}

.atlas-pin.fog-pin {
  background: var(--night-3);
  color: var(--muted);
  line-height: 24px;
}

.atlas-pin.active {
  width: 32px;
  height: 32px;
  background: var(--ember);
  animation: px-blink 1s steps(2) infinite;
}

.atlas-pin::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 0 8px;
  background: var(--ink);
  color: var(--cream);
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.atlas-pin.active::after,
.atlas-pin:hover::after {
  opacity: 1;
}

.atlas-pin.align-left::after {
  left: 0;
  transform: none;
}

.atlas-pin.align-right::after {
  left: auto;
  right: 0;
  transform: none;
}

.atlas-pin.align-bottom::after {
  bottom: auto;
  top: calc(100% + 8px);
}

.atlas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  color: var(--muted);
}

.leg-dot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  font-style: normal;
}

.leg-open {
  background: var(--gold-2);
}

.leg-fog {
  background: var(--night-3);
  color: var(--muted);
}

.atlas-inspector {
  padding: 20px;
}

.atlas-npc-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.atlas-npc-thumb {
  width: 88px;
  height: 88px;
  padding: 4px;
  object-fit: cover;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--wood-4);
}

.atlas-lvl {
  display: inline-block;
  padding: 0 6px;
  background: var(--wine);
  color: var(--gold-3);
}

.atlas-npc-row h3 {
  margin: 4px 0 0;
  color: var(--cream);
}

.atlas-sub {
  color: var(--muted-2);
}

.atlas-desc {
  margin: 16px 0;
  color: var(--muted);
}

.atlas-meta {
  display: grid;
  gap: 8px;
  color: var(--parchment);
}

.atlas-meta > div {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.atlas-meta .px-icon {
  width: 24px;
  height: 24px;
}

/* ══════════════ ZBROJOWNIA ══════════════ */
.armory-board {
  padding: 8px;
}

.armory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.inv-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 0;
  background: url("assets/ui/skill_slot_frame.png") center / 80px 80px no-repeat;
  cursor: pointer;
  image-rendering: pixelated;
}

.inv-slot img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.inv-slot:hover,
.inv-slot.active {
  background-image: url("assets/ui/skill_slot_frame_hover.png");
}

.inv-badge {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: var(--gold-3);
  text-shadow: 2px 2px 0 var(--ink);
}

.armory-note {
  margin-top: 12px;
  color: var(--muted-2);
}

.marren-tooltip {
  padding: 20px;
  background: #0d0a16;
  border: 4px solid var(--violet);
  box-shadow: 0 0 0 4px var(--ink), 8px 8px 0 4px rgba(0, 0, 0, 0.5);
}

.tt-head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tt-icon-box {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 4px solid var(--violet);
  background: var(--ink);
}

.tt-icon-img {
  width: 64px;
  height: 64px;
}

.tt-name {
  color: var(--violet);
}

.tt-type {
  color: var(--muted-2);
}

.tt-sep {
  height: 4px;
  margin: 12px 0;
  background: var(--violet);
}

.tt-sep-dim {
  background: var(--night-3) !important;
}

.tt-primary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tt-primary .px-icon,
.tt-row .px-icon,
.tt-gold .px-icon {
  width: 14px;
  height: 14px;
}

.tt-stats {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tt-row-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--parchment);
}

.tt-desc {
  color: var(--muted);
}

.tt-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tt-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-3);
}

.tt-hint {
  color: var(--muted-2);
}

/* ══════════════ GALERIA ══════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  padding: 8px;
  cursor: zoom-in;
}

.gallery-img-wrap {
  overflow: hidden;
  background: var(--ink);
}

.gallery-img-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s steps(4);
}

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

.gallery-card figcaption {
  padding: 12px 8px 8px;
}

.gallery-card figcaption strong {
  display: block;
  color: var(--gold-3);
}

.gallery-card figcaption span {
  color: var(--muted);
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.cast-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
}

.cast-card img {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--wood-3);
}

.cast-card span {
  display: block;
  color: var(--ember);
}

.cast-card p {
  color: var(--muted);
}

/* ══════════════ POBIERZ ══════════════ */
.download-board {
  text-align: center;
  padding: 32px;
}

.download-board h2 {
  margin: 8px 0;
}

.download-board .hero-actions {
  margin-top: 24px;
}

.download-msg {
  min-height: 24px;
  margin-top: 12px;
  color: var(--emerald);
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  text-align: left;
}

.req-grid > div {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
}

.req-grid .px-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ══════════════ STOPKA ══════════════ */
.footer {
  position: relative;
  padding: 48px 0 32px;
  background: var(--ink);
}

.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  background: var(--leaf-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M0 16h32v8H0zM2 12h4v4H2zM10 8h4v8h-4zM18 12h4v4h-4zM26 4h4v12h-4z'/%3E%3C/svg%3E") 0 0 / 32px 24px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M0 16h32v8H0zM2 12h4v4H2zM10 8h4v8h-4zM18 12h4v4h-4zM26 4h4v12h-4z'/%3E%3C/svg%3E") 0 0 / 32px 24px repeat-x;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--parchment);
}

.footer-brand .px-icon {
  width: 40px;
  height: 44px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-3);
}

.footer-meta {
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 4px solid var(--night-2);
  color: var(--muted-2);
}

/* ══════════════ MODALE / LIGHTBOX / TOAST ══════════════ */
.rpg-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.rpg-modal[hidden],
.lightbox[hidden],
.portal-toast[hidden] {
  display: none;
}

.rpg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 12, 0.8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='2' height='2' fill='%23000' opacity='.5'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23000' opacity='.5'/%3E%3C/svg%3E");
}

.rpg-modal-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 8px;
  animation: px-pop 160ms steps(4);
}

.rpg-modal-sm .rpg-modal-panel {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-head h3 {
  font-size: 32px;
  line-height: 40px;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tab {
  flex: 1;
}

.auth-form {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.auth-note {
  color: var(--muted);
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--gold-2);
}

.field-label .rpg-input {
  width: 100%;
}

.form-msg {
  min-height: 24px;
  color: var(--muted);
}

.form-msg.ok {
  color: var(--emerald);
}

.form-msg.err {
  color: #ff8a78;
}

.auth-submit {
  width: 100%;
}

.acc-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.acc-login-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.acc-login-row strong {
  color: var(--gold-3);
  font-size: 32px;
  line-height: 40px;
}

.acc-sub {
  color: var(--muted-2);
}

.acc-wallet-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.acc-block {
  padding: 16px;
}

.acc-list {
  display: grid;
  gap: 8px;
}

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.acc-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-row-left .px-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.acc-row small {
  display: block;
  color: var(--muted-2);
  font-size: 16px;
}

.acc-history {
  display: grid;
  gap: 4px;
}

.hist-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.hist-line small {
  color: var(--muted-2);
  font-size: 16px;
}

.hist-plus {
  color: var(--emerald);
}

.hist-minus {
  color: #ff8a78;
}

.confirm-body {
  padding: 20px;
}

.confirm-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.confirm-item .shop-icon-box {
  flex-basis: 80px;
}

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

.confirm-actions .plank-btn {
  flex: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(7, 5, 12, 0.94);
}

.lightbox img,
.lightbox video {
  max-width: min(1280px, 100%);
  max-height: calc(100vh - 140px);
  box-shadow: 0 0 0 4px var(--gold-1), 0 0 0 8px var(--ink);
  image-rendering: pixelated;
}

.lightbox p {
  max-width: 900px;
  color: var(--cream);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.portal-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  max-width: min(560px, calc(100% - 32px));
  padding: 12px 20px 12px 52px;
  background: var(--ink) url("assets/items/gem_cut_emerald.png") 12px center / 32px 32px no-repeat;
  color: var(--cream);
  image-rendering: pixelated;
  transform: translateX(-50%);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 4px var(--emerald-2);
  animation: px-pop 160ms steps(4);
}

.portal-toast.err {
  background-image: url("assets/ui/stat_heart.png");
  background-size: 28px 28px;
  box-shadow: inset 0 0 0 4px var(--rose);
}

/* ══════════════ ANIMACJE (skokowe, jak w grze) ══════════════ */
@keyframes px-blink {
  50% {
    opacity: 0.25;
  }
}

@keyframes px-bounce {
  50% {
    transform: translate(-50%, 8px);
  }
}

@keyframes logo-bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes gem-float {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes gem-shine {
  50% {
    filter: brightness(1.35);
  }
}

@keyframes px-pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}

.portal-toast {
  animation-name: px-pop-toast;
}

@keyframes px-pop-toast {
  from {
    transform: translate(-50%, 16px);
    opacity: 0;
  }
}

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s steps(5), transform 0.5s steps(5);
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ══════════════ RESPONSYWNOŚĆ ══════════════ */
@media (max-width: 1180px) {
  .nav-links a {
    padding: 8px 8px;
  }

  .class-stage {
    grid-template-columns: 1fr;
  }

  .server-pill span {
    display: none;
  }
}

@media (max-width: 1020px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    margin-top: 8px;
    background: var(--ink);
    box-shadow: 0 4px 0 var(--plum);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
  }

  .nav-links a::before {
    left: 0;
  }

  .trailer-layout,
  .atlas-layout,
  .armory-layout,
  .faction-grid {
    grid-template-columns: 1fr;
  }

  .shop-items-grid,
  .gallery-grid,
  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gem-packs-grid,
  .hud-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premiere-band {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .premiere-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-clip-bar {
    display: none;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  .section {
    padding: 80px 0 88px;
  }

  .topbar-inner {
    min-height: 64px;
  }

  .brand-text {
    display: none;
  }

  .hero-logo {
    width: 452px;
  }

  .hud-strip,
  .shop-items-grid,
  .gallery-grid,
  .cast-grid,
  .req-grid,
  .acc-grid,
  .cls-stats,
  .shop-mode-tabs {
    grid-template-columns: 1fr;
  }

  .yt-caption {
    display: none;
  }

  .yt-play.plank-lg {
    min-height: 48px;
    padding: 8px 16px 12px;
  }

  .section {
    padding: 72px 0 80px;
  }

  .gem-packs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faction-card {
    grid-template-columns: 1fr;
  }

  .faction-portrait-wrap {
    max-width: 200px;
  }

  .class-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threat-banner {
    grid-template-columns: 1fr;
  }

  .threat-divider {
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--wood-3) 0 8px, transparent 8px 16px);
  }

  .threat-right {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: left;
  }

  .premiere-band {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .inv-grid {
    grid-template-columns: repeat(3, 80px);
  }

  .col-xp {
    display: none;
  }

  .class-board,
  .ranking-board,
  .shop-board,
  .atlas-board,
  .armory-board {
    padding: 0;
  }

  .class-stage,
  .download-board {
    padding: 12px;
  }

  .sec-head h2,
  .download-board h2,
  .trailer-copy h2,
  .premiere-band h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .cls-header h3 {
    font-size: 32px;
    line-height: 40px;
  }
}

@media (max-width: 460px) {
  .hero-logo {
    width: 339px;
  }

  .gem-packs-grid {
    grid-template-columns: 1fr;
  }

  .server-pill {
    display: none;
  }

  .hero-actions .plank-btn {
    width: 100%;
  }
}


/* ══════════════ PANEL ADMINISTRACYJNY VPS (admin.php) ══════════════ */
.admin-body {
  min-height: 100vh;
}

.admin-main {
  padding: 28px 0 56px;
}

.admin-wrap {
  max-width: 1260px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 8px;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #140e0b;
  border: 1px solid #593f26;
  border-radius: 4px;
}

.kpi-icon .px-icon {
  width: 28px;
  height: 28px;
}

.kpi-label {
  font-family: "MarrenPixel", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.kpi-val {
  font-family: "MarrenPixel", monospace;
  font-size: 1.45rem;
  color: var(--gold-bright);
  line-height: 1.15;
}

.kpi-val.kpi-green { color: #8af4ab; }
.kpi-val.kpi-red { color: #f28270; }
.kpi-muted { font-size: 0.85rem; color: var(--muted); }

.kpi-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.28fr;
  gap: 20px;
  align-items: start;
}

.admin-card {
  padding: 10px 12px;
}

.admin-login-card {
  max-width: 500px;
  margin: 40px auto;
}

.admin-sec-head {
  margin-bottom: 12px;
}

.admin-sec-head h3,
.admin-sec-head-row h3 {
  font-size: 1.38rem;
}

.admin-sec-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-link {
  font-family: "MarrenPixel", monospace;
  font-size: 0.88rem;
  color: var(--gold);
  text-decoration: none;
}

.admin-link:hover {
  color: var(--gold-bright);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  font-size: 0.88rem;
}

.admin-login-cell {
  font-family: "MarrenPixel", monospace;
  color: var(--gold-bright);
  font-size: 0.96rem;
}

.admin-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-sub-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}

.admin-char-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-char-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #1b130e;
  border: 1px solid #4e3823;
  border-radius: 3px;
  font-size: 0.8rem;
}

.admin-char-pill .px-icon {
  width: 15px;
  height: 15px;
}

.admin-char-pill strong {
  color: var(--cream);
  font-family: "MarrenPixel", monospace;
}

.admin-char-pill span {
  color: var(--gold);
  font-size: 0.74rem;
}

.admin-details {
  margin-top: 5px;
}

.admin-details summary {
  cursor: pointer;
  font-family: "MarrenPixel", monospace;
  font-size: 0.76rem;
  color: var(--gold);
}

.admin-mini-hist {
  margin-top: 6px;
  padding: 8px;
  background: #100b08;
  border: 1px solid #42301e;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 260px;
}

.tx-type-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 6px;
  border-radius: 2px;
  font-family: "MarrenPixel", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  border: 1px solid #594128;
  background: #211710;
  color: var(--gold);
}

.tx-type-badge.tx-voucher,
.tx-type-badge.tx-topup {
  background: rgba(92, 230, 138, 0.14);
  border-color: rgba(92, 230, 138, 0.45);
  color: #8af4ab;
}

.admin-vcode {
  font-family: "MarrenPixel", monospace;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  background: #100b08;
  padding: 3px 8px;
  border: 1px solid #4a3521;
  border-radius: 3px;
  font-size: 0.84rem;
}

.copy-mini-btn {
  margin-left: 6px;
  padding: 2px 8px;
  background: #231810;
  border: 1px solid #6b4e2e;
  border-radius: 3px;
  color: var(--cream);
  font-family: "MarrenPixel", monospace;
  font-size: 0.74rem;
  cursor: pointer;
}

.copy-mini-btn:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.admin-sys-strip {
  margin-top: 12px;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  font-size: 0.8rem;
}

.admin-sys-strip span {
  color: var(--muted);
  margin-right: 6px;
}

.admin-sys-strip strong {
  color: var(--gold-bright);
  font-family: "MarrenPixel", monospace;
}

.admin-code {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--cream);
  line-height: 1.65;
}

.admin-code code {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  background: rgba(10, 7, 5, 0.9);
  border: 1px solid #4e3924;
  color: var(--gold-bright);
  border-radius: 3px;
  word-break: break-all;
}

.admin-flash {
  padding: 12px 16px;
  margin-bottom: 16px;
  font-family: "MarrenPixel", monospace;
}

.admin-flash.ok { color: #9df6ba; }
.admin-flash.err { color: #ffb2a6; }

.admin-codes-out {
  margin-top: 14px;
  padding: 12px;
}

.admin-codes-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}



.admin-codes-area {
  width: 100%;
  font-family: "MarrenPixel", monospace;
  letter-spacing: 0.1em;
  color: #9df6ba;
  resize: vertical;
}

@media (max-width: 1020px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-kpi-grid,
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════
   POPRAWKI WIZUALNE v2 — klimat sekcji, czytelność, ranking, klasy, mobile
   (dopisane na końcu, nadpisują wcześniejsze reguły; rozmiary fontu nadal 16/32/48 px)
   ════════════════════════════════════════════════════════════════════ */

/* Czytelność: jaśniejszy tekst pomocniczy na ciemnym fiolecie */
:root {
  --muted: #c0b4d4;
  --muted-2: #9a8db1;
}

/* ── Pasek postępu przewijania (pikselowy, skok co 4 px) ── */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ember), var(--gold-2) 60%, var(--gold-3));
  box-shadow: 0 4px 0 rgba(7, 5, 12, 0.6);
}

/* ── Przycisk „Pobierz grę” w nagłówku (tylko szerokie ekrany) ── */
.nav-dl-btn {
  display: none;
}
@media (min-width: 1320px) {
  .nav-dl-btn {
    display: inline-flex;
  }
}

/* ── Przycisk „do góry” ── */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  min-width: 48px;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.2s steps(3), transform 0.2s steps(3);
}
.to-top.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ── HERO: złota aura za logo ── */
.hero-inner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  z-index: -1;
  width: min(820px, 96vw);
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 170, 70, 0.30) 0%, rgba(214, 60, 94, 0.12) 38%, transparent 68%);
  pointer-events: none;
  animation: logo-aura 3.2s steps(4) infinite;
}
@keyframes logo-aura {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.hud-pill {
  transition: background 0.15s steps(2);
}
.hud-pill:hover {
  background: rgba(255, 214, 107, 0.06);
}
.hud-pill:hover .hud-slot {
  background-image: url("assets/ui/skill_slot_frame_hover.png");
}

/* ── Nagłówki sekcji: pikselowy ornament pod opisem ── */
.sec-head::after {
  content: "";
  display: block;
  width: 208px;
  height: 12px;
  margin: 24px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='208' height='12' shape-rendering='crispEdges'%3E%3Crect x='0' y='5' width='16' height='2' fill='%23c47a1e' opacity='0.3'/%3E%3Crect x='192' y='5' width='16' height='2' fill='%23c47a1e' opacity='0.3'/%3E%3Crect x='16' y='5' width='24' height='2' fill='%23c47a1e' opacity='0.6'/%3E%3Crect x='168' y='5' width='24' height='2' fill='%23c47a1e' opacity='0.6'/%3E%3Crect x='40' y='5' width='46' height='2' fill='%23c47a1e' opacity='1'/%3E%3Crect x='122' y='5' width='46' height='2' fill='%23c47a1e' opacity='1'/%3E%3Crect x='90' y='4' width='4' height='4' fill='%23ff6a3d' opacity='1'/%3E%3Crect x='114' y='4' width='4' height='4' fill='%23ff6a3d' opacity='1'/%3E%3Crect x='102' y='0' width='4' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='100' y='2' width='8' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='98' y='4' width='12' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='98' y='6' width='12' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='100' y='8' width='8' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='102' y='10' width='4' height='2' fill='%23f0a830' opacity='1'/%3E%3Crect x='102' y='4' width='4' height='4' fill='%23fff2b8' opacity='1'/%3E%3C/svg%3E") center / 208px 12px no-repeat;
}

/* ── Klimatyczne tła sekcji: prawdziwe kadry z gry, przyciemnione i ditherowane ── */
#kronika::after,
#ranking::after,
#atlas::after,
#galeria::after,
#pobierz::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='2' height='2' fill='%23000' opacity='1'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23000' opacity='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat,
    var(--sec-shot) center / cover no-repeat;
  image-rendering: pixelated;
  opacity: var(--sec-shot-alpha, 0.2);
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%);
  mask: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%);
  pointer-events: none;
}
#kronika { --sec-shot: url("assets/world/shot_barry_night.webp"); }
#ranking { --sec-shot: url("assets/world/shot_frostpeak_night.webp"); --sec-shot-alpha: 0.24; }
#atlas { --sec-shot: url("assets/world/atlas_fog.webp"); --sec-shot-alpha: 0.16; }
#galeria { --sec-shot: url("assets/world/shot_ship_voyage.webp"); --sec-shot-alpha: 0.14; }
#pobierz { --sec-shot: url("assets/world/shot_fishing_river.webp"); --sec-shot-alpha: 0.32; }
.section > .wrap {
  position: relative;
  z-index: 1;
}

/* ── Karty: reakcja na najechanie (skok o 4 px, złoty akcent) ── */
.faction-card,
.cast-card,
.clip-card,
.gallery-card,
.req-tile {
  transition: transform 80ms steps(2), filter 80ms steps(2);
}
.faction-card:hover,
.cast-card:hover,
.clip-card:hover,
.gallery-card:hover {
  transform: translateY(-4px);
  filter: brightness(1.08) drop-shadow(0 4px 0 rgba(7, 5, 12, 0.7));
}
.gallery-card:hover figcaption strong,
.cast-card:hover h4 {
  color: var(--gold-4);
}
.faction-card:hover .faction-portrait-wrap {
  box-shadow: 0 0 0 4px var(--gold-2), 0 0 0 8px var(--ink);
}

/* ── Scena klas: postać 3× (kadr z rozdroża) + winieta ── */
.stage-canvas {
  width: 486px;
  aspect-ratio: 162 / 115;
}
.stage-frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: radial-gradient(ellipse at 50% 62%, transparent 55%, rgba(7, 5, 12, 0.55) 100%);
  pointer-events: none;
}
.stage-arrow {
  z-index: 1;
}

/* ── Ranking: ozdobny pusty stan + widmowe wiersze ── */
.rank-sleep-row td {
  padding: 28px 16px !important;
  background: rgba(7, 5, 12, 0.35) !important;
}
.rank-sleep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.rank-sleep-ico {
  flex: 0 0 auto;
  width: 60px;
  height: 66px;
  image-rendering: pixelated;
  animation: px-bounce 1.6s steps(2) infinite;
  filter: drop-shadow(0 4px 0 var(--ink)) grayscale(0.35);
}
.rank-sleep strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-3);
}
.rank-sleep span {
  display: block;
  color: var(--muted);
}
.rank-ghost td {
  opacity: 0.3;
  filter: grayscale(0.6);
}
.rank-ghost:hover td {
  background: transparent !important;
}
.ghost-bar {
  display: block;
  height: 12px;
  max-width: 180px;
  background: linear-gradient(90deg, var(--night-3) 0 50%, var(--plum) 50% 100%) 0 0 / 200% 100%;
  animation: ghost-shimmer 1.6s steps(6) infinite;
}
@keyframes ghost-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* ── Postacie świata (portrety) ── */
.cast-head {
  margin-top: 56px;
  margin-bottom: 20px;
  text-align: center;
}
.cast-grid {
  margin-top: 0;
}
.cast-card {
  align-items: center;
}
.cast-card img {
  flex-basis: 112px;
  width: 112px;
  height: 128px;
  object-position: 50% 15%;
  box-shadow: 0 0 0 4px var(--gold-1), 0 0 0 8px var(--ink), 0 8px 0 4px rgba(7, 5, 12, 0.6);
}

/* ── Pobierz grę: kafelki wymagań + pulsujący przycisk ── */
.req-grid {
  padding: 0;
  gap: 16px;
}
.req-grid > .req-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
}
.req-tile strong {
  color: var(--gold-3);
}
.req-slot {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  background: url("assets/ui/skill_slot_frame.png") center / 48px 48px no-repeat;
  image-rendering: pixelated;
}
.req-slot .px-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.req-tile:hover {
  transform: translateY(-4px);
}
.download-board {
  padding: 40px 32px;
}
.download-board .plank-primary {
  max-width: 100%;
  white-space: normal;
  animation: cta-glow 1.6s steps(4) infinite;
}
@keyframes cta-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 214, 107, 0)); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 190, 80, 0.75)); }
}

/* ── Item Shop: poświata ikon wg plakietki ── */
.shop-card:hover .shop-icon-box {
  background-image: url("assets/ui/skill_slot_frame_hover.png");
}
.shop-icon-box img {
  filter: drop-shadow(0 0 6px rgba(255, 214, 107, 0.25));
}

/* ── Telefony ── */
@media (max-width: 720px) {
  .section {
    padding: 64px 0 72px;
  }
  .sec-head {
    margin-bottom: 32px;
  }
  .sec-head::after {
    margin-top: 16px;
  }
  .stage-frame {
    width: 100%;
  }
  .stage-canvas {
    width: 100%;
  }
  #kronika::after,
  #ranking::after,
  #atlas::after,
  #galeria::after,
  #pobierz::after {
    opacity: 0.1;
  }
  .download-board {
    padding: 24px 12px;
  }
  .rank-sleep {
    flex-direction: column;
    text-align: center;
  }
  /* Ranking jako karty zamiast szerokiej tabeli */
  .rank-table-wrap {
    overflow-x: visible;
  }
  .rank-table thead {
    display: none;
  }
  .rank-table,
  .rank-table tbody {
    display: block;
  }
  .rank-table tbody tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border-top: 4px solid var(--wood-0);
  }
  .rank-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
  }
  .rank-table td {
    display: block;
    padding: 0;
    border-top: 0;
    background: transparent !important;
  }
  .rank-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .rank-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .rank-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .rank-table td:nth-child(4) { display: none; }
  .rank-table td:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; }
  .rank-table td:nth-child(6) { grid-column: 1 / -1; min-width: 0; }
  .rank-table tr.rank-sleep-row {
    display: block;
    padding: 0;
  }
  .rank-table tr.rank-sleep-row td {
    display: block;
  }
  .cast-card img {
    flex-basis: 96px;
    width: 96px;
    height: 112px;
  }
  .req-grid {
    grid-template-columns: 1fr;
  }
  .to-top {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner::before,
  .rank-sleep-ico,
  .ghost-bar,
  .download-board .plank-primary {
    animation: none;
  }
}


/* ── Item Shop v2: Oferta Dnia, wstążki, ≈ zł, rekomendacja najmniejszego pakietu ── */
.shop-card { position: relative; }
.shop-card:has(> .shop-ribbon) { padding-top: 38px; }
.shop-card.is-deal { outline: 2px solid var(--gold-2); outline-offset: -6px; }
.shop-card.is-once { outline: 2px solid var(--emerald); outline-offset: -6px; }
.shop-ribbon {
  position: absolute; top: 12px; left: 14px; z-index: 2;
  padding: 3px 9px; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: var(--ink); background: var(--emerald-2);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25);
}
.shop-ribbon.r-deal { background: var(--gold-2); }
.shop-ribbon.r-once { background: var(--ember); color: var(--cream); }
.shop-price-col { display: flex; flex-direction: column; gap: 2px; }
.shop-old { color: var(--muted-2); font-size: 12px; text-decoration: line-through; text-decoration-thickness: 2px; }
.shop-pln { color: var(--muted); font-size: 12px; }
.shop-price.short { opacity: .75; }
.shop-save { margin-top: 8px; font-size: 13px; color: var(--emerald-2); }
.shop-save b { color: var(--cream); }

.shop-deal {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 20px; align-items: center;
  margin: 0 0 18px; padding: 18px 22px;
  background: linear-gradient(100deg, rgba(255,200,80,.14), rgba(255,200,80,0) 55%), var(--night-3);
  box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 5px var(--ink);
  clip-path: var(--notch);
}
.shop-deal[hidden] { display: none; }
.deal-icon { width: 112px; height: 112px; display: grid; place-items: center; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 2px var(--gold-3, var(--gold-2)); }
.deal-icon img { width: 80px; height: 80px; image-rendering: pixelated; animation: gem-float 2.4s steps(4) infinite; }
.deal-eyebrow { display: flex; gap: 6px; margin-bottom: 6px; }
.deal-pill { padding: 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; background: var(--gold-2); color: var(--ink); }
.deal-pill.deal-pct { background: var(--ember); color: var(--cream); }
.shop-deal h3 { margin: 0 0 4px; color: var(--cream); }
.shop-deal p { margin: 0; color: var(--muted); font-size: 14px; }
.deal-timer { margin-top: 8px; font-size: 13px; color: var(--muted); }
.deal-timer b { color: var(--gold-1, var(--gold-2)); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.deal-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.deal-price { font-size: 1.35em; }

.shortfall-note {
  margin: 0 0 16px; padding: 12px 16px; font-size: 14px; color: var(--cream);
  background: rgba(40,180,110,.12); box-shadow: inset 0 0 0 2px var(--emerald);
}
.shortfall-note[hidden] { display: none; }
.pack-gem-stack { display: flex; justify-content: center; }
.pack-gem-stack img + img { margin-left: -60px; }
.pack-gem-stack.stack-3 img, .pack-gem-stack.stack-4 img { width: 76px; height: 76px; }
.pack-gem-stack.stack-3 img + img, .pack-gem-stack.stack-4 img + img { margin-left: -50px; }
.pack-gem-stack img:nth-child(2) { animation-delay: .3s; }
.pack-gem-stack img:nth-child(3) { animation-delay: .6s; }
.pack-gem-stack img:nth-child(4) { animation-delay: .9s; }
.pack-per100 { font-size: 12px; color: var(--muted); }
.pack-enough { margin: 4px 0 10px; font-size: 13px; color: var(--emerald-2); }
.gem-pack-card.best .pack-tag { background: var(--gold-2); color: var(--ink); }
.gem-pack-card.suggested { outline: 3px solid var(--emerald-2); outline-offset: -7px; transform: translateY(-6px); }
.gem-pack-card.suggested .pack-tag { background: var(--emerald-2); color: var(--ink); animation: pack-pulse 1.2s steps(2) infinite; }
@keyframes pack-pulse { 50% { filter: brightness(1.35); } }
.shop-board.celebrate { animation: shop-celebrate .9s steps(6); }
@keyframes shop-celebrate { 30% { filter: brightness(1.25) saturate(1.3); } 100% { filter: none; } }

@media (max-width: 760px) {
  .shop-deal { grid-template-columns: 72px 1fr; padding: 14px; }
  .deal-icon { width: 72px; height: 72px; }
  .deal-icon img { width: 56px; height: 56px; }
  .deal-buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .deal-icon img, .pack-gem-stack img, .gem-pack-card.suggested .pack-tag, .shop-board.celebrate { animation: none; }
  .gem-pack-card.suggested { transform: none; }
}


/* ── Przymierzalnia zbroi płytowej (sekcja Zbrojownia) ── */
.fit-board { margin-top: 28px; }
.fit-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 28px; align-items: center; }
.fit-stage {
  --fit-glow: #b8c0cc;
  position: relative; height: 300px; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 34px; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none;
  background: radial-gradient(ellipse 70% 55% at 50% 88%, color-mix(in srgb, var(--fit-glow) 38%, transparent), transparent 70%), var(--night-2);
  transition: background .35s steps(4);
}
.fit-stage:active { cursor: grabbing; }
.fit-stage:focus-visible { outline: 2px solid var(--gold-2); outline-offset: -4px; }
.fit-rays {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from -60deg at 50% 100%, rgba(255,255,255,.045) 0 5deg, transparent 5deg 15deg);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%);
}
.fit-shadow { position: absolute; bottom: 44px; left: 50%; width: 88px; height: 14px; margin-left: -44px; background: rgba(0,0,0,.5); border-radius: 50%; }
#fit-canvas { position: relative; z-index: 1; width: 132px; height: 204px; image-rendering: pixelated; image-rendering: crisp-edges; }
.fit-controls { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.fit-swatches { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 10px 0 16px; }
.fit-sw {
  width: 52px; height: 74px; padding: 0; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--night-3); box-shadow: inset 0 0 0 2px var(--ink);
}
.fit-sw i { display: block; width: 44px; height: 68px; background: url(assets/ui/plate_fitting.png) no-repeat; background-size: 1408px 544px; image-rendering: pixelated; }
.fit-sw:hover { background: var(--night-2); }
.fit-sw[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 4px var(--ink); background: var(--night-2); }
.fit-sw.npc i { opacity: .9; }
.fit-sw-sep { width: 2px; margin: 4px 6px; background: var(--muted-2); opacity: .35; }
.fit-badge { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--ink); background: var(--emerald-2); }
.fit-badge.craft { background: var(--gold-2); }
.fit-badge.npc { background: var(--plum, var(--muted-2)); color: var(--cream); }
.fit-info h3 { margin: 8px 0 8px; color: var(--cream); }
.fit-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.fit-stats b { color: var(--cream); }
.fit-how { margin: 0 0 10px; font-size: 14px; color: var(--muted); max-width: 60ch; }
.fit-recipe { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fit-recipe li { padding: 4px 9px; font-size: 13px; color: var(--cream); background: var(--night-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.fit-recipe li.fit-rec-helm { flex-basis: 100%; background: none; box-shadow: none; padding: 2px 0; color: var(--muted); }
@media (max-width: 760px) {
  .fit-layout { grid-template-columns: 1fr; }
  .fit-stage { height: 260px; }
}
@media (prefers-reduced-motion: reduce) { .fit-stage { transition: none; } }


/* ── Steam: lista życzeń ── */
.steam-ico { width: 24px; height: 24px; flex: none; }
.steam-btn.is-disabled { cursor: default; opacity: .8; filter: saturate(.7); }
.steam-board {
  display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center;
  padding: 30px 34px; background: linear-gradient(120deg, rgba(23,26,64,.9), rgba(17,92,110,.55)), var(--night-3);
  box-shadow: inset 0 0 0 2px #2a7d8c, inset 0 0 0 5px var(--ink); clip-path: var(--notch);
}
.steam-plaque {
  display: flex; align-items: center; gap: 14px; padding: 22px 26px;
  background: #f4efe4; box-shadow: inset 0 0 0 3px var(--ink), inset 0 -6px 0 rgba(0,0,0,.08);
}
.steam-plaque img { image-rendering: pixelated; }
.steam-plaque-mark { width: 132px; height: 132px; }
.steam-plaque-word { width: 290px; height: 58px; }
.steam-copy h2 { margin: 6px 0 10px; }
.steam-copy > p { margin: 0 0 16px; color: var(--muted); max-width: 62ch; }
.steam-copy .hero-actions { justify-content: flex-start; margin: 0; }
.steam-soon-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.steam-legal { margin: 14px 0 0; font-size: 11px; color: var(--muted-2); }
@media (max-width: 980px) {
  .steam-board { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .steam-plaque { justify-content: center; }
  .steam-plaque-mark { width: 66px; height: 66px; }
  .steam-plaque-word { width: 145px; height: 29px; }
}


/* ── Wymagania sprzętowe + test komputera ── */
.req-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--gold-2); text-decoration: none; font-weight: 700; }
.req-link:hover { text-decoration: underline; }
.req-table { display: grid; }
.req-row { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 0 18px; align-items: center; padding: 12px 14px; }
.req-row:nth-child(even) { background: rgba(255,255,255,.035); }
.req-head { padding-top: 4px; padding-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); box-shadow: inset 0 -2px 0 rgba(255,255,255,.08); }
.req-head .req-col-rec { color: var(--emerald-2); }
.req-label { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--cream); }
.req-min, .req-rec { font-size: 14px; color: var(--muted); }
.req-rec { color: var(--cream); }
.req-you { display: none; font-size: 14px; }
.req-table.checked .req-row { grid-template-columns: 150px 1fr 1fr 1fr; }
.req-table.checked .req-you { display: block; }
.req-you.lvl-rec { color: var(--emerald-2); }
.req-you.lvl-min { color: var(--gold-2); }
.req-you.lvl-low { color: var(--ember); }
.req-you.lvl-unk { color: var(--muted-2); }
.req-you[class*="lvl-"]::before { display: inline-block; width: 10px; height: 10px; margin-right: 8px; content: ""; background: currentColor; box-shadow: 0 0 0 2px var(--ink); vertical-align: 0; }
.req-check-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.req-verdict { flex: 1 1 280px; padding: 10px 14px; font-size: 14px; color: var(--cream); background: rgba(40,180,110,.12); box-shadow: inset 0 0 0 2px var(--emerald); }
.req-verdict.low { background: rgba(220,90,50,.12); box-shadow: inset 0 0 0 2px var(--ember); }
.req-verdict[hidden] { display: none; }
.req-note { margin: 12px 0 0; font-size: 12px; color: var(--muted-2); }
@media (max-width: 760px) {
  .req-head { display: none; }
  .req-row, .req-table.checked .req-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 12px; }
  .req-min::before, .req-rec::before, .req-you::before { content: attr(data-label) ": "; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted-2); text-transform: uppercase; }
  .req-you[class*="lvl-"]::before { width: auto; height: auto; margin: 0; background: none; box-shadow: none; }
}


/* ── Przełącznik języka (PL / EN / DE) ── */
.lang-switch { display: flex; gap: 2px; padding: 2px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 2px var(--ink); }
.lang-switch a { padding: 4px 7px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--cream); background: rgba(255,255,255,.06); }
.lang-switch a.active { color: var(--ink); background: var(--gold-2); }

/* ── Konto: odzyskiwanie hasła i usuwanie ── */
.link-btn { display: inline-block; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--gold-2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--cream); }
.auth-note.small { font-size: 12px; color: var(--muted-2); }
.acc-security { display: grid; gap: 10px; justify-items: start; }
.recovery-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; background: rgba(40,180,110,.10); box-shadow: inset 0 0 0 2px var(--emerald); }
.recovery-box[hidden] { display: none; }
.recovery-title { flex-basis: 100%; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--emerald-2); }
.recovery-code { font-size: 20px; letter-spacing: .12em; color: var(--cream); user-select: all; }
.recovery-warn { flex-basis: 100%; font-size: 12px; color: var(--gold-2); }
.acc-delete summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.acc-delete[open] summary { color: var(--ember); margin-bottom: 8px; }
.plank-danger { background: #7a2418; color: var(--cream); }
.form-msg.ok { color: var(--emerald-2); }

/* ── Zgoda przy zakupie Green Gemów ── */
.buy-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; font-size: 13px; color: var(--muted); background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); cursor: pointer; }
.buy-consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--emerald); }
.buy-consent a { color: var(--gold-2); }
.buy-consent.need { box-shadow: inset 0 0 0 2px var(--ember); animation: pack-pulse .6s steps(2) 3; }

/* ── Zapis na powiadomienia e-mail ── */
.notify-form { margin-top: 18px; padding-top: 16px; box-shadow: inset 0 2px 0 rgba(255,255,255,.08); }
.notify-label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--cream); }
.notify-row { display: flex; flex-wrap: wrap; gap: 8px; }
.notify-row .rpg-input { flex: 1 1 220px; }
.notify-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12px; color: var(--muted); }
.notify-consent input { margin-top: 2px; flex: none; accent-color: var(--emerald); }
.notify-consent a { color: var(--gold-2); }

/* ── FAQ ── */
.faq-list { display: grid; gap: 8px; max-width: 900px; margin: 0 auto; }
.faq-item { padding: 0; }
.faq-item summary { padding: 14px 18px; font-weight: 700; color: var(--cream); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-block; width: 18px; color: var(--gold-2); }
.faq-item[open] summary::before { content: "−"; }
.faq-item p { margin: 0; padding: 0 18px 16px 36px; color: var(--muted); line-height: 1.6; }

/* ── Strony prawne ── */
.legal-main { padding-top: 110px; }
.legal-wrap { max-width: 900px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.legal-doc { padding: 30px 34px; line-height: 1.65; }
.legal-doc h1 { margin: 0 0 6px; font-size: 26px; color: var(--cream); }
.legal-doc h2 { margin: 26px 0 8px; font-size: 18px; color: var(--gold-2); }
.legal-doc p, .legal-doc li { color: var(--muted); font-size: 15px; }
.legal-doc ul { padding-left: 20px; }
.legal-doc a { color: var(--gold-2); }
.legal-updated { font-size: 13px; color: var(--muted-2); }
.legal-todo { padding: 0 4px; background: var(--ember); color: var(--ink); }
@media (max-width: 760px) { .legal-doc { padding: 20px 18px; } }

/* Rzadkość wariantu w przymierzalni */
.fit-rar { padding: 0 6px; color: #7fb3ff; box-shadow: inset 0 0 0 1px currentColor; }
.fit-rar.r-epic { color: #c48bff; }
.fit-rar.r-leg { color: var(--gold-2); }


/* ── Witryna premium: Runiczny Jeleń ── */
.stag-showcase {
  display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 24px; align-items: center;
  margin: 0 0 18px; padding: 18px 22px; clip-path: var(--notch);
  background: radial-gradient(ellipse at 28% 60%, rgba(120,236,222,.22), transparent 60%), linear-gradient(135deg, #141a33, #1d2a4a 60%, #10162b);
  box-shadow: inset 0 0 0 2px #3fb8b0, inset 0 0 0 5px var(--ink);
}
.stag-stage {
  position: relative; height: 176px; overflow: hidden; image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px var(--ink), 0 0 24px rgba(120,236,222,.18);
  /* nocny las w 4 warstwach (tools/bake_runic_stag_scene.py) — każda przesuwa się z inną prędkością */
  background:
    url(assets/ui/stag_scene_ground.png) 0 0 / 512px 176px repeat-x,
    url(assets/ui/stag_scene_pines.png) 0 0 / 512px 176px repeat-x,
    url(assets/ui/stag_scene_mountains.png) 0 0 / 512px 176px repeat-x,
    url(assets/ui/stag_scene_sky.png) right -64px top 0 / 512px 176px repeat-x;
  animation: stag-parallax 6s linear infinite;
}
@keyframes stag-parallax { to { background-position: -2048px 0, -1024px 0, -512px 0, right -64px top 0; } }
.stag-sprite {
  position: absolute; left: 50%; top: 0; width: 256px; height: 176px; margin-left: -128px;
  background: url(assets/ui/runic_stag_gallop.png) 0 0 / 1024px 176px no-repeat; image-rendering: pixelated;
  animation: stag-gallop .48s steps(4) infinite;
}
@keyframes stag-gallop { to { background-position: -1024px 0; } }
.stag-ground { display: none; }
.stag-tag { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #0d1222; background: #78ecde; }
.stag-info h3 { margin: 8px 0 6px; font-size: 24px; color: #d6fff8; text-shadow: 0 0 12px rgba(120,236,222,.55); }
.stag-info p { margin: 0 0 10px; color: #b9c4e0; font-size: 14px; max-width: 56ch; }
.stag-perks { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: #d6fff8; }
.stag-perks li::before { content: "◆ "; color: #78ecde; }
.stag-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
@media (max-width: 860px) {
  .stag-showcase { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .stag-sprite, .stag-stage { animation: none; } }
