/* ------------------------------------------------------------------
   Rajd Złotego Scyzoryka 2026 — arkusz stylów
   Estetyka: retro lata 70., ciepły krem i grafit, złoty akcent,
   sygnaturowy tęczowy pasek (jak litera „J" w logo). Klimat złotej
   godziny. Panel organizatora to negatyw tego samego języka.
------------------------------------------------------------------- */

:root {
  --paper: #f5f0e3;
  --paper-deep: #ebe2cf;
  --ink: #1b1710;
  --ink-soft: #4d4535;
  --ink-faint: #928769;

  /* Złoto z logo („ZŁOTEGO SCYZORYKA"). --zloto-deep do tekstu na jasnym tle,
     gdzie samo złoto ma za mały kontrast. Historyczna nazwa --rosso wskazuje
     teraz na złoto, żeby akcenty w całym arkuszu przeszły jedną zmianą. */
  --zloto: #b8912e;
  --zloto-deep: #8a6712;
  --rosso: var(--zloto);
  --rosso-deep: var(--zloto-deep);

  /* Sygnaturowy pasek retro — odcienie wprost z tęczowego „J” w logo. */
  --pas-czerwony: #e0332e;
  --pas-pomaranczowy: #f2a03c;
  --pas-turkus: #2fa9bd;

  /* Akcenty z plakatu: zieleń końcowych szewronów + pomarańcz daty „03.X.2026”. */
  --zielony: #4a9e3f;
  --zielony-deep: #3a7f32;
  --pomarancz: #ef6a2a;

  --carbon: #17130c;
  --carbon-soft: #211b12;
  --carbon-line: #342c1e;

  /* Nagłówki: Oswald — kondensowany, plakatowo-rajdowy, jak tytuł „RAJD
     ZŁOTEGO SCYZORYKA”. Treść: Inter, neutralna i czytelna na telefonie. */
  --display: "Oswald", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

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

a {
  color: inherit;
}

/* Ziarno papieru — nakładka na całą stronę */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

body.dark {
  background: var(--carbon);
  color: var(--paper);
}

body.dark::after {
  mix-blend-mode: screen;
  opacity: 0.16;
}

/* Cyfry o stałej szerokości — numery załóg, godziny, czasy */
.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --------------------------- animacje --------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sweep {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.rise {
  animation: rise 0.66s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.sweep {
  transform-origin: left;
  animation: sweep 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.d1 { animation-delay: 80ms; }
.d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; }
.d4 { animation-delay: 320ms; }
.d5 { animation-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .rise,
  .sweep {
    animation: none;
  }
}

/* --------------------------- typografia --------------------------- */

.brand {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--ink-soft);
}

body.dark .brand {
  color: rgb(242 238 229 / 0.4);
}

.eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--zloto-deep);
}

/* Znacznik pola nieobowiązkowego przy etykiecie */
.opcjonalnie {
  margin-left: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.display {
  font-family: var(--display);
  letter-spacing: -0.022em;
  line-height: 1.1;
  font-weight: 600;
}

.lead {
  color: var(--ink-soft);
  max-width: 26rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

body.dark .lead {
  color: rgb(242 238 229 / 0.5);
}

/* ----------------------- układ uczestnika ----------------------- */

.shell {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  min-height: 100dvh;
}

.head {
  margin-bottom: 3.5rem;
}

.head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.head-count {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.rule {
  height: 1px;
  background: rgb(27 23 16 / 0.22);
  margin-top: 0.75rem;
}

/* Kreska pod znakiem rajdu — złoty akcent. */
.rule.sweep {
  height: 3px;
  border-radius: 3px;
  background: var(--zloto);
}

.rule-red {
  height: 3px;
  width: 3.25rem;
  border-radius: 3px;
  background: var(--zloto);
}

h1.title {
  font-family: var(--display);
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1.04;
}

/* ----------------------------- pola ----------------------------- */

.fields {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.field label {
  display: block;
}

/* Pole formularza: miękka karta zamiast surowej linii.
   Stan skupienia gra ciepłą szarością — czerwień zostawiamy na akcenty. */
.field-input {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.8rem 1.05rem;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.55);
  outline: none;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.field-input.big {
  font-size: 2.6rem;
  padding: 0.55rem 1.05rem;
}

.field-input.mid {
  font-size: 1.75rem;
  padding: 0.65rem 1.05rem;
}

.field-input:hover {
  border-color: rgb(22 19 15 / 0.28);
}

.field-input:focus {
  border-color: rgb(22 19 15 / 0.5);
  background: #fdfbf6;
  box-shadow:
    0 0 0 4px rgb(22 19 15 / 0.05),
    0 10px 26px -16px rgb(22 19 15 / 0.55);
  transform: translateY(-1px);
}

.field-input::placeholder {
  color: var(--ink-faint);
  opacity: 0.5;
}

/* Etykieta lekko ciemnieje, gdy pole jest aktywne */
.field:focus-within .eyebrow {
  color: var(--ink);
}

.field .eyebrow {
  transition: color 0.28s ease;
}

textarea.answer {
  width: 100%;
  resize: vertical;
  min-height: 7rem;
  padding: 0.9rem 1.05rem;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.55);
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

textarea.answer:hover {
  border-color: rgb(22 19 15 / 0.28);
}

textarea.answer:focus {
  border-color: rgb(22 19 15 / 0.5);
  background: #fdfbf6;
  box-shadow:
    0 0 0 4px rgb(22 19 15 / 0.05),
    0 10px 26px -16px rgb(22 19 15 / 0.55);
}

/* --------------------------- przyciski --------------------------- */

.btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding: 1.25rem 1.75rem;
  border: 1px solid var(--zloto-deep);
  background: var(--zloto);
  color: #241c08;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  cursor: pointer;
  border-radius: 14px;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  background: var(--zloto-deep);
  border-color: var(--zloto-deep);
  color: #fdf6e6;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -18px rgb(138 103 18 / 0.85);
}

.btn:active {
  transform: translateY(0);
}

.btn .arrow {
  transition: transform 0.3s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.note {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-faint);
}

.alert {
  margin-top: 1.5rem;
  border-left: 2px solid var(--rosso);
  background: rgb(189 18 32 / 0.05);
  padding: 0.75rem 0 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--rosso-deep);
}

/* ------------------------------ quiz ------------------------------ */

.progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.progress-track {
  flex: 1;
  height: 1px;
  background: rgb(22 19 15 / 0.15);
}

.progress-bar {
  height: 1px;
  background: var(--rosso);
}

.progress-count {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.questions {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

fieldset.question {
  border: 0;
}

legend.question-text {
  margin-bottom: 1.5rem;
  padding: 0;
}

.q-num {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--rosso);
  margin-right: 0.75rem;
}

.q-body {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.55);
  cursor: pointer;
  transition:
    background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.22s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.option:hover {
  border-color: rgb(22 19 15 / 0.32);
  background: #fdfbf6;
  transform: translateY(-1px);
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-letter {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  transition: color 0.2s ease;
  min-width: 0.9rem;
}

.option-text {
  font-size: 0.95rem;
  line-height: 1.35;
}

.option:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px -16px rgb(22 19 15 / 0.8);
}

.option:has(input:checked) .option-letter {
  color: var(--rosso);
}

.option:has(input:focus-visible) {
  outline: none;
  border-color: rgb(22 19 15 / 0.5);
  box-shadow: 0 0 0 4px rgb(22 19 15 / 0.08);
}

/* ----------------------------- koniec ----------------------------- */

.summary {
  margin-top: 3.5rem;
  border-top: 1px solid rgb(22 19 15 / 0.2);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.summary-row dt {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
}

.summary-row dd {
  font-size: 1.25rem;
  font-weight: 500;
}

/* Indywidualna wiadomość na ekranie końcowym punktu */
.lead-wiadomosc {
  max-width: 30rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

.sendoff {
  margin-top: 4rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-faint);
}

.center-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

.center-body {
  margin: auto;
  max-width: 24rem;
}

.center-screen .rule-red {
  margin: 0 auto;
}

.center-screen .lead {
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------- znaki i stopka ------------------------- */

/* Znak rajdu jest pełnokolorowym blokiem, więc traktujemy go jak plakietkę:
   stała wysokość i lekkie zaokrąglenie, żeby nie wyglądał jak zgubiony
   prostokąt na papierze. */
.brandmark {
  height: 1.7rem;
  width: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.brandmark-big {
  height: auto;
  width: min(19rem, 100%);
  border-radius: 6px;
  margin: 0 auto;
}

.partners {
  margin-top: 4.5rem;
}

.center-screen .partners {
  margin-top: 2rem;
}

.partners-rule {
  height: 1px;
  background: rgb(22 19 15 / 0.12);
}

.partners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 6vw, 2.5rem);
  flex-wrap: wrap;
  padding-top: 1.75rem;
}

/* Znaki dealerów: czarne na przezroczystym, więc siadają wprost na papierze.
   Pełne krycie — to znaki firmowe, nie ozdoba. */
.partners-row img {
  height: auto;
  width: clamp(7.5rem, 32vw, 9.5rem);
  opacity: 0.85;
}

.partners-sep {
  width: 1px;
  align-self: stretch;
  min-height: 1.75rem;
  background: rgb(22 19 15 / 0.14);
}

@media (max-width: 26rem) {
  .partners-sep {
    display: none;
  }
}

/* =====================================================================
   PANEL ORGANIZATORA
   Ten sam papier, ten sam krój i te same zaokrąglenia co strony załogi.
   Panel czyta się na słońcu i na telefonie, więc kontrast i wielkość
   liter są ważniejsze od efektu.
   ===================================================================== */

.admin-shell {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 6rem;
}

@media (min-width: 640px) {
  .admin-shell {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ------------------------------ belka ------------------------------ */

.panel-head {
  margin-bottom: 2rem;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-brand-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
}

.panel-exit {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.panel-exit:hover {
  color: var(--rosso);
}

/* ----------------------------- zakładki ----------------------------- */

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid rgb(22 19 15 / 0.12);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  padding: 0.75rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px 10px 0 0;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tab:hover {
  color: var(--ink);
  background: rgb(22 19 15 / 0.03);
}

.tab-on {
  color: var(--ink);
}

/* Podkreślenie aktywnej zakładki — jedyny mocny akcent w nawigacji */
.tab-on::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: -1px;
  height: 2px;
  background: var(--rosso);
  border-radius: 2px 2px 0 0;
}

/* --------------------- podnawigacja testów --------------------- */

.testy-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.testy-pill {
  padding: 0.5rem 1rem;
  border: 1px solid rgb(22 19 15 / 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.testy-pill:hover {
  border-color: rgb(22 19 15 / 0.4);
  color: var(--ink);
}

.testy-pill.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------- nagłówek widoku --------------------------- */

.widok-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2rem 0 1.5rem;
}

.widok-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.028em;
}

.widok-sub {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 42rem;
}

.wroc {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.wroc:hover {
  color: var(--rosso);
}

.widok-akcje {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------------------------- przyciski ---------------------------- */

.btn-akcja {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--zloto-deep);
  border-radius: 12px;
  background: var(--zloto);
  color: #241c08;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.btn-akcja:hover {
  background: var(--zloto-deep);
  border-color: var(--zloto-deep);
  color: #fdf6e6;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -14px rgb(138 103 18 / 0.8);
}

.btn-akcja-cichy {
  background: transparent;
  color: var(--ink);
  border-color: rgb(22 19 15 / 0.22);
}

.btn-akcja-cichy:hover {
  background: transparent;
  color: var(--rosso);
  border-color: var(--rosso);
  box-shadow: none;
}

/* ---------------------------- szukajka ---------------------------- */

.szukajka {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.szukajka input[type="search"] {
  flex: 1;
  min-width: 14rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 12px;
  background: rgb(255 253 248 / 0.6);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.szukajka input[type="search"]:focus {
  border-color: rgb(22 19 15 / 0.5);
  background: #fdfbf6;
  box-shadow: 0 0 0 4px rgb(22 19 15 / 0.05);
}

.szukajka input[type="search"]::placeholder {
  color: var(--ink-faint);
  opacity: 0.65;
}

/* ------------------------------ karta ------------------------------ */

.karta {
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.7);
  overflow: hidden;
}

.karta + .sekcja {
  margin-top: 2.5rem;
}

.sekcja {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
}

.pusto {
  border: 1px dashed rgb(22 19 15 / 0.18);
  border-radius: 14px;
  padding: 4rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.stopka-info {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ------------------------------ tabele ------------------------------ */

.karta {
  overflow-x: auto;
}

table.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.tabela th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  background: rgb(22 19 15 / 0.03);
  border-bottom: 1px solid rgb(22 19 15 / 0.1);
  white-space: nowrap;
}

table.tabela td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgb(22 19 15 / 0.07);
  vertical-align: middle;
}

table.tabela tbody tr:last-child td {
  border-bottom: 0;
}

.col-lp {
  width: 3rem;
  color: var(--ink-faint);
}

.col-srodek {
  text-align: center;
}

.col-akcja {
  text-align: right;
  width: 8rem;
}

.mocne {
  font-weight: 600;
  font-size: 1rem;
}

tr.wiersz {
  cursor: pointer;
  transition: background-color 0.18s ease;
}

tr.wiersz:hover {
  background: rgb(22 19 15 / 0.025);
}

tr.wiersz-on {
  background: rgb(22 19 15 / 0.05);
}

.rozwin {
  border: 1px solid rgb(22 19 15 / 0.18);
  border-radius: 10px;
  background: transparent;
  padding: 0.35rem 0.7rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

tr.wiersz:hover .rozwin {
  border-color: var(--ink);
  color: var(--ink);
}

/* ------------------------- wynik i kary ------------------------- */

.kara {
  display: inline-block;
  min-width: 2.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgb(227 6 19 / 0.1);
  color: var(--rosso-deep);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kara-zero {
  background: rgb(79 122 74 / 0.14);
  color: #3f6a3a;
}

.wynik-mini {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.w-trakcie {
  color: var(--rosso);
  font-weight: 600;
}

.potwierdzone {
  color: #3f6a3a;
  font-weight: 600;
}

/* --------------------- rozwinięte odpowiedzi --------------------- */

tr.szczegoly td {
  background: rgb(22 19 15 / 0.035);
  padding: 0.5rem 1rem 1.5rem;
}

ol.odpowiedzi {
  list-style: none;
  counter-reset: pyt;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

ol.odpowiedzi li {
  counter-increment: pyt;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.2rem 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgb(255 253 248 / 0.85);
  border-left: 2px solid transparent;
}

ol.odpowiedzi li.odp-ok {
  border-left-color: #4f7a4a;
}

ol.odpowiedzi li.odp-zle {
  border-left-color: var(--rosso);
}

.odp-znak {
  grid-row: span 2;
  font-weight: 700;
  font-size: 0.95rem;
}

li.odp-ok .odp-znak {
  color: #3f6a3a;
}

li.odp-zle .odp-znak {
  color: var(--rosso);
}

.odp-pytanie {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.odp-tresc {
  font-size: 0.92rem;
  line-height: 1.45;
}

/* -------------------------- kafle punktów -------------------------- */

.punkty {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .punkty { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .punkty { grid-template-columns: repeat(3, 1fr); }
}

.punkt {
  display: block;
  padding: 1.25rem;
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.7);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.22s ease, background-color 0.22s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.punkt:hover {
  border-color: rgb(22 19 15 / 0.3);
  background: #fdfbf6;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -20px rgb(22 19 15 / 0.7);
}

.punkt-gora {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.punkt-nr {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.plakietka {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgb(22 19 15 / 0.18);
  color: var(--ink-soft);
  white-space: nowrap;
}

.plakietka-test {
  border-color: var(--rosso);
  background: rgb(227 6 19 / 0.08);
  color: var(--rosso-deep);
}

/* Kafel próby prowadzonej poza stroną — informacyjny, wygaszony, nieklikalny. */
.punkt-poza {
  cursor: default;
  border-style: dashed;
  background: rgb(22 19 15 / 0.02);
}

.punkt-poza:hover {
  border-color: rgb(22 19 15 / 0.14);
  background: rgb(22 19 15 / 0.02);
  transform: none;
  box-shadow: none;
}

.plakietka-poza {
  border-color: rgb(22 19 15 / 0.2);
  color: var(--ink-faint);
}

.punkt-nazwa-poza {
  color: var(--ink-faint);
}

.punkt-poza-note {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(22 19 15 / 0.1);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* Blok START / META na kaflu PRJ */
.prj-trasa {
  margin-top: 0.9rem;
}

.prj-etap {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.28rem 0;
}

.prj-etap + .prj-etap {
  border-top: 1px solid rgb(22 19 15 / 0.06);
}

.prj-etap-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.prj-etap-miejsce {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.punkt-poza .prj-etap-miejsce {
  color: var(--ink-soft);
}

/* Linijka wskaźników (start i meta) pod adresami */
.prj-wskazniki {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgb(22 19 15 / 0.14);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.prj-wskazniki b {
  font-weight: 700;
  color: var(--ink-soft);
}

.prj-wsk-tag {
  color: var(--rosso-deep);
  font-weight: 600;
}

.punkt-poza .prj-wsk-tag {
  color: var(--ink-faint);
}

.prj-wsk-sep {
  color: rgb(22 19 15 / 0.25);
  margin: 0 0.15rem;
}

.punkt-nazwa {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 0.6rem;
}

.punkt-rola {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rosso-deep);
}

.punkt-dol {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.punkt-liczba {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
}

.punkt-opis {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}

.punkt-ostatnia {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* -------------------------- kanał zdarzeń -------------------------- */

ul.kanal {
  list-style: none;
}

ul.kanal li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgb(22 19 15 / 0.07);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

ul.kanal li:last-child {
  border-bottom: 0;
}

.kanal-czas {
  color: var(--ink-faint);
  min-width: 4.5rem;
}

.kanal-zaloga {
  font-weight: 600;
  min-width: 7rem;
}

.kanal-gdzie {
  flex: 1;
  min-width: 8rem;
}

.kanal-gdzie a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.kanal-gdzie a:hover {
  color: var(--ink);
  border-bottom-color: var(--rosso);
}

/* ---------------------------- tabele PRJ ---------------------------- */

.time-input {
  border: 1px solid rgb(22 19 15 / 0.16);
  border-radius: 10px;
  background: rgb(255 253 248 / 0.8);
  color: var(--ink);
  padding: 0.45rem 0.65rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  outline: none;
  width: 100%;
  min-width: 7rem;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.time-input:hover {
  border-color: rgb(22 19 15 / 0.3);
}

.time-input:focus {
  border-color: rgb(22 19 15 / 0.5);
  background: #fdfbf6;
  box-shadow: 0 0 0 4px rgb(22 19 15 / 0.05);
}

.cell-meta {
  min-width: 9rem;
}

.col-usun {
  width: 2.5rem;
  text-align: right;
}

/* Kasowanie to akcja destrukcyjna — przycisk jest dyskretny, czerwienieje
   dopiero pod kursorem, a samo kliknięcie i tak wymaga potwierdzenia. */
.usun-btn {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.usun-btn:hover {
  color: var(--rosso);
  border-color: rgb(227 6 19 / 0.4);
  background: rgb(227 6 19 / 0.06);
}

/* Meta na odcinkach z kodem QR: czas ze skanu jest wartością wiodącą,
   poprawka sędziego chowa się pod dyskretną ikoną. */
.meta-czas {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.czas-glowny {
  font-size: 1rem;
  font-weight: 600;
}

.czas-poprawiony {
  color: var(--rosso-deep);
}

.czas-oryginal {
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-decoration: line-through;
}

.poprawka {
  margin-left: auto;
}

.poprawka summary {
  list-style: none;
  cursor: pointer;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.poprawka summary::-webkit-details-marker {
  display: none;
}

.poprawka summary:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgb(255 253 248 / 0.9);
}

.poprawka[open] summary {
  border-color: var(--rosso);
  color: var(--rosso);
}

.poprawka-tresc {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  padding: 0.75rem;
  min-width: 11rem;
  border: 1px solid rgb(22 19 15 / 0.14);
  border-radius: 12px;
  background: #fdfbf6;
  box-shadow: 0 12px 28px -18px rgb(22 19 15 / 0.8);
}

.poprawka-tresc .stat-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.poprawka-tresc .cell-note {
  margin-top: 0.4rem;
  line-height: 1.4;
}

.ikona-przyklad {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid rgb(22 19 15 / 0.2);
  border-radius: 6px;
  font-size: 0.7rem;
  vertical-align: -0.2em;
}

.cell-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.uwagi {
  font-size: 0.78rem;
  color: var(--rosso-deep);
  max-width: 14rem;
}

tr.row-problem td {
  background: rgb(227 6 19 / 0.05);
}

.dur {
  color: var(--ink-faint);
}

.pending {
  color: var(--rosso);
  font-weight: 600;
}

.time-big {
  font-size: 1rem;
  font-weight: 600;
}

.score {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score.good {
  background: rgb(79 122 74 / 0.14);
  color: #3f6a3a;
}

.score.mid {
  background: rgb(180 140 40 / 0.16);
  color: #7a5c14;
}

.score.poor {
  background: rgb(227 6 19 / 0.1);
  color: var(--rosso-deep);
}

/* --------------------------- komunikaty --------------------------- */

.warn-box,
.ok-box {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid;
  border-radius: 0 12px 12px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.warn-box {
  border-color: var(--rosso);
  background: rgb(227 6 19 / 0.07);
  color: var(--rosso-deep);
}

.ok-box {
  border-color: #4f7a4a;
  background: rgb(79 122 74 / 0.12);
  color: #3f6a3a;
}

.warn-box code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgb(22 19 15 / 0.07);
}

/* ------------------------ dopisywanie załogi ------------------------ */

.dopisz {
  margin-top: 1.5rem;
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  background: rgb(255 253 248 / 0.5);
}

.dopisz summary {
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.dopisz summary:hover {
  color: var(--rosso);
}

.dopisz-pola {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin-top: 1rem;
}

.dopisz-pola .stat-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.chip-save {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--rosso);
  border-radius: 12px;
  background: var(--rosso);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.chip-save:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ----------------------------- dziennik ----------------------------- */

.log-czas {
  white-space: nowrap;
  font-weight: 600;
}

.log-data {
  margin-left: 0.4rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-faint);
}

/* Typ zdarzenia jako plakietka; kolor zależy od tego, kto zdarzenie wywołał */
.log-typ {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid;
}

.log-typ.log-zaloga {
  border-color: rgb(22 19 15 / 0.16);
  background: rgb(22 19 15 / 0.04);
  color: var(--ink-soft);
}

.log-typ.log-organizator {
  border-color: var(--rosso);
  background: rgb(227 6 19 / 0.07);
  color: var(--rosso-deep);
}

.log-rej {
  margin-left: 0.4rem;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-size: 0.82rem;
}

.log-szczegoly {
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 22rem;
  line-height: 1.4;
}

.log-tech {
  white-space: nowrap;
}

.log-urzadzenie {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* ----------------------------- macierz ----------------------------- */

table.tabela.matrix th.matrix-head a {
  color: inherit;
  text-decoration: none;
  display: block;
}

table.tabela.matrix th.matrix-head a:hover {
  color: var(--rosso);
}

.matrix-head-type {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

table.tabela.matrix td.cell {
  border-left: 1px solid rgb(22 19 15 / 0.06);
  min-width: 5.5rem;
  text-align: center;
}

.cell-empty {
  color: rgb(22 19 15 / 0.18);
}

.cell-time {
  display: block;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.cell .score {
  margin-top: 0.3rem;
  font-size: 0.75rem;
}

.plate {
  text-transform: uppercase;
}

/* ------------------------------ logowanie ------------------------------ */

.login {
  width: 100%;
  max-width: 24rem;
  text-align: left;
}

.login h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.028em;
  margin-top: 1.75rem;
}

.login button {
  width: 100%;
  margin-top: 3rem;
  padding: 1rem;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.login button:hover {
  border-color: var(--rosso);
  background: var(--rosso);
}

.login .alert {
  margin-top: 1.25rem;
}
/* -------------------------------- kody QR -------------------------------- */

.qr-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .qr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.qr-card {
  border: 1px solid rgb(22 19 15 / 0.2);
  background: rgb(232 226 213 / 0.3);
  padding: 1.75rem;
  text-align: center;
  break-inside: avoid;
}

.qr-card img {
  margin: 1.25rem auto 0;
  max-width: 15rem;
  width: 100%;
}

.qr-card .url {
  margin-top: 1rem;
  font-size: 0.7rem;
  color: var(--ink-faint);
  word-break: break-all;
}

.qr-card .missing {
  margin: 1.25rem auto 0;
  border: 1px dashed rgb(22 19 15 / 0.3);
  padding: 2.5rem 1rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

@media print {
  .no-print {
    display: none !important;
  }
  body::after {
    display: none;
  }
  .qr-card {
    border-color: #999;
  }
}
/* ============================================================
   Lista startowa: ekran potwierdzenia załogi (uczestnik)
   ============================================================ */
.zaloga-karta {
  margin: 1.75rem 0 1.25rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--paper-deep);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}
.zaloga-numer {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.zaloga-osoby { margin-top: 0.6rem; font-size: 1.05rem; color: var(--ink); }
.zaloga-auto  { margin-top: 0.2rem; color: var(--ink-soft); }
.zaloga-rej {
  margin-top: 0.75rem;
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--ink-faint);
  border-radius: 7px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink-soft);
}
.btn-tekstowy {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  background: none;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-tekstowy:hover { color: var(--ink); }

/* ============================================================
   Panel: Lista startowa
   ============================================================ */
.komunikat {
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #e7f3e9;
  border: 1px solid #bcd9c2;
  color: #1f5a2c;
  font-weight: 500;
}
.karta-lista, .karta-podglad { margin-bottom: 1.25rem; }
.sekcja-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.sekcja-licz { font-size: 0.9rem; font-weight: 500; color: var(--ink-faint); }
.sekcja-opis { margin: 0.3rem 0 0.9rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }
.sekcja-opis code {
  background: var(--paper-deep);
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  font-size: 0.88em;
}
.form-wgraj { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.form-wgraj input[type="file"] { flex: 1 1 220px; }
.podglad-bledy-licz { color: var(--rosso-deep); font-weight: 600; }
.lista-bledy {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem 0.75rem 1.6rem;
  background: #fdf2f2;
  border: 1px solid #f0cccc;
  border-radius: 10px;
  color: var(--rosso-deep);
  font-size: 0.9rem;
  line-height: 1.6;
}
.tabela-scroll { overflow-x: auto; }
.podglad-akcje { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.btn-akcja-mocny {
  background: var(--rosso);
  border-color: var(--rosso-deep);
  color: #fff;
  font-weight: 600;
}
.btn-akcja-mocny:hover { background: var(--rosso-deep); }
.wiersz-awaryjny { background: #fff6e6; }
.pill-toggle {
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.pill-toggle.pill-on {
  background: #f4a91f;
  border-color: #c9860c;
  color: #3a2600;
  font-weight: 600;
}
.btn-usun {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
}
.btn-usun:hover { color: var(--rosso); }
.form-inline { display: inline; margin: 0; }
.dopisz-blok { margin-top: 1.25rem; border-top: 1px solid var(--paper-deep); padding-top: 1rem; }
.dopisz-blok summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.form-dopisz {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-top: 0.9rem;
}
.form-dopisz label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.form-dopisz input {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--ink-faint);
  border-radius: 8px;
  font: inherit;
}

/* ---- Lista startowa: sekcje panelu (padding — inaczej treść dokleja się do ramki .karta) ---- */
.panel-sekcja {
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.7);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.5rem;
}
.panel-sekcja-akcent {
  border-color: rgb(227 6 19 / 0.35);
  background: rgb(227 6 19 / 0.035);
}
.panel-sekcja > .sekcja-title { margin-bottom: 0.35rem; }
.panel-sekcja .sekcja-opis:last-child { margin-bottom: 0; }
.widok-head-sekcja { margin: 2.25rem 0 1rem; align-items: center; }

.form-wgraj {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.4rem;
}
.plik-input {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.plik-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgb(22 19 15 / 0.22);
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.plik-input::file-selector-button:hover { border-color: var(--rosso); color: var(--rosso); }

.podglad-akcje { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.podglad-bledy-licz { color: var(--rosso-deep); font-weight: 600; }
.lista-bledy {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem 0.75rem 1.6rem;
  background: rgb(227 6 19 / 0.05);
  border: 1px solid rgb(227 6 19 / 0.2);
  border-radius: 10px;
  color: var(--rosso-deep);
  font-size: 0.86rem;
  line-height: 1.6;
}
.lista-bledy li { margin: 0.1rem 0; }

/* Tabela z akcjami */
.col-akcje { width: 5.5rem; text-align: right; white-space: nowrap; }
.akcje-wiersz { display: inline-flex; gap: 0.4rem; align-items: center; justify-content: flex-end; }
.ikona-akcja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(22 19 15 / 0.16);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.ikona-akcja:hover { border-color: var(--ink); color: var(--ink); background: rgb(22 19 15 / 0.03); }
.ikona-usun:hover { border-color: var(--rosso); color: var(--rosso); background: rgb(227 6 19 / 0.05); }
.form-inline { display: inline; margin: 0; }

/* Tryb awaryjny — pigułka */
.pill-toggle {
  padding: 0.3rem 0.85rem;
  border: 1px solid rgb(22 19 15 / 0.2);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.pill-toggle:hover { border-color: var(--ink-soft); color: var(--ink-soft); }
.pill-toggle.pill-on {
  background: #f4a91f;
  border-color: #d68a0c;
  color: #3a2600;
}
.wiersz-awaryjny { background: rgb(244 169 31 / 0.09); }

/* Wiersz w trybie edycji */
.wiersz-edycja td { background: rgb(22 19 15 / 0.02); padding: 1rem; }
.form-edycja {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}
.form-edycja label, .form-dopisz label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.form-edycja input, .form-dopisz input {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgb(22 19 15 / 0.16);
  border-radius: 9px;
  background: #fdfbf6;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  min-width: 8rem;
}
.form-edycja input:focus, .form-dopisz input:focus {
  outline: none;
  border-color: rgb(22 19 15 / 0.5);
  box-shadow: 0 0 0 3px rgb(22 19 15 / 0.05);
}
.form-edycja-akcje { display: flex; gap: 0.5rem; align-items: center; }

/* Dopisanie ręczne */
.dopisz-blok { margin-top: 0.5rem; }
.dopisz-blok summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
  list-style-position: inside;
}
.dopisz-blok[open] summary { margin-bottom: 0.75rem; }
.form-dopisz { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; margin-top: 0.5rem; }

/* Komunikat */
.komunikat {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1.1rem;
  border-radius: 11px;
  background: rgb(39 122 58 / 0.1);
  border: 1px solid rgb(39 122 58 / 0.28);
  color: #1f5a2c;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Nagłówki sekcji w panelu */
.sekcja-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.sekcja-licz { font-size: 0.82rem; font-weight: 500; color: var(--ink-faint); letter-spacing: 0; }
.sekcja-opis { margin: 0.35rem 0 0.9rem; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.6; max-width: 46rem; }
.sekcja-opis code {
  background: rgb(22 19 15 / 0.06);
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  font-size: 0.86em;
}

/* ---- Lista startowa: ekran mapowania kolumn ---- */
.mapowanie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem 1.1rem;
  margin-top: 0.4rem;
}
.mapowanie-pole { display: flex; flex-direction: column; gap: 0.35rem; }
.mapowanie-etykieta {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.mapowanie-etykieta .wym { color: var(--rosso); }
.mapowanie select {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgb(22 19 15 / 0.18);
  border-radius: 10px;
  background: #fdfbf6;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  max-width: 100%;
}
.mapowanie select:focus {
  outline: none;
  border-color: rgb(22 19 15 / 0.5);
  box-shadow: 0 0 0 3px rgb(22 19 15 / 0.05);
}
.tabela-surowa { font-size: 0.82rem; }
.tabela-surowa td { white-space: nowrap; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }

/* Błąd inline w edytorze wiersza (AJAX) */
.edycja-blad { color: var(--rosso-deep); font-size: 0.82rem; align-self: center; }

/* Przycisk kasujący całą listę — wyraźnie ostrzegawczy */
.btn-akcja-danger {
  background: transparent;
  color: var(--rosso-deep);
  border-color: rgb(227 6 19 / 0.4);
}
.btn-akcja-danger:hover {
  background: var(--rosso);
  border-color: var(--rosso);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgb(227 6 19 / 0.9);
}

/* ============================================================
   Test: ekran instrukcji + pojedyncze pytanie z odliczaniem
   ============================================================ */
.zasady {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.zasady li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--ink-soft);
  line-height: 1.5;
}
.zasady li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rosso);
}
.zasady-akcent {
  font-weight: 700;
  color: var(--ink);
}

.shell-pytanie { padding-top: 1.75rem; }

.odliczanie {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.5rem 0 2rem;
}
.odliczanie-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgb(22 19 15 / 0.1);
  overflow: hidden;
}
.odliczanie-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--rosso);
  transition: width 0.1s linear;
}
.odliczanie-num {
  min-width: 2.2rem;
  text-align: right;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pytanie-tekst {
  font-family: var(--sans);
  font-size: clamp(1.22rem, 4.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.32;
  margin-bottom: 1.6rem;
}

/* ============================================================
   Ustawienia rajdu
   ============================================================ */
.ust-siatka {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem 1.1rem;
  margin-top: 0.5rem;
}
.ust-pole { display: flex; flex-direction: column; gap: 0.3rem; }
.ust-etykieta {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.ust-pole input, .ust-pole select {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgb(22 19 15 / 0.18);
  border-radius: 10px;
  background: #fdfbf6;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.ust-pole input:focus, .ust-pole select:focus {
  outline: none;
  border-color: rgb(22 19 15 / 0.5);
  box-shadow: 0 0 0 3px rgb(22 19 15 / 0.05);
}
.ust-hint { font-size: 0.78rem; color: var(--ink-faint); line-height: 1.4; }
.ust-hint code { background: rgb(22 19 15 / 0.06); padding: 0.05rem 0.3rem; border-radius: 4px; }
.ust-logo-podglad { margin-top: 0.9rem; padding: 0.6rem 0.8rem; background: var(--ink); border-radius: 10px; display: inline-block; }

.ust-moduly {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.ust-modul {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 11px;
  background: rgb(255 253 248 / 0.6);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.ust-modul:hover { border-color: rgb(22 19 15 / 0.3); }
.ust-modul input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--rosso); }
.ust-modul-nazwa { display: block; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.ust-modul-opis { display: block; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.45; margin-top: 0.15rem; }

/* ============================================================
   Rajd Złotego Scyzoryka — akcenty złote i stopka
   ============================================================ */
/* Nowa stopka stron załogi: dyskretny tęczowy akcent + nazwa rajdu. */
.stopka-rajd {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.stopka-pas {
  width: 3.25rem;
  height: 3px;
  border-radius: 3px;
  background: var(--zloto);
}
.stopka-nazwa {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-faint);
}

/* Nagłówki sekcji panelu na złoto. */
.sekcja { color: var(--zloto-deep); }

/* Plakietka „Test" w barwie złota (kontrola zostaje neutralna). */
.plakietka-test {
  background: var(--zloto);
  border-color: var(--zloto-deep);
  color: #241c08;
}

/* Numer punktu na kaflu — złoty akcent zamiast neutralnego. */
.punkt-nr { color: var(--zloto-deep); }

/* Etykieta „Panel organizatora” dostaje złoty ton. */
.panel-brand-label { color: var(--zloto-deep); }

/* ============================================================
   Pulpit panelu
   ============================================================ */
.staty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.5rem;
}
.stat-kafel {
  border: 1px solid rgb(27 23 16 / 0.12);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.7);
  padding: 1.1rem 1.25rem;
}
.stat-liczba {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-opis {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.skroty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.7rem;
}
.skrot-kafel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgb(27 23 16 / 0.12);
  border-radius: 12px;
  background: rgb(255 253 248 / 0.7);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s cubic-bezier(0.16,1,0.3,1);
}
.skrot-kafel:hover {
  border-color: var(--zloto-deep);
  background: rgb(184 145 46 / 0.08);
  transform: translateY(-1px);
}
.skrot-strzalka { color: var(--zloto-deep); font-size: 1.05rem; }

/* ============================================================
   Ekran instrukcji testu (station_test_intro)
   ============================================================ */
.intro-eyebrow {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--zloto-deep);
  margin-bottom: 0.5rem;
}
.intro-lead {
  margin-top: 1.5rem;
  max-width: 32rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
}
.intro-fakty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 2rem;
}
.fakt {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.9rem;
  border: 1px solid rgb(27 23 16 / 0.14);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.6);
}
.fakt-num {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.fakt-opis {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--ink-soft);
}
.btn-start { margin-top: 2.25rem; }

/* ============================================================
   Pasek postępu testu — szewrony (station_test_question)
   ============================================================ */
.progress {
  margin: 0.25rem 0 1.4rem;
}
.progress-label {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.progress-eyebrow {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}
.progress-num {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.progress-sep {
  margin: 0 0.12em;
  color: var(--ink-faint);
  font-weight: 500;
}
.progress-track {
  display: flex;
  gap: 4px;
}
.chev {
  flex: 1;
  height: 12px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%, 6px 50%);
  background: rgb(22 19 15 / 0.14);
  transition: background-color 0.2s ease;
}
.chev:first-child {
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
}
/* Ukończone pytania: neutralny taupe (NIE zielony — zieleń = poprawna odpowiedź,
   co mogłoby sugerować trafienie). Bieżące: złoto. Pozostałe: jasne. */
.chev-done { background: var(--ink-faint); }
.chev-now  { background: var(--zloto); box-shadow: 0 0 0 2px rgb(184 145 46 / 0.25); }
.chev-todo { background: rgb(22 19 15 / 0.14); }

/* ============================================================
   Ekran końcowy testu — wynik + przegląd (station_done)
   ============================================================ */
.wynik {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  border: 1px solid rgb(27 23 16 / 0.14);
  border-radius: 20px;
  background: rgb(255 253 248 / 0.7);
}
.wynik-label {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
}
.wynik-score {
  font-family: var(--display);
  font-size: clamp(3.4rem, 18vw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  margin: 0.4rem 0 0.35rem;
  color: var(--ink);
}
.wynik-slash { color: var(--ink-faint); font-weight: 500; margin: 0 0.06em; }
.wynik-pkt {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.wynik-kara {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgb(22 19 15 / 0.06);
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 999px;
  padding: 0.4rem 1rem;
}
.wynik-dobry .wynik-score { color: var(--zielony-deep); }
.wynik-dobry { border-color: rgb(74 158 63 / 0.45); background: rgb(74 158 63 / 0.06); }
.wynik-slaby .wynik-score { color: var(--zloto-deep); }

.przeglad {
  margin-top: 2.5rem;
  border-top: 1px solid rgb(22 19 15 / 0.16);
  padding-top: 1.75rem;
}
.przeglad-title {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}
.pyt {
  border: 1px solid rgb(22 19 15 / 0.12);
  border-radius: 16px;
  background: rgb(255 253 248 / 0.55);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
}
/* Cała ramka delikatnie kolorem: zielona = dobrze, czerwona = źle/brak. */
.pyt-ok   { border-color: rgb(74 158 63 / 0.5);  background: rgb(74 158 63 / 0.08); }
.pyt-zle  { border-color: rgb(224 51 46 / 0.5);  background: rgb(224 51 46 / 0.07); }
.pyt-brak { border-color: rgb(224 51 46 / 0.4);  background: rgb(224 51 46 / 0.05); }
.pyt-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.pyt-nr {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-faint);
  min-width: 1.4rem;
}
.pyt-text {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.pyt-opcje { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.op {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgb(22 19 15 / 0.1);
  border-radius: 11px;
  background: #fdfbf6;
}
.op-letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  min-width: 0.9rem;
}
.op-text { font-size: 0.9rem; line-height: 1.3; flex: 1; min-width: 60%; }
.op-tagi { display: inline-flex; gap: 0.35rem; margin-left: auto; }
.tag {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-ok { background: rgb(74 158 63 / 0.16); color: var(--zielony-deep); }
.tag-wybor { background: rgb(22 19 15 / 0.08); color: var(--ink-soft); }
.op-poprawna {
  border-color: rgb(74 158 63 / 0.55);
  background: rgb(74 158 63 / 0.1);
}
.op-poprawna .op-text { font-weight: 600; }
.op-zle {
  border-color: rgb(224 51 46 / 0.5);
  background: rgb(224 51 46 / 0.07);
}
.pyt-brak-info {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--pas-czerwony);
  font-weight: 600;
}
