:root {
  --bg: #0b0a08;
  --bg-2: #12100c;
  --panel: #17140f;
  --panel-2: #1e1a13;
  --line: rgba(212, 178, 106, .18);
  --line-strong: rgba(212, 178, 106, .45);
  --gold: #d4b26a;
  --gold-hi: #f3dca0;
  --gold-lo: #8f7034;
  --text: #efe8d8;
  --muted: #a99d85;
  --green: #79c47a;
  --blue: #6fb3e8;
  --orange: #e8a35a;
  --red: #e0645a;
  --radius: 8px;
  --wrap: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.serif { font-family: 'Cinzel', Georgia, serif; }
.label { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; font-size: 13px; color: var(--muted); }

/* ── nawigacja ── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,10,8,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: 'Cinzel', serif; font-weight: 700; font-size: 18px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 15px; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--gold-hi); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--gold-hi); border-radius: 6px; width: 44px; height: 40px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
}

/* ── przyciski ── */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; gap: 10px; min-height: 48px; padding: 8px 24px; border-radius: 4px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; transition: filter .15s, background .15s, color .15s; }
.btn-gold { color: #14110b; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.btn-gold:hover { color: #14110b; filter: brightness(1.08); }
.btn-ghost { color: var(--gold-hi); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { background: rgba(212,178,106,.08); color: var(--gold-hi); }
.btn-discord { color: #fff; background: #5865f2; }
.btn-discord:hover { color: #fff; filter: brightness(1.1); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 15px; letter-spacing: 1.5px; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }

/* ── hero ── */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 120%, rgba(212,178,106,.22), transparent 55%),
  radial-gradient(ellipse at 80% 10%, rgba(70,90,140,.25), transparent 50%),
  linear-gradient(180deg, #07080c 0%, #0d0c10 55%, #0b0a08 100%); }
.hero-bg svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 55%; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.6) 1px, transparent 1px); background-size: 3px 3px; opacity: .04; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { font-family: 'Cinzel', serif; font-weight: 800; font-size: clamp(42px, 7vw, 86px); line-height: 1.02; letter-spacing: 2px; color: var(--gold-hi); text-shadow: 0 6px 40px rgba(0,0,0,.6); }
.hero h1 small { display: block; font-size: .42em; letter-spacing: 10px; color: var(--text); margin-top: 6px; }
.hero .motto { font-family: 'Cinzel', serif; font-size: clamp(18px, 2.2vw, 24px); color: var(--text); margin: 22px 0 30px; max-width: 32ch; }
.hero .motto em { color: var(--gold-hi); font-style: normal; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero { min-height: auto; } .status-card { min-width: 0; } }

/* ── karta statusu ── */
.status-card { background: rgba(23,20,15,.88); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.status-row:last-of-type { border-bottom: 0; }
.status-row .label { letter-spacing: 3px; }
.status-val { font-family: 'Cinzel', serif; font-weight: 700; font-size: 22px; color: var(--gold-hi); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 12px var(--green); }
.dot.off { background: var(--red); }
.connect { margin-top: 16px; display: flex; gap: 8px; }
.connect code { flex: 1; min-width: 0; padding: 10px 12px; background: #0b0a08; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── sekcje ── */
section.block { padding: 96px 0; border-bottom: 1px solid var(--line); }
section.block.alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(30px, 4vw, 44px); color: var(--gold-hi); line-height: 1.15; margin-top: 8px; }
.section-head p { color: var(--muted); margin-top: 14px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { font-family: 'Cinzel', serif; font-size: 21px; color: var(--gold-hi); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.card .num { font-family: 'Cinzel', serif; font-weight: 800; font-size: 40px; line-height: 1; color: var(--gold); opacity: .55; margin-bottom: 14px; }
.badge { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.badge.green { color: var(--green); } .badge.blue { color: var(--blue); } .badge.orange { color: var(--orange); } .badge.red { color: var(--red); } .badge.muted { color: var(--muted); }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: s; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.step::before { counter-increment: s; content: counter(s); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); font-family: 'Cinzel', serif; font-weight: 700; color: var(--gold-hi); margin-bottom: 16px; }
.step h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 21px; letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.step p { color: var(--muted); font-size: 15px; margin-top: 6px; }

.cta { text-align: center; padding: 110px 0; background: radial-gradient(ellipse at 50% 100%, rgba(212,178,106,.18), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.cta h2 { font-family: 'Cinzel', serif; font-size: clamp(30px, 5vw, 52px); color: var(--gold-hi); }
.cta p { color: var(--muted); margin: 14px auto 30px; max-width: 46ch; }
.cta .hero-actions { justify-content: center; }

/* ── stopka ── */
.footer { padding: 40px 0; color: var(--muted); font-size: 15px; }
.footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--muted); } .footer a:hover { color: var(--gold-hi); }

/* ── strony wewnętrzne ── */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, rgba(212,178,106,.12), transparent 60%); }
.page-head h1 { font-family: 'Cinzel', serif; font-size: clamp(34px, 5vw, 54px); color: var(--gold-hi); line-height: 1.1; margin-top: 8px; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 62ch; }
.page { padding: 48px 0 96px; }

.rules { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.rules nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.rules nav a { color: var(--muted); padding: 6px 10px; border-left: 2px solid var(--line); font-size: 15px; }
.rules nav a:hover { color: var(--gold-hi); border-color: var(--gold); }
.rules h2 { font-family: 'Cinzel', serif; color: var(--gold-hi); font-size: 26px; margin: 40px 0 14px; scroll-margin-top: 92px; }
.rules h2:first-child { margin-top: 0; }
.rules ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.rules li::marker { color: var(--gold); font-weight: 700; }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; } .rules nav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ── allowlista ── */
.tracker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 36px; }
.tracker div { padding: 12px 10px; border-top: 3px solid var(--line); font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 14px; color: var(--muted); }
.tracker div.done { border-color: var(--gold-lo); color: var(--gold); }
.tracker div.now { border-color: var(--gold-hi); color: var(--gold-hi); }
@media (max-width: 640px) { .tracker { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tracker div { font-size: 11px; padding: 10px 2px; letter-spacing: 0; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel h2 { font-family: 'Cinzel', serif; color: var(--gold-hi); font-size: 28px; margin-bottom: 10px; }
.panel p { color: var(--muted); }
.panel .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.alert { padding: 14px 16px; border-radius: 6px; border: 1px solid; margin-bottom: 20px; font-size: 16px; }
.alert.err { color: #ffb3ab; border-color: rgba(224,100,90,.5); background: rgba(224,100,90,.08); }
.alert.ok { color: #bfe7bf; border-color: rgba(121,196,122,.5); background: rgba(121,196,122,.08); }
.alert.info { color: var(--gold-hi); border-color: var(--line-strong); background: rgba(212,178,106,.06); }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); margin-top: 3px; flex-shrink: 0; }

.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; position: sticky; top: 68px; z-index: 5; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); }
.timer { font-family: 'Cinzel', serif; font-weight: 700; font-size: 24px; color: var(--gold-hi); }
.timer.low { color: var(--red); }
.q { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; }
.q legend { float: left; width: 100%; font-weight: 600; font-size: 18px; margin-bottom: 6px; padding: 0; }
.q legend + * { clear: both; }
.q legend span { color: var(--gold); font-family: 'Cinzel', serif; margin-right: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; cursor: pointer; }
.opt:hover { border-color: var(--line-strong); }
.opt input { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 4px; flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--gold); background: rgba(212,178,106,.07); }

.form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 14px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; background: #0b0a08; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit; font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 14px; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

/* ── panel admina ── */
.admin-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-family: 'Cinzel', serif; font-size: 30px; color: var(--gold-hi); line-height: 1.1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 15px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 7px 12px; cursor: pointer; }
.tab.active { background: var(--gold); color: #14110b; border-color: var(--gold); }
.queue { display: flex; flex-direction: column; gap: 8px; }
.qitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; }
.qitem:hover, .qitem.sel { border-color: var(--gold); }
.qitem img, .avatar-ph { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--panel-2); }
.qitem .who { flex: 1; min-width: 0; }
.qitem .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .who small { color: var(--muted); }
.detail h3 { font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: 15px; color: var(--muted); margin: 22px 0 8px; }
.detail .text { white-space: pre-wrap; background: #0b0a08; border: 1px solid var(--line); border-radius: 6px; padding: 14px; font-size: 16px; }
.answers { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.answers div { padding: 8px 10px; border-radius: 4px; background: #0b0a08; border-left: 3px solid var(--green); }
.answers div.wrong { border-color: var(--red); }
.answers small { color: var(--muted); display: block; }
.log { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
@media (max-width: 480px) { .hero-actions .btn { width: 100%; letter-spacing: 1px; } }
