/* =========================================================
   Jeden wspólny arkusz dla całej strony (home, logowanie,
   rejestracja, konto, sklep, panel admina).
   Motyw: ciemny „fantasy”, złote akcenty, ember na CTA.
   ========================================================= */

:root {
  --bg: #0e0c09;
  --bg-2: #15120d;
  --panel: #1b1711;
  --panel-2: #231e16;
  --panel-3: #2b251b;
  --line: #352d21;
  --line-2: #4a3f2c;

  --text: #efe6d2;
  --text-2: #cfc3a8;
  --muted: #a1957c;

  --gold: #e2ab3c;
  --gold-hi: #f2c765;
  --gold-soft: rgba(226, 171, 60, .12);

  --ember: #c4432a;
  --ember-hi: #de5a3c;
  --ember-dark: #7d2412;

  --ok: #7cc468;
  --ok-bg: rgba(124, 196, 104, .1);
  --warn: #e2ab3c;
  --warn-bg: rgba(226, 171, 60, .1);
  --danger: #ee735c;
  --danger-bg: rgba(238, 115, 92, .1);

  --crypto: #f7931a;
  --hp: #ef6b5c;
  --mp: #6aa7ff;
  --cap: #6fd08c;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);

  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 15px/1.6 var(--sans);
  background:
    radial-gradient(1000px 420px at 50% -120px, #2e2415 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; }
p { margin: 0 0 .75em; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #ffe0a0; }
code { font: .88em var(--mono); padding: 1px 6px; background: var(--panel-3); border-radius: 4px; }
small { font-size: .85em; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: rgba(226, 171, 60, .35); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.subtle { color: var(--muted); font-size: .85rem; }

/* ---------- Pasek górny ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 12, 9, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1.2rem/1.2 var(--serif);
  color: var(--text);
  text-decoration: none;
  letter-spacing: .01em;
}
.brand::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  transform: rotate(45deg);
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gold-hi), var(--ember));
  box-shadow: 0 0 14px rgba(226, 171, 60, .5);
}
.brand:hover { color: var(--gold-hi); }

.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.menu form { margin: 0; }
.menu a, .menu .linkbtn {
  display: inline-block;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.menu a:hover, .menu .linkbtn:hover { background: var(--panel-3); color: var(--text); }
.menu a[aria-current="page"] { background: var(--gold-soft); color: var(--gold-hi); }
.menu .linkbtn { color: var(--muted); }

/* ---------- Układ strony ---------- */
.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 20px 24px;
  flex: 1 0 auto;
}
.page.narrow { max-width: 480px; }
.page-head { margin-bottom: 26px; }
.page.narrow .page-head { text-align: center; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.stack { display: grid; gap: 22px; }

.site-foot {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 36px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

/* ---------- Karty / sekcje ---------- */
.card, .stack > section {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.page.narrow .card, .page.narrow .stack > section { padding: 28px; }
.card h2, .stack > section > h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 1.25rem;
}
.card h2::before, .stack > section > h2::before {
  content: "";
  width: 4px;
  height: 1.1em;
  border-radius: 2px;
  background: linear-gradient(var(--gold-hi), var(--ember));
}
.card > h3, .stack > section > h3 { font-size: 1.05rem; margin: 26px 0 12px; }
.pill {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font: 700 .78rem var(--sans);
}

/* ---------- Formularze ---------- */
label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--text-2); }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #70664f; }
input:hover, select:hover { border-color: #6a5a3b; }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 171, 60, .2); }
input[type=file] { padding: 8px; cursor: pointer; }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 0; border-radius: 6px;
  background: var(--panel-3); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
input[type=checkbox], input[type=radio] { accent-color: var(--gold); }
select { cursor: pointer; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Przyciski ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--ember-dark);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--ember-hi), var(--ember));
  color: #fff4e2;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ember-dark), 0 6px 16px rgba(196, 67, 42, .25);
  transition: transform .1s, filter .15s, box-shadow .15s;
}
button:hover, .btn:hover { filter: brightness(1.1); color: #fff; }
button:active, .btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ember-dark); }
form > .field ~ button[type=submit]:last-child,
.create-form > button,
.edit form > button { width: 100%; }
.create-form > button { padding: 14px; font-size: 1.05rem; }
button[disabled] {
  background: var(--panel-3); border-color: var(--line-2); color: var(--muted);
  box-shadow: none; cursor: not-allowed; filter: none; transform: none;
}
.btn-ghost, button.ghost {
  background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none;
}
.btn-ghost:hover, button.ghost:hover { background: var(--panel-3); border-color: var(--gold); color: var(--gold-hi); }
.btn-main { /* domyślny wygląd przycisku */ }
.btn-alt { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn-alt:hover { background: var(--panel-3); border-color: var(--gold); color: var(--gold-hi); }
.btn-lg { padding: 13px 26px; font-size: 1.02rem; }
.menu .linkbtn { box-shadow: none; }

/* ---------- Komunikaty ---------- */
.errors, .done, .warn, .note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: .92rem;
}
.errors { list-style: none; background: var(--danger-bg); border-color: rgba(238, 115, 92, .5); color: #ffc9bd; }
.errors li + li { margin-top: 4px; }
.errors li::before { content: "⚠ "; }
.done { background: var(--ok-bg); border-color: rgba(124, 196, 104, .45); color: #cdeec2; }
.done a { color: #e6ffd9; font-weight: 700; }
.done .num {
  display: block; margin: 10px 0; padding: 12px; text-align: center;
  font: 700 1.8rem/1 var(--mono); letter-spacing: .12em; color: var(--gold-hi);
  background: var(--bg-2); border: 1px dashed var(--ok); border-radius: var(--radius-sm); user-select: all;
}
.warn { background: var(--warn-bg); border-color: rgba(226, 171, 60, .4); color: #f1d9a2; margin: 14px 0 0; font-size: .85rem; }
.note { background: rgba(106, 167, 255, .08); border-color: rgba(106, 167, 255, .35); color: #cfe0ff; }
.foot { margin: 16px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
.empty {
  margin: 0; padding: 18px; text-align: center; color: var(--muted);
  background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
}

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 14px; text-align: left; vertical-align: middle; }
th {
  background: var(--panel-3); color: var(--muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em; white-space: nowrap;
}
td { border-top: 1px solid var(--line); }
tbody tr:hover { background: rgba(226, 171, 60, .04); }
td a { font-weight: 700; }

.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.inline label { margin: 0; }
.inline select { width: auto; padding: 6px 10px; }
.inline input[type=number] { width: 120px; padding: 6px 10px; }
.inline button { width: auto; padding: 6px 14px; font-size: .88rem; }
.search { display: flex; gap: 10px; margin-bottom: 18px; }
.search input { flex: 1; }
.search button { width: auto; }

/* ---------- Kafelki ze statystykami ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile {
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.tile dt, .tile .tile-label {
  display: block; margin: 0; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.tile dd, .tile .tile-value {
  display: block; margin: 4px 0 0; font: 700 1.3rem/1.25 var(--serif); overflow-wrap: anywhere;
}
.tile .tile-sub { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.tile-crypto { background: linear-gradient(135deg, rgba(247, 147, 26, .18), rgba(247, 147, 26, .05)); border-color: rgba(247, 147, 26, .4); }
.tile-crypto .tile-value { color: var(--crypto); font-size: 1.7rem; }
.tile-gold .tile-value { color: var(--gold-hi); font-size: 1.7rem; }

/* ---------- Strona główna: hero ---------- */
.hero { position: relative; margin-bottom: 22px; }
.viewport {
  position: relative;
  height: clamp(340px, 46vw, 520px);
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: #0b1030;
  box-shadow: 0 0 0 1px #000, var(--shadow), 0 30px 70px rgba(0, 0, 0, .5);
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewport::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 6, 3, .8), transparent 62%),
    linear-gradient(0deg, rgba(8, 6, 3, .55), transparent 40%);
}
.hero-copy {
  position: absolute;
  left: 28px;
  bottom: 28px;
  width: min(470px, calc(100% - 56px));
  padding: 26px 28px 22px;
  background: rgba(21, 18, 13, .84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; overflow-wrap: anywhere; }
.hero-copy .lead { margin: 10px 0 20px; color: var(--text-2); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .85rem; font-weight: 700;
}
.status .stats { font-weight: 400; color: var(--muted); }
.lamp {
  display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(124, 196, 104, .2), 0 0 10px var(--ok);
}
.status.off .lamp { background: var(--ember-hi); box-shadow: 0 0 0 3px rgba(222, 90, 60, .2); }

/* Pochodnie – jedyny ruch na stronie */
@keyframes flame  { 0% { opacity: 1; } 22% { opacity: .55; } 41% { opacity: .95; } 63% { opacity: .65; } 82% { opacity: 1; } 100% { opacity: .8; } }
@keyframes glowfl { 0% { opacity: .9; } 25% { opacity: .55; } 48% { opacity: 1; } 70% { opacity: .65; } 100% { opacity: .85; } }
.flame { animation: flame 1.7s steps(1) infinite; }
.flame.f2 { animation-delay: -.9s; }
.glow { animation: glowfl 2.4s steps(1) infinite; }
.glow.g2 { animation-delay: -1.2s; }
@media (prefers-reduced-motion: reduce) { .flame, .glow { animation: none; } }

.home-stats { margin: 0 0 22px; }
.home-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; align-items: start; }
.home-cols > .stack { min-width: 0; }

/* Kroki */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 16px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
ol.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  font: 700 1.3rem var(--serif);
  color: #2a1c05;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--gold-soft);
}
ol.steps strong { display: block; font-size: 1rem; }
ol.steps .desc { color: var(--muted); font-size: .92rem; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
.mono {
  font: 700 .88rem var(--mono); color: var(--gold-hi);
  padding: 2px 9px; background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: 6px; user-select: all;
}
.rank td:first-child, .rank th:first-child { width: 44px; color: var(--muted); }
.rank tbody tr:nth-child(1) td:first-child { color: var(--gold-hi); font-weight: 800; }

/* ---------- Konto: postacie ---------- */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.char {
  display: grid; gap: 14px; padding: 18px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.char:hover { border-color: var(--line-2); transform: translateY(-2px); }
.char-top { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font: 700 1.4rem var(--serif); color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.char-name { font-size: 1.08rem; overflow-wrap: anywhere; margin: 0; }
.char-voc { margin: 0; font-size: .85rem; color: var(--muted); }
.char-lvl {
  margin-left: auto; flex: none; text-align: center; padding: 5px 12px;
  background: var(--gold-soft); border: 1px solid rgba(226, 171, 60, .35); border-radius: 10px; color: var(--gold-hi);
}
.char-lvl small { display: block; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.char-lvl b { font: 700 1.2rem/1.1 var(--serif); }
.char-coin {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: rgba(247, 147, 26, .1); border: 1px solid rgba(247, 147, 26, .35);
}
.char-coin.zero { background: var(--panel-3); border-color: var(--line); }
.char-coin .bal { font-weight: 800; color: var(--crypto); font-size: 1.1rem; }
.char-coin.zero .bal { color: var(--muted); }
.char-coin .sub { font-size: .75rem; color: var(--muted); text-align: right; line-height: 1.3; }
.char-coin .sub b { color: var(--text-2); }
.char-foot { font-size: .8rem; color: var(--muted); }

/* ---------- Konto: tworzenie postaci ---------- */
.create-head h2 { margin: 0; }
.create-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.create-form { display: grid; gap: 26px; margin-top: 18px; }
.step { display: grid; gap: 10px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; font-size: 1.02rem; color: var(--text); }
.step-num {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #2a1c05; font: 800 .82rem var(--sans);
}
.step-help { margin: 0; font-size: .88rem; color: var(--muted); }
.input-lg { padding: 14px 16px !important; font-size: 1.12rem !important; font-weight: 600; }
.rules { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rules li { padding: 3px 11px; border-radius: 999px; background: var(--panel-3); font-size: .78rem; color: var(--text-2); }
.sex { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sex label { position: relative; display: block; margin: 0; cursor: pointer; }
.sex input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.sex .opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px;
  background: var(--bg-2); border: 2px solid var(--line-2); border-radius: var(--radius); font-weight: 700; color: var(--text);
  transition: border-color .15s, background .15s;
}
.sex .ico { font-size: 1.9rem; line-height: 1; color: var(--muted); }
.sex label:hover .opt { border-color: #6a5a3b; }
.sex input:checked + .opt { border-color: var(--gold); background: var(--gold-soft); }
.sex input:checked + .opt .ico { color: var(--gold-hi); }
.sex input:checked + .opt::after { content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--gold-hi); font-weight: 900; }
.sex input:focus-visible + .opt { outline: 2px solid var(--gold); outline-offset: 2px; }
.start-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 0; }
.start-stats > div { padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.start-stats dt { margin: 0; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.start-stats dd { margin: 4px 0 0; font: 700 1.3rem var(--serif); }
.start-stats .s-hp dd { color: var(--hp); } .start-stats .s-mp dd { color: var(--mp); } .start-stats .s-cap dd { color: var(--cap); }
.full-note { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--danger-bg); border: 1px solid rgba(238, 115, 92, .45); color: #ffc9bd; }

/* ---------- Sklep ---------- */
.shop-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text-2); font-weight: 700; font-size: .92rem; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--gold); color: var(--gold-hi); }
.chip.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }
.balance {
  padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(247, 147, 26, .22), rgba(247, 147, 26, .06));
  border: 1px solid rgba(247, 147, 26, .45);
}
.balance small { display: block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.balance b { display: block; margin-top: 2px; font: 700 1.8rem/1.2 var(--serif); color: var(--crypto); }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.offer {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.offer:hover { border-color: var(--line-2); transform: translateY(-2px); }
.offer-img {
  display: grid; place-items: center; width: 72px; height: 72px; padding: 6px;
  border-radius: 12px; background: var(--panel-3); border: 1px solid var(--line-2);
  font: 700 1.8rem var(--serif); color: #fff;
}
.offer-img img { width: 100%; height: 100%; object-fit: contain; }
.offer h3 { margin: 0 !important; font-size: 1.08rem !important; }
.offer p { margin: 0; flex: 1; font-size: .88rem; color: var(--muted); }
.price { font: 700 1.3rem var(--serif); color: var(--crypto); }
.offer form { margin: 0; }
.offer form > button { width: 100%; }
.edit { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.edit summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--gold-hi); }
.edit form { display: grid; gap: 10px; margin-top: 12px; }
.edit label { display: grid; gap: 4px; margin: 0; font-size: .82rem; }
.edit .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.edit .check input { width: auto; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  color: #0e0c09; background: var(--ok);
}
.badge.wait { background: var(--gold); }
.badge.refund { background: #8b8370; }

/* ---------- Responsywność ---------- */
@media (max-width: 860px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .viewport { height: 280px; }
  .hero-copy {
    position: relative; left: auto; bottom: auto; width: auto; margin: -56px 14px 0;
  }
  .viewport::after { background: linear-gradient(0deg, rgba(8, 6, 3, .6), transparent 50%); }
}
@media (max-width: 560px) {
  .page { padding: 24px 14px 16px; }
  .card, .stack > section, .page.narrow .card { padding: 18px; }
  .site-head-in { padding: 8px 14px; }
  .menu a, .menu .linkbtn { padding: 6px 10px; font-size: .88rem; }
  .search { flex-direction: column; }
  .sex { gap: 10px; }
}

/* ---------- Kurs KryptoCoin ---------- */
.rates td:first-child, .rates th:first-child { width: auto; color: var(--text); }
.rates .rate { color: var(--crypto); font-weight: 800; white-space: nowrap; }
.rates .chg { font-weight: 700; white-space: nowrap; }
.rates .chg.up   { color: var(--ok); }
.rates .chg.down { color: var(--danger); }
.rates .chg.flat { color: var(--muted); }
.rates-note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }

/* ---------- Usuwanie postaci ---------- */
.del { border-top: 1px solid var(--line); padding-top: 12px; }
.del summary { cursor: pointer; font-size: .85rem; color: var(--muted); list-style: none; }
.del summary::-webkit-details-marker { display: none; }
.del summary:hover, .del[open] summary { color: var(--danger); }
.del-form { display: grid; gap: 10px; margin-top: 12px; }
.del-warn {
  margin: 0; padding: 10px 12px; font-size: .85rem; line-height: 1.45; color: #ffc9bd;
  background: var(--danger-bg); border: 1px solid rgba(238, 115, 92, .5); border-radius: var(--radius-sm);
}
.del-label { font-size: .85rem; color: var(--text-2); }
.del-label b { color: var(--danger); }
.del-form button.del-btn {
  width: 100%; background: linear-gradient(180deg, #d4503a, #9c2a18); border-color: #7d2412; color: #fff;
}

/* ---------- Strona główna: większy status serwera, układ bez kroków ---------- */
.status.big { margin-top: 24px; padding-top: 18px; font-size: 1.35rem; gap: 6px 22px; }
.status.big .lamp { width: 16px; height: 16px; box-shadow: 0 0 0 5px rgba(124, 196, 104, .22), 0 0 14px rgba(124, 196, 104, .55); }
.status.big.off .lamp { box-shadow: 0 0 0 5px rgba(222, 90, 60, .22), 0 0 14px rgba(222, 90, 60, .5); }
.status.big .stats { font-size: 1.05rem; }
.status.big .stats b { color: var(--text); font-size: 1.25rem; }

/* ---------- Strona główna: czytelność ---------- */
.home { font-size: 1.05rem; line-height: 1.55; }
.home .hero-copy .lead { font-size: 1.12rem; line-height: 1.5; }
.home .home-stats { margin-bottom: 26px; }
.home .tile { padding: 18px 22px; }
.home .tile .tile-label { font-size: .8rem; }
.home .tile .tile-value { font-size: 1.7rem; margin-top: 6px; }
.home .tile-crypto .tile-value { font-size: 2rem; }

.home .card { padding: 28px; margin-bottom: 26px; }
.home .card h2 { font-size: 1.45rem; margin-bottom: 22px; }
.home .home-grid .card { margin-bottom: 0; }

.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; margin-bottom: 22px; }
.connect-item { padding: 16px 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.connect-item .k { display: block; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.connect-item .v { display: block; margin-top: 6px; font: 700 1.6rem/1.2 var(--serif); overflow-wrap: anywhere; }
.connect-item .v.addr { font: 700 1.35rem/1.3 var(--mono); color: var(--gold-hi); user-select: all; }

.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 26px; align-items: start; }

.home table { font-size: 1.05rem; }
.home th { font-size: .8rem; padding: 12px 16px; }
.home td { padding: 14px 16px; }
.home tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
.home .rates .rate { font-size: 1.2rem; }
.home .rates .chg { font-size: 1.05rem; }
.home .rates-note { font-size: .92rem; color: var(--text-2); line-height: 1.5; }
.home .empty { font-size: 1rem; padding: 22px; }

/* ---------- Strona główna: oprawa wizualna ---------- */
body:has(.home) {
  background:
    radial-gradient(900px 480px at 50% -140px, #3a2b14 0%, transparent 70%),
    radial-gradient(700px 500px at 100% 70%, rgba(196, 67, 42, .10), transparent 70%),
    radial-gradient(700px 500px at 0% 105%, rgba(226, 171, 60, .08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* Hero */
.home .hero-copy {
  border-color: rgba(226, 171, 60, .45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .6), 0 0 40px rgba(226, 171, 60, .12);
}
.home .hero-copy::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
}
.home .hero-copy h1 {
  background: linear-gradient(180deg, #fff2cf 0%, var(--gold-hi) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
  letter-spacing: .01em;
}
.home .hero-copy .btn-lg:not(.btn-alt) {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: #8a5e12; color: #2a1c05;
  box-shadow: 0 2px 0 #8a5e12, 0 8px 22px rgba(226, 171, 60, .35);
}
.home .hero-copy .btn-lg:not(.btn-alt):hover { color: #1a1003; }

/* Status: pulsująca lampka */
@keyframes lamp-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(124, 196, 104, .20), 0 0 12px rgba(124, 196, 104, .5); }
  50%      { box-shadow: 0 0 0 8px rgba(124, 196, 104, .06), 0 0 20px rgba(124, 196, 104, .8); }
}
.status.big:not(.off) .lamp { animation: lamp-pulse 2.4s ease-in-out infinite; }
.status.big:not(.off) > span:first-child { color: #b8e8a8; text-shadow: 0 0 18px rgba(124, 196, 104, .35); }
.status.big.off > span:first-child { color: #ffb4a3; }

/* Kafelki statystyk */
.home .tile { position: relative; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
.home .tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--gold-hi), var(--ember));
}
.home .tile:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.home .tile-crypto::before { background: linear-gradient(var(--crypto), #b3620c); }
.home .tile-crypto {
  box-shadow: 0 0 28px rgba(247, 147, 26, .12);
}
.home .tile-crypto .tile-value { text-shadow: 0 0 18px rgba(247, 147, 26, .4); }

/* Karty */
.home .card { position: relative; transition: border-color .2s, box-shadow .2s; }
.home .card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(226, 171, 60, .75), transparent);
  border-radius: 2px;
}
.home .card:hover { border-color: var(--line-2); box-shadow: var(--shadow), 0 0 32px rgba(226, 171, 60, .06); }
.home .card h2::after {
  content: ""; flex: 1 1 40px; min-width: 40px; height: 1px; margin-left: 6px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* Karta połączenia */
.connect-item { transition: border-color .18s, transform .18s; }
.connect-item:hover { border-color: var(--line-2); transform: translateY(-2px); }
.connect-item .v.addr {
  background: linear-gradient(135deg, rgba(226, 171, 60, .14), rgba(226, 171, 60, .04));
  border-radius: 6px; padding: 2px 8px; margin-left: -8px; width: fit-content; max-width: 100%;
  text-shadow: 0 0 14px rgba(226, 171, 60, .35);
}
.home .connect .btn-lg {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: #8a5e12; color: #2a1c05;
  box-shadow: 0 2px 0 #8a5e12, 0 8px 22px rgba(226, 171, 60, .3);
}
.home .connect .btn-lg:hover { color: #1a1003; }

/* Tabele */
.home .table-wrap { background: rgba(0, 0, 0, .18); border-color: var(--line-2); }
.home th { background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.home tbody tr { transition: background .15s; }
.home tbody tr:hover { background: rgba(226, 171, 60, .08); }
.home .rank td:first-child { font-size: 1.15rem; text-align: center; }
.home .rank .pos-1 { background: linear-gradient(90deg, rgba(242, 199, 101, .16), transparent 80%); }
.home .rank .pos-2 { background: linear-gradient(90deg, rgba(200, 205, 214, .11), transparent 80%); }
.home .rank .pos-3 { background: linear-gradient(90deg, rgba(205, 127, 50, .14), transparent 80%); }
.home .rank .pos-1 td:nth-child(2) { color: var(--gold-hi); font-weight: 700; }
.home .rank td:last-child strong { color: var(--crypto); }
.home .rates .chg.up   { text-shadow: 0 0 12px rgba(124, 196, 104, .35); }
.home .rates .chg.down { text-shadow: 0 0 12px rgba(238, 115, 92, .3); }

/* Delikatne pojawianie się sekcji */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.home .hero, .home .home-stats, .home .connect, .home .home-grid > .card {
  animation: rise .6s ease-out both;
}
.home .home-stats { animation-delay: .08s; }
.home .connect { animation-delay: .16s; }
.home .home-grid > .card:nth-child(1) { animation-delay: .24s; }
.home .home-grid > .card:nth-child(2) { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .home .hero, .home .home-stats, .home .connect, .home .home-grid > .card,
  .status.big:not(.off) .lamp { animation: none; }
  .home .tile, .connect-item { transition: none; }
}

/* ---------- Menu jako boczny pasek po lewej (od 900 px szerokości) ---------- */
@media (min-width: 900px) {
  body {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  body > .page      { grid-column: 2; grid-row: 1; }
  body > .site-foot { grid-column: 2; grid-row: 2; }

  .site-head {
    grid-column: 1; grid-row: 1 / 3;
    position: sticky; top: 0; align-self: start;
    height: 100vh; overflow-y: auto;
    background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
    border-bottom: 0; border-right: 1px solid var(--line-2);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .site-head::after {
    content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 2px; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(226, 171, 60, .55), transparent);
  }
  .site-head-in {
    max-width: none; margin: 0; height: 100%;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start;
    gap: 26px; padding: 28px 16px 24px;
  }
  .brand {
    font-size: 1.35rem; padding: 0 10px 20px;
    border-bottom: 1px solid var(--line-2);
  }
  .menu { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px; }
  .menu form { display: block; }
  .menu a, .menu .linkbtn {
    display: block; width: 100%; text-align: left;
    padding: 11px 14px; border-radius: 10px; font-size: .98rem;
    border-left: 3px solid transparent;
  }
  .menu a:hover, .menu .linkbtn:hover { border-left-color: var(--line-2); }
  .menu a[aria-current="page"] { border-left-color: var(--gold-hi); }
  .menu .linkbtn { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 14px; }
}

/* ---------- Panel boczny: ozdoby ---------- */
@media (min-width: 900px) {
  .site-head {
    background:
      radial-gradient(260px 200px at 50% -40px, rgba(226, 171, 60, .22), transparent 75%),
      radial-gradient(240px 260px at 0% 100%, rgba(196, 67, 42, .16), transparent 75%),
      linear-gradient(180deg, var(--panel-2), var(--bg-2));
    scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  }

  /* Logo */
  .brand {
    position: relative; justify-content: center; gap: 12px; padding: 6px 10px 26px;
    font-size: 1.5rem; letter-spacing: .02em; text-align: center;
    background: linear-gradient(180deg, #fff2cf, var(--gold-hi) 55%, var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    border-bottom: 0;
  }
  .brand::before {
    width: 16px; height: 16px; -webkit-text-fill-color: initial;
    box-shadow: 0 0 18px rgba(226, 171, 60, .7), 0 0 4px rgba(255, 224, 160, .8);
  }
  .brand::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }
  .brand:hover { -webkit-text-fill-color: transparent; filter: brightness(1.15); }

  /* Linki menu */
  .menu { gap: 6px; }
  .menu a, .menu .linkbtn {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border: 1px solid transparent; border-radius: 12px;
    transition: background .18s, border-color .18s, color .18s, padding-left .18s, box-shadow .18s;
  }
  .menu a::before, .menu .linkbtn::before {
    content: "\2756"; flex: none; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 9px; font-size: 1rem; line-height: 1;
    color: var(--gold-hi); background: var(--bg-2); border: 1px solid var(--line-2);
    transition: background .18s, border-color .18s, transform .18s;
  }
  .menu a[href*="index"]::before, .menu a[href="/"]::before, .menu a[href="./"]::before { content: "\1F3E0"; }
  .menu a[href*="account"]::before  { content: "\1F464"; }
  .menu a[href*="shop"]::before     { content: "\1F6D2"; }
  .menu a[href*="login"]::before    { content: "\1F511"; }
  .menu a[href*="register"]::before { content: "\270D"; }
  .menu a[href*="rank"]::before, .menu a[href*="highscore"]::before { content: "\1F3C6"; }
  .menu .linkbtn::before { content: "\21AA"; }

  .menu a:hover, .menu .linkbtn:hover {
    padding-left: 16px; background: linear-gradient(90deg, rgba(226, 171, 60, .12), transparent);
    border-color: var(--line-2); border-left-color: var(--line-2); color: var(--text);
  }
  .menu a:hover::before, .menu .linkbtn:hover::before { border-color: var(--gold); transform: scale(1.06); }

  .menu a[aria-current="page"] {
    color: var(--gold-hi);
    background: linear-gradient(90deg, rgba(226, 171, 60, .22), rgba(226, 171, 60, .04));
    border-color: rgba(226, 171, 60, .4); border-left-color: var(--gold-hi);
    box-shadow: 0 0 22px rgba(226, 171, 60, .12), inset 3px 0 0 var(--gold-hi);
  }
  .menu a[aria-current="page"]::before {
    background: linear-gradient(135deg, var(--gold-hi), var(--gold)); border-color: #8a5e12; color: #2a1c05;
    box-shadow: 0 0 12px rgba(226, 171, 60, .45);
  }

  .menu .linkbtn { margin-top: 14px; border-radius: 12px; border-top-color: transparent; color: var(--muted); }
  .menu .linkbtn:hover { color: var(--danger); background: linear-gradient(90deg, var(--danger-bg), transparent); }
  .menu .linkbtn:hover::before { border-color: var(--danger); color: var(--danger); }

  /* Dolna ozdoba paska */
  .site-head-in::after {
    content: "\20BF  KryptoCoin Mining";
    margin-top: auto; padding: 14px 10px 0; text-align: center;
    font: 700 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase;
    color: var(--crypto); opacity: .8;
    border-top: 1px solid var(--line-2);
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, .08), transparent);
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
  .menu a, .menu .linkbtn, .menu a::before, .menu .linkbtn::before { transition: none; }
}

/* ---------- Support: lista ekipy ---------- */
@media (min-width: 900px) { .menu a[href*="support"]::before { content: "\1F6E1"; } }

.support .card { padding: 28px; }
.support .card h2 { font-size: 1.45rem; margin-bottom: 22px; }
.pill-online { color: #b8e8a8; border-color: rgba(124, 196, 104, .5); background: var(--ok-bg); }

.staff-grid {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px;
}
.staff {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.staff:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.staff.is-online { border-color: rgba(124, 196, 104, .35); }
.staff-info { display: grid; gap: 3px; min-width: 0; }
.staff-name { font: 700 1.1rem/1.2 var(--serif); overflow-wrap: anywhere; }
.staff-role {
  justify-self: start; padding: 1px 10px; border-radius: 999px;
  font: 700 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-hi); background: var(--gold-soft); border: 1px solid rgba(226, 171, 60, .35);
}
.staff-role.role-2 { color: #9fd0ff; background: rgba(106, 167, 255, .1); border-color: rgba(106, 167, 255, .35); }
.staff-role.role-3 { color: #b9a7ff; background: rgba(150, 120, 255, .1); border-color: rgba(150, 120, 255, .35); }
.staff-role.role-5, .staff-role.role-6 { color: #ffb4a3; background: var(--danger-bg); border-color: rgba(238, 115, 92, .4); }
.staff-state { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.staff-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.staff-state.on { color: #b8e8a8; }
.staff-state.on .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(124, 196, 104, .2), 0 0 10px var(--ok); }
@media (prefers-reduced-motion: reduce) { .staff { transition: none; } }
