
/* ==========================================
   POLSKA NA CZASIE – DARK MODE
   ========================================== */

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Tła */
  --paper: #101827;
  --paper-dim: #182437;
  --surface: #243449;

  /* Teksty */
  --ink: #f4f7fb;
  --ink-soft: #d3e0ee;
  --muted: #bacbdd;

  /* Obramowania */
  --line: #41536b;

  /* Kolory akcentów */
  --amber: #f2bb56;
  --amber-soft: #3b3020;
  --brick: #ff8175;
  --sage: #91c6a0;
  --gold: #f2bb56;

  /* Niebieskie odcienie */
  --sky: #24445e;
  --sky-light: #1b3349;
  --blue: #78c5ff;
  --blue-dark: #a8dbff;

  /* Pozostałe kolory */
  --red: #ff8175;
  --green: #91c6a0;
  --success: #91c6a0;
  --danger: #ff8175;

  /* Cienie */
  --shadow-sm: 0 4px 14px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 14px 38px rgb(0 0 0 / 0.35);
}

/* Przełącznik trybu */
.pnc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.pnc-theme-toggle:hover {
  background: var(--paper-dim);
}

.pnc-theme-toggle:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.pnc-theme-toggle .theme-icon {
  font-size: 20px;
  line-height: 1;
}

/* Podstawowe kolory */
:root[data-theme="dark"] body {
  background-color: var(--paper);
  color: var(--ink);
}

:root[data-theme="dark"] .pnc-main {
  color: var(--ink);
}


/* ======================================
   DARK MODE – POPRAWKI WIDOCZNOŚCI
   ====================================== */

/* Nawigacja */
:root[data-theme="dark"] .pnc-site-header {
  background: #151e2b;
  color: #f4f7fb;
  border-bottom: 1px solid #35465a;
}

:root[data-theme="dark"] .pnc-nav a,
:root[data-theme="dark"] .pnc-nav__toggle,
:root[data-theme="dark"] .pnc-user-nav a,
:root[data-theme="dark"] .pnc-user-name {
  color: #f4f7fb;
}

/* Menu rozwijane */
:root[data-theme="dark"] .pnc-nav__sub,
:root[data-theme="dark"] .pnc-menu {
  background: #1c2b3d;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-nav__sub a,
:root[data-theme="dark"] .pnc-menu a,
:root[data-theme="dark"] .pnc-menu summary {
  color: #f4f7fb;
}

/* Stopka */
:root[data-theme="dark"] .pnc-footer {
  background: #151e2b;
  color: #f4f7fb;
  border-top: 1px solid #35465a;
}

:root[data-theme="dark"] .pnc-footer a,
:root[data-theme="dark"] .pnc-footer p,
:root[data-theme="dark"] .pnc-footer strong,
:root[data-theme="dark"] .pnc-footer small {
  color: #d5e2ef;
}

/* Nagłówki */
:root[data-theme="dark"] .pnc-main h1,
:root[data-theme="dark"] .pnc-main h2,
:root[data-theme="dark"] .pnc-main h3 {
  color: #f4f7fb;
}

/* Przyciski i linki */
:root[data-theme="dark"] a:focus-visible,
:root[data-theme="dark"] button:focus-visible {
  outline: 3px solid #f2bb56;
  outline-offset: 3px;
}

/* ==========================================
   POLSKA NA CZASIE – DARK MODE
   POPRAWKI PODSTRONY O PROJEKCIE
========================================== */

/* O nas – teksty */
:root[data-theme="dark"] .pnc-about-intro p,
:root[data-theme="dark"] .pnc-about-us__content p {
  color: #d3e0ee;
}

/* O nas – karty */
:root[data-theme="dark"] .pnc-about-us__logo,
:root[data-theme="dark"] .pnc-about-us__description {
  background: #243449;
}

:root[data-theme="dark"] .pnc-about-us__description p {
  color: #f4f7fb;
}

/* Nasze wartości */
:root[data-theme="dark"] .pnc-values__card {
  background: #243449;
  border-color: #41536b;
}

:root[data-theme="dark"] .pnc-values__card h3 {
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-values__card p {
  color: #d3e0ee;
}

/* Pomysłodawcy i Koordynatorzy */
:root[data-theme="dark"] #zespol .pnc-team-card {
  background: #243449;
  border-color: #41536b;
  color: #f4f7fb;
}

:root[data-theme="dark"] #zespol .pnc-team-card h3,
:root[data-theme="dark"] #zespol .pnc-team-card p {
  color: #f4f7fb;
}

:root[data-theme="dark"] #zespol .pnc-team-card__photo {
  background: #182437;
  border-color: #41536b;
  color: #d3e0ee;
}

/* Współpraca */
:root[data-theme="dark"] .pnc-cooperation__logo,
:root[data-theme="dark"] .pnc-cooperation__description {
  background: #243449;
}

:root[data-theme="dark"] .pnc-cooperation__description p,
:root[data-theme="dark"] .pnc-cooperation__content p {
  color: #f4f7fb;
}

/* Metodologia */
:root[data-theme="dark"] .pnc-method-section {
  background: #182437;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-method-card {
  background: #243449;
  border-color: #41536b;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-method-card h3,
:root[data-theme="dark"] .pnc-method-card p {
  color: #f4f7fb;
}

/* Kontakt i inne jasne panele */
:root[data-theme="dark"] .pnc-soft-cta {
  background: #243449;
  border-color: #41536b;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-soft-cta h2,
:root[data-theme="dark"] .pnc-soft-cta p {
  color: #f4f7fb;
}

/* Poprawa kontrastu przycisków */
:root[data-theme="dark"] .pnc-soft-cta a {
  color: #17324d;
}

:root[data-theme="dark"] .pnc-soft-cta a:hover {
  color: #0f2740;
}

/* =========================================
   POLSKA NA CZASIE
   DARK MODE – STRONA GŁÓWNA
========================================= */

/* Główne tło strony */
:root[data-theme="dark"] .pnc-homepage {
  background: #101827;
  color: #f4f7fb;
}

/* HERO – ciemne niebo */
:root[data-theme="dark"] .pnc-homepage .pnc-hero {
  background: linear-gradient(
    180deg,
    #172d47 0%,
    #1d3d58 55%,
    #101827 100%
  );
  color: #f4f7fb;
}

/* Dekoracyjne tło nieba */
:root[data-theme="dark"] .pnc-homepage .pnc-sky-world {
  opacity: 0.35;
}

/* Nagłówek hero */
:root[data-theme="dark"] .pnc-homepage
.pnc-hero-copy .pnc-h1-line:not(.pnc-h1-line--red) {
  color: #a8dbff;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-h1-line--red {
  color: #ff8175;
}

/* Opis hero */
:root[data-theme="dark"] .pnc-homepage .pnc-lead {
  color: #e1edf8;
}

/* Przycisk hero */
:root[data-theme="dark"] .pnc-homepage
.pnc-hero .pnc-button {
  background: #165b93;
  color: #ffffff;
  border-color: #78c5ff;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-hero .pnc-button:hover {
  background: #2875b0;
}

/* Dymek przy samolociku */
:root[data-theme="dark"] .pnc-homepage
.pnc-speech-cloud {
  background: #243449;
  color: #f4f7fb;
  border-color: #78c5ff;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-speech-cloud span {
  color: #d3e0ee;
}

/* Sekcja materiałów */
:root[data-theme="dark"] .pnc-homepage
.pnc-start-section {
  background: #101827;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-start-section h2 {
  color: #f4f7fb;
}

/* Karty materiałów – dodatkowy kontrast */
:root[data-theme="dark"] .pnc-homepage
.pnc-start-section .pnc-card {
  background: #243449;
  color: #f4f7fb;
  border-color: #41536b;
}

/* Sekcja mapy Polski */
:root[data-theme="dark"] .pnc-homepage
.pnc-section--ink {
  background: #14243a;
  color: #f4f7fb;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-map-heading {
  color: #f4f7fb;
}

/* Kolorowe kategorie mapy */
:root[data-theme="dark"] .pnc-homepage
.pnc-mapa__kat {
  color: #101827;
  font-weight: 600;
}

/* Baner Dołącz do społeczności */
:root[data-theme="dark"] .pnc-homepage
.pnc-dolacz {
  background: #243449;
  color: #f4f7fb;
  border: 1px solid #41536b;
}

/* Tekst w banerze */
:root[data-theme="dark"] .pnc-homepage
.pnc-dolacz p {
  color: #f4f7fb;
}

/* Przycisk Zakładam konto */
:root[data-theme="dark"] .pnc-homepage
.pnc-dolacz .pnc-button {
  background: #78c5ff;
  color: #101827;
  border-color: #78c5ff;
}

:root[data-theme="dark"] .pnc-homepage
.pnc-dolacz .pnc-button:hover {
  background: #a8dbff;
  color: #101827;
}
/* PRZYCISK NA KARCIE */
.material-card .pnc-button,
.material-card button,
.material-card a {
  font-size: 15px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  background: #6bb6ff;
  color: #0b1b2b;
  border: 1px solid #8bc8ff;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  transition: 0.2s ease;
}

.material-card .pnc-button:hover,
.material-card button:hover,
.material-card a:hover {
  background: #8bc8ff;
  transform: translateY(-1px);
}

/* jeśli przycisk ma być lepiej ustawiony */
.material-card__content {
  display: flex;
  flex-direction: column;
}

.material-card__content .pnc-button,
.material-card__content button,
.material-card__content a {
  margin-top: auto;
  align-self: flex-start; /* albo flex-end */
}

/* ==========================================
   DARK MODE – KARTA MATERIAŁU I MAPA POLSKI
========================================== */

/* Karta materiału */
:root[data-theme="dark"] .pnc-home-card {
  background: #243449;
  border: 1px solid #41536b;
  border-radius: 12px;
  overflow: hidden;
}

/* Teksty karty */
:root[data-theme="dark"] .pnc-home-card .pnc-card-title {
  color: #ffffff;
}

:root[data-theme="dark"] .pnc-home-card .pnc-card-body p {
  color: #d3e0ee;
}

/* Przycisk Więcej */
:root[data-theme="dark"] .pnc-home-card .pnc-button--small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #78c5ff;
  border: 1px solid #78c5ff;
  color: #101827;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

:root[data-theme="dark"] .pnc-home-card .pnc-button--small:hover {
  background: #a8dbff;
  color: #101827;
  transform: translateY(-2px);
}

:root[data-theme="dark"] .pnc-home-card .pnc-button--small:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* ==========================================
   MAPA POLSKI – KOLOROWE ETYKIETY
========================================== */

:root[data-theme="dark"] .pnc-homepage .pnc-mapa__kat {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 10px;
  color: #ffffff;
  background: #243449;
  border-top: 1px solid #41536b;
  border-bottom: 1px solid #41536b;
  box-shadow: 0 3px 10px rgb(0 0 0 / 15%);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

/* Hover i aktywna etykieta */
:root[data-theme="dark"] .pnc-homepage .pnc-mapa__kat:hover,
:root[data-theme="dark"] .pnc-homepage .pnc-mapa__kat.is-aktywna {
  background: #344c68;
  color: #ffffff;
}

:root[data-theme="dark"] .pnc-homepage .pnc-mapa__kat:focus-visible {
  outline: 3px solid #a8dbff;
  outline-offset: 3px;
}

/* Wersja mobilna */
@media (max-width: 600px) {
  :root[data-theme="dark"] .pnc-homepage .pnc-mapa__kat {
    font-size: 13px;
    padding: 10px 12px;
    min-height: 48px;
  }
}

/* ========================================
   MATERIAŁY EDUKACYJNE – DARK MODE
======================================== */

/* 1. Nagłówek Materiały edukacyjne */
html[data-theme="dark"] .pnc-materials-hero {
  background: #192b40;
  border-bottom: 1px solid #34465d;
}

html[data-theme="dark"] .pnc-materials-hero h1 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-materials-hero .pnc-lead {
  color: #d0e3f5;
}

html[data-theme="dark"] .pnc-materials-hero__art {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .25));
}

/* 2. Sekcja Zacznij tutaj */
html[data-theme="dark"] .pnc-start-section {
  background: transparent;
}

html[data-theme="dark"] .pnc-start-section h2 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-start-box {
  background: #243449;
  color: #e8f3ff;
  border: 1px solid #3b5068;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .pnc-start-box p,
html[data-theme="dark"] .pnc-start-box li {
  color: #e8f3ff;
}

html[data-theme="dark"] .pnc-start-box li::marker {
  color: #83caff;
}

/* 3. Drzewo kategorii */
html[data-theme="dark"] .pnc-category-panel {
  color: #e8f3ff;
}

html[data-theme="dark"] .pnc-category-panel h2 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-category-panel .pnc-lead {
  color: #cadced;
}

html[data-theme="dark"] .pnc-category-panel .pnc-eyebrow {
  color: #83caff;
}

/* Karty kategorii */
html[data-theme="dark"] .pnc-category-node {
  background: #243449;
  color: #ffffff;
  border-color: #425670;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

html[data-theme="dark"] .pnc-category-node:hover {
  background: #2d4058;
  border-color: #76c5ff;
}

html[data-theme="dark"] .pnc-category-node.is-active {
  background: #304863;
  border-color: #83caff;
  box-shadow: 0 0 0 2px rgba(131, 202, 255, .2);
}

/* Tekst kategorii */
html[data-theme="dark"] .pnc-category-node__link,
html[data-theme="dark"] .pnc-category-node__row,
html[data-theme="dark"] .pnc-category-node__row strong {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-category-node__link:hover {
  color: #83caff;
}

html[data-theme="dark"] .pnc-category-node__meta {
  color: #c4d6e8;
}

/* Podkategorie */
html[data-theme="dark"] .pnc-category-node__children {
  border-top-color: #425670;
  border-left-color: #76c5ff;
}

html[data-theme="dark"] .pnc-category-node__children a {
  color: #e8f3ff;
}

html[data-theme="dark"] .pnc-category-node__children a:hover {
  color: #83caff;
}

/* Widoczny fokus klawiatury */
html[data-theme="dark"] .pnc-category-node a:focus-visible,
html[data-theme="dark"] .pnc-category-node button:focus-visible {
  outline: 3px solid #83caff;
  outline-offset: 3px;
}

/* Dark Mode – przyciski grup wiekowych */
html[data-theme="dark"] .pnc-category-node__children a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  background: #192b40;
  color: #e8f3ff;
  border: 1px solid #78c5ff;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

html[data-theme="dark"] .pnc-category-node__children a:hover {
  background: #34516d;
  color: #ffffff;
}

html[data-theme="dark"] .pnc-category-node__children a:focus-visible {
  outline: 3px solid #a8dbff;
  outline-offset: 2px;
}

/* ==========================================
   DARK MODE – STREFA NAUCZYCIELA
   ========================================== */

/* Nagłówek */
html[data-theme="dark"] .pnc-teacher-hero {
  background: #1b2d42;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-teacher-hero h1 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-teacher-hero .pnc-lead {
  color: #d5e3f0;
}

html[data-theme="dark"] .pnc-teacher-hero .pnc-eyebrow {
  color: #91caff;
}

/* Karty gier – prawa część */
html[data-theme="dark"] .pnc-game-feature__copy {
  background: #243449;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-game-feature__copy h3 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-game-feature__copy p,
html[data-theme="dark"] .pnc-game-feature__copy li {
  color: #d5e3f0;
}

html[data-theme="dark"] .pnc-game-feature__copy .pnc-eyebrow {
  color: #91caff;
}

/* Karty gier – obramowanie */
html[data-theme="dark"] .pnc-game-feature {
  border: 1px solid #40546b;
  border-radius: 14px;
  overflow: hidden;
}

/* Odznaki na obrazach */
html[data-theme="dark"] .pnc-game-feature__badge {
  background: #243449;
  color: #f1f5f9;
}

/* Przyciski uruchamiania gier */
html[data-theme="dark"] .pnc-game-feature__copy .pnc-button {
  background: #2779b8;
  color: #ffffff;
  border-color: #2779b8;
}

html[data-theme="dark"] .pnc-game-feature__copy .pnc-button:hover {
  background: #165b93;
}

/* Wsparcie podczas zajęć */
html[data-theme="dark"] .pnc-audience-card {
  background: #243449;
  border: 1px solid #40546b;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-audience-card h3 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-audience-card p {
  color: #d5e3f0;
}

/* Fokus klawiatury – dostępność */
html[data-theme="dark"] .pnc-button:focus-visible {
  outline: 3px solid #91caff;
  outline-offset: 3px;
}

/* DARK MODE – STREFA RODZICA */

html[data-theme="dark"] .pnc-parent-hero {
  background: #1b2d42;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-parent-hero h1 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-parent-hero p {
  color: #d5e3f0;
}

html[data-theme="dark"] .pnc-parent-hero .pnc-eyebrow {
  color: #91caff;
}

/* DARK MODE – STREFA RODZICA */

html[data-theme="dark"] .pnc-future-hero {
  background: #1b2d42;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-future-hero h1 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-future-hero .pnc-lead {
  color: #d5e3f0;
}

html[data-theme="dark"] .pnc-future-hero .pnc-eyebrow {
  color: #91caff;
}

/* DARK MODE – INSPIRACJE POLONIJNE */

html[data-theme="dark"] .pnc-poradnia__subtitle {
  color: #b8d4ea;
}

html[data-theme="dark"] .pnc-poradnia__content {
  background: #243449;
  color: #f1f5f9;
  border: 1px solid #40566e;
  border-radius: 12px;
}

html[data-theme="dark"] .pnc-poradnia__content p {
  color: #e2e8f0;
}

html[data-theme="dark"] .pnc-poradnia__content a:not(.pnc-button) {
  color: #91caff;
}

/* DARK MODE – menu rozwijane */
html[data-theme="dark"] .pnc-nav__sub {
  background: #243449;
  border: 1px solid #40566e;
}

html[data-theme="dark"] .pnc-nav__sub a {
  display: block;
  color: #f1f5f9;
  background: transparent;
}

html[data-theme="dark"] .pnc-nav__sub a:hover,
html[data-theme="dark"] .pnc-nav__sub a:focus-visible {
  background: #344a63;
  color: #ffffff;
}

/* =====================================
   DARK MODE – ZALOGUJ SIĘ DO POLSKI
===================================== */

html[data-theme="dark"] .pnc-game-page {
  background: #101827;
  color: #f4f7fb;
}

/* Nagłówek gry */
html[data-theme="dark"] .pnc-game-header {
  background: linear-gradient(135deg, #182b43, #243b54);
  border-color: #40566e;
}

html[data-theme="dark"] .pnc-game-header h1,
html[data-theme="dark"] .pnc-game-header p {
  color: #f4f7fb;
}

html[data-theme="dark"] .pnc-game-breadcrumb a {
  color: #a8dbff;
}

/* Tło wokół planszy */
html[data-theme="dark"] .pnc-game-shell {
  background: linear-gradient(180deg, #17283d, #101827);
  color: #f4f7fb;
}

/* Górny pasek i panel graczy */
html[data-theme="dark"] .pnc-game-toolbar,
html[data-theme="dark"] .pnc-turn-card,
html[data-theme="dark"] .pnc-game-players,
html[data-theme="dark"] .pnc-game-log,
html[data-theme="dark"] .pnc-game-setup {
  background: #243449;
  color: #f4f7fb;
  border-color: #40566e;
}

/* Tekst */
html[data-theme="dark"] .pnc-game-shell h2,
html[data-theme="dark"] .pnc-turn-card__top strong,
html[data-theme="dark"] .pnc-game-console__heading h2,
html[data-theme="dark"] .pnc-dice-zone strong {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-game-shell p,
html[data-theme="dark"] .pnc-game-turn-pill,
html[data-theme="dark"] .pnc-game-progress,
html[data-theme="dark"] .pnc-game-player-row,
html[data-theme="dark"] .pnc-game-log summary {
  color: #e2e8f0;
}

/* Kostka i informacje */
html[data-theme="dark"] .pnc-dice-zone,
html[data-theme="dark"] .pnc-game-player-row.is-active {
  background: #18283c;
}

html[data-theme="dark"] .pnc-dice-zone p,
html[data-theme="dark"] .pnc-turn-card__label,
html[data-theme="dark"] .pnc-game-console__heading span {
  color: #cbd9e8;
}

html[data-theme="dark"] .pnc-die,
html[data-theme="dark"] .pnc-game-icon-button,
html[data-theme="dark"] .pnc-position-badge {
  background: #344a63;
  color: #ffffff;
  border-color: #59718b;
}

/* Pasek postępu */
html[data-theme="dark"] .pnc-game-progress > div {
  background: #40566e;
}

/* Okna dialogowe */
html[data-theme="dark"] .pnc-game-dialog {
  background: #243449;
  color: #f4f7fb;
}

html[data-theme="dark"] .pnc-game-dialog h2,
html[data-theme="dark"] .pnc-game-dialog p,
html[data-theme="dark"] .pnc-rules-steps strong {
  color: #f4f7fb;
}

/* Formularz rozpoczynania gry */
html[data-theme="dark"] .pnc-game-setup__form h2,
html[data-theme="dark"] .pnc-game-setup__form > p {
  color: #f4f7fb;
}

html[data-theme="dark"] .pnc-player-field input,
html[data-theme="dark"] .pnc-game-option {
  background: #18283c;
  color: #ffffff;
  border-color: #40566e;
}

/* DARK MODE – przyciski gry */

html[data-theme="dark"] .pnc-game-header button,
html[data-theme="dark"] .pnc-game-header a {
  background: #243449;
  color: #ffffff;
  border: 1px solid #59718b;
  border-radius: 8px;
}

html[data-theme="dark"] .pnc-game-header button:hover,
html[data-theme="dark"] .pnc-game-header a:hover {
  background: #344a63;
  color: #ffffff;
}

html[data-theme="dark"] .pnc-game-header button:focus-visible,
html[data-theme="dark"] .pnc-game-header a:focus-visible {
  outline: 3px solid #8bd3ff;
  outline-offset: 3px;
}

/* DARK MODE – przycisk Następny gracz */

html[data-theme="dark"] .pnc-turn-card button {
  background: #2563a6;
  color: #ffffff;
  border: 1px solid #5b9ad0;
}

html[data-theme="dark"] .pnc-turn-card button:hover {
  background: #347fc2;
  color: #ffffff;
}

html[data-theme="dark"] .pnc-turn-card button:focus-visible {
  outline: 3px solid #8bd3ff;
  outline-offset: 3px;
}

/* DARK MODE – CIEPŁO CZY ZIMNO */

/* Przycisk rozpoczęcia gry */
html[data-theme="dark"] .pnc-game-page button {
  color: #ffffff;
}

/* Przyciski wewnątrz gry */
html[data-theme="dark"] .pnc-game-page button:not(:disabled):hover {
  filter: brightness(1.12);
}

html[data-theme="dark"] .pnc-game-page button:focus-visible {
  outline: 3px solid #8bd3ff;
  outline-offset: 3px;
}

/* DARK MODE – CIEPŁO CZY ZIMNO */

/* Przycisk Zacznij zabawę */
html[data-theme="dark"] .game2 .cta {
  background: #2563a6;
  color: #ffffff;
  border: 1px solid #60a5fa;
  border-radius: 10px;
  box-shadow: none;
}

/* Hover */
html[data-theme="dark"] .game2 .cta:hover {
  background: #347fc2;
  color: #ffffff;
}

/* Klawiatura */
html[data-theme="dark"] .game2 .cta:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

/* Przycisk dźwięku – jeśli jest w kontenerze gry */
html[data-theme="dark"] .game2 button:not(.cta) {
  color: #f1f5f9;
}

/* Wspólny przycisk dla obu gier w Dark Mode */

html[data-theme="dark"] .game2 .cta {
  background: #2563a6;
  color: #ffffff;
  border: 1px solid #60a5fa;
}

html[data-theme="dark"] .game2 .cta:hover {
  background: #347fc2;
}

html[data-theme="dark"] .game2 .cta:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

/* DARK MODE – GŁOSKA S CZY SZ */

html[data-theme="dark"] .game3 .cta,
html[data-theme="dark"] .game3 #startBtn {
  background: #2563a6 !important;
  color: #ffffff !important;
  border: 1px solid #60a5fa;
}

html[data-theme="dark"] .game3 .cta:hover,
html[data-theme="dark"] .game3 #startBtn:hover {
  background: #347fc2 !important;
}

/* DARK MODE – TWOJA PÓŁKA */

html[data-theme="dark"] .pnc-page-hero {
  background: #1c3046;
  color: #f1f5f9;
  border-bottom: 1px solid #40556b;
}

html[data-theme="dark"] .pnc-page-hero h1 {
  color: #f8fafc;
}

html[data-theme="dark"] .pnc-page-hero .pnc-lead {
  color: #d5e5f5;
}

html[data-theme="dark"] .pnc-page-hero .pnc-eyebrow {
  color: #80c6ff;
}


/* ==================================
   DARK MODE – PANEL REDAKCYJNY
================================== */

html[data-theme="dark"] .pnc-panel-shell {
  background: #0f1726;
  color: #f1f5f9;
  min-height: 100vh;
}

html[data-theme="dark"] .pnc-panel-content {
  background: #0f1726;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-panel-sidebar {
  background: #172b43;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-panel-sidebar a {
  color: #e0edff;
}

html[data-theme="dark"] .pnc-panel-topbar {
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-panel-content h1,
html[data-theme="dark"] .pnc-panel-content h2,
html[data-theme="dark"] .pnc-panel-content h3 {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-panel-content .pnc-lead {
  color: #d5e3f3;
}

/* STATYSTYKI */

html[data-theme="dark"] .pnc-stat {
  background: #24354b;
  border: 1px solid #40556b;
  color: #f1f5f9;
}

html[data-theme="dark"] .pnc-stat strong {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-stat small,
html[data-theme="dark"] .pnc-stat .pnc-eyebrow {
  color: #b7d9f5;
}

/* TABELE */

html[data-theme="dark"] .pnc-table-wrap {
  background: #24354b;
  border: 1px solid #40556b;
  border-radius: 12px;
  overflow-x: auto;
}

html[data-theme="dark"] .pnc-table,
html[data-theme="dark"] .pnc-table th,
html[data-theme="dark"] .pnc-table td {
  background: #24354b;
  color: #f1f5f9;
  border-color: #40556b;
}

html[data-theme="dark"] .pnc-table th {
  color: #b7d9f5;
}

/* LINKI */

html[data-theme="dark"] .pnc-panel-content a:not(.pnc-button) {
  color: #80c6ff;
}

/* PRZYCISKI */

html[data-theme="dark"] .pnc-panel-content .pnc-button--secondary {
  background: #24354b;
  border-color: #50708f;
  color: #ffffff;
}

/* FORMULARZE */

html[data-theme="dark"] .pnc-panel-content input,
html[data-theme="dark"] .pnc-panel-content select,
html[data-theme="dark"] .pnc-panel-content textarea {
  background: #172638;
  color: #ffffff;
  border-color: #40556b;
}

html[data-theme="dark"] .pnc-panel-content input::placeholder,
html[data-theme="dark"] .pnc-panel-content textarea::placeholder {
  color: #b6c7da;
}

/* KARTY */

html[data-theme="dark"] .pnc-panel-content .pnc-card {
  background: #24354b;
  color: #f1f5f9;
  border-color: #40556b;
}

/* PANEL – PRZYCISKI NOWY MATERIAŁ I KOLEKCJA */

html[data-theme="dark"] .pnc-section-head .pnc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

html[data-theme="dark"] .pnc-section-head .pnc-actions .pnc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid #5686b4;
  border-radius: 8px;
  background: #243b55;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .pnc-section-head .pnc-actions .pnc-button:hover {
  background: #31577a;
  border-color: #7bc5ff;
  color: #ffffff;
}

html[data-theme="dark"] .pnc-section-head .pnc-actions .pnc-button:focus-visible {
  outline: 3px solid #7bc5ff;
  outline-offset: 3px;
}

/* DARK MODE – przycisk Wyloguj w menu */

html[data-theme="dark"] .pnc-panel-topbar .pnc-button--secondary {
  background: #243b55;
  color: #ffffff;
  border: 1px solid #5686b4;
}

html[data-theme="dark"] .pnc-panel-topbar .pnc-button--secondary:hover {
  background: #31577a;
  color: #ffffff;
}

/* DARK MODE – przycisk Wyloguj */

html[data-theme="dark"] .pnc-site-header .pnc-user-nav .pnc-button--ghost {
  background: #243b55 !important;
  color: #ffffff !important;
  border: 1px solid #5686b4 !important;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  transition: background 0.2s ease;
}

html[data-theme="dark"] .pnc-site-header .pnc-user-nav .pnc-button--ghost:hover {
  background: #31577a !important;
  color: #ffffff !important;
  border-color: #7bc5ff !important;
}

html[data-theme="dark"] .pnc-site-header .pnc-user-nav .pnc-button--ghost:focus-visible {
  outline: 3px solid #7bc5ff;
  outline-offset: 3px;
}

/* DARK MODE – przyciski grup wiekowych */

html[data-theme="dark"] .pnc-age-button,
html[data-theme="dark"] .age-button {
  background: #304760 !important;
  color: #ffffff !important;
  border: 1px solid #58718d !important;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

/* Po najechaniu myszką */
html[data-theme="dark"] .pnc-age-button:hover,
html[data-theme="dark"] .age-button:hover {
  background: #35618a !important;
  color: #ffffff !important;
}

/* Aktywny przycisk */
html[data-theme="dark"] .pnc-age-button.active,
html[data-theme="dark"] .age-button.active,
html[data-theme="dark"] .pnc-age-button[aria-pressed="true"],
html[data-theme="dark"] .age-button[aria-pressed="true"] {
  background: #17688f !important;
  color: #ffffff !important;
  border-color: #7bc5ff !important;
}

/* Obsługa klawiatury */
html[data-theme="dark"] .pnc-age-button:focus-visible,
html[data-theme="dark"] .age-button:focus-visible {
  outline: 3px solid #7bc5ff;
  outline-offset: 3px;
}

/* Dark Mode – aktywna grupa wiekowa */
html[data-theme="dark"] .pnc-age-button.active,
html[data-theme="dark"] .age-button.active,
html[data-theme="dark"] .pnc-age-button[aria-pressed="true"],
html[data-theme="dark"] .age-button[aria-pressed="true"] {
  background: #17688f !important;
  color: #ffffff !important;
  border: 1px solid #7bc5ff !important;
}

.pnc-brand-logo .logo-light {
  display: block;
}

.pnc-brand-logo .logo-dark {
  display: none;
}

html[data-theme="dark"] .pnc-brand-logo .logo-light {
  display: none;
}

html[data-theme="dark"] .pnc-brand-logo .logo-dark {
  display: block;
}

/* Duże logo na stronie głównej */

/* Light Mode */
.hero-logo-light {
  display: block;
}

.hero-logo-dark {
  display: none;
}

/* Dark Mode */
html[data-theme="dark"] .hero-logo-light {
  display: none;
}

html[data-theme="dark"] .hero-logo-dark {
  display: block;
}

/* Logo – O nas i Współpraca */

/* Light Mode */
.pnc-about-us__logo .logo-light,
.pnc-cooperation__logo .logo-light {
  display: block !important;
}

.pnc-about-us__logo .logo-dark,
.pnc-cooperation__logo .logo-dark {
  display: none !important;
}

/* Dark Mode */
html[data-theme="dark"] .pnc-about-us__logo .logo-light,
html[data-theme="dark"] .pnc-cooperation__logo .logo-light {
  display: none !important;
}

html[data-theme="dark"] .pnc-about-us__logo .logo-dark,
html[data-theme="dark"] .pnc-cooperation__logo .logo-dark {
  display: block !important;
}


/* Przycisk Wyloguj – Light Mode */
.pnc-user-nav .pnc-button--ghost {
  background: #ffffff !important;
  color: #173b5d !important;
  border: 1px solid #b8cadd !important;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Light Mode – hover */
.pnc-user-nav .pnc-button--ghost:hover {
  background: #e7f3ff !important;
  border-color: #2376b8 !important;
}

/* Przycisk Wyloguj – Dark Mode */
html[data-theme="dark"] .pnc-user-nav .pnc-button--ghost {
  background: #24364b !important;
  color: #ffffff !important;
  border: 1px solid #527b9e !important;
}

/* Dark Mode – hover */
html[data-theme="dark"] .pnc-user-nav .pnc-button--ghost:hover {
  background: #305273 !important;
  border-color: #75c5ff !important;
}

/* Dymek przy samolocie – Dark Mode */
html[data-theme="dark"] .pnc-hero-bubble::after {
  background: #1e344b !important;
  border-right: 1px solid #75bfff;
  border-bottom: 1px solid #75bfff;
  transform: rotate(45deg);
}

/* Dymek samolotu – Dark Mode */
html[data-theme="dark"] .pnc-speech-cloud {
  background: #1e344b !important;
  border-color: #75bfff !important;
}

/* Romb pod dymkiem – Dark Mode */
html[data-theme="dark"] .pnc-speech-cloud::after {
  background: #1e344b !important;
  border-color: #75bfff !important;
}

/* Jeśli romb jest tworzony przez ::before */
html[data-theme="dark"] .pnc-speech-cloud::before {
  background-color: #1e344b;
}

/* Przełącznik motywu – telefon */
.pnc-theme-toggle--mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .pnc-theme-toggle--mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    width: 36px;
    height: 36px;
  }
}

/* Przyciski – Inspiracje polonijne, Dark Mode */
html[data-theme="dark"]
.pnc-inspiration-section .pnc-button {
  color: #ffffff !important;
}

/* Inspiracje polonijne – przyciski Dark Mode */
html[data-theme="dark"] a.pnc-button,
html[data-theme="dark"] a.pnc-button:hover {
  color: #ffffff !important;
}

/* Przyciski w Dark Mode */
html[data-theme="dark"] a.pnc-button,
html[data-theme="dark"] a.pnc-button:link,
html[data-theme="dark"] a.pnc-button:visited,
html[data-theme="dark"] a.pnc-button:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Poradnia Polonijna – przycisk Dark Mode */
html[data-theme="dark"] .pnc-poradnia__button,
html[data-theme="dark"] .pnc-poradnia__button:visited,
html[data-theme="dark"] .pnc-poradnia__button:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Dymek przy samolocie – Dark Mode */
html[data-theme="dark"] .pnc-speech-cloud,
html[data-theme="dark"] .pnc-speech-cloud span {
  color: #ffffff !important;
}

/* Czerwony napis pozostaje bez zmian */
html[data-theme="dark"] .pnc-speech-cloud strong {
  color: #ff8178 !important;
}

/* =====================================
   STRONA GŁÓWNA – DARK MODE
   Delikatne efekty dekoracyjne
===================================== */

/* Mniej intensywne jasne efekty tła */
html[data-theme="dark"] .pnc-hero {
  background-color: #1b344c;
  background-blend-mode: soft-light;
}

/* Delikatniejsza poświata dekoracyjna */
html[data-theme="dark"] .pnc-hero::before,
html[data-theme="dark"] .pnc-hero::after {
  opacity: 0.35;
}

/* Zachowujemy czytelność logo */
html[data-theme="dark"] .pnc-hero .logo-dark {
  opacity: 1;
  filter: none;
}

/* Dymek przy samolocie bez zmian */
html[data-theme="dark"] .pnc-speech-cloud {
  opacity: 1;
}


/* Menu wyboru motywu – Polska na czasie */

.pnc-theme-menu {
  position: fixed;
  z-index: 99999;
  width: 150px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.pnc-theme-menu[hidden] {
  display: none !important;
}

.pnc-theme-option {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.pnc-theme-option:hover,
.pnc-theme-option.is-active {
  background: #dbeafe;
  color: #0752bd;
}

/* Dark Mode */

html[data-theme="dark"] .pnc-theme-menu {
  background: #152238;
  border-color: #405876;
}

html[data-theme="dark"] .pnc-theme-option {
  color: #ffffff;
}

html[data-theme="dark"] .pnc-theme-option:hover,
html[data-theme="dark"] .pnc-theme-option.is-active {
  background: #27476c;
  color: #ffffff;
}

/* Przycisk Zaloguj się – Dark Mode */
html[data-theme="dark"] .pnc-user-nav > a.pnc-button--secondary {
  background: #243b5a !important;
  color: #ffffff !important;
  border: 1px solid #6ea8e8 !important;
}

html[data-theme="dark"] .pnc-user-nav > a.pnc-button--secondary:hover {
  background: #345783 !important;
  color: #ffffff !important;
}


/* Wyloguj – menu mobilne */
.pnc-menu .pnc-mobile-logout {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #8caacf;
  border-radius: 8px;
  background: transparent;
  color: #17385e;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

html[data-theme="dark"] .pnc-menu .pnc-mobile-logout {
  background: #243b5a;
  border-color: #6ea8e8;
  color: #ffffff;
}

/* Przycisk logowania – Dark Mode */
html[data-theme="dark"] .pnc-auth-card button[type="submit"] {
  background: #2563a6;
  color: #ffffff;
  border: 1px solid #60a5fa;
  font-weight: 700;
}

html[data-theme="dark"] .pnc-auth-card button[type="submit"]:hover {
  background: #1d4f88;
}


/* Przycisk logowania – Dark Mode */
html[data-theme="dark"] .pnc-login .pnc-login-submit {
  background: #2563a6 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #60a5fa !important;
  font-weight: 700;
}

html[data-theme="dark"] .pnc-login .pnc-login-submit:hover {
  background: #1d4f88 !important;
  color: #ffffff !important;
}

/* Tekst przy grafice logowania – Dark Mode */
html[data-theme="dark"] .pnc-login-art p {
  color: #dbeafe !important;
  -webkit-text-fill-color: #dbeafe !important;
}

/* Przyciski na stronie O projekcie – Dark Mode */
html[data-theme="dark"] .pnc-cooperation__button,
html[data-theme="dark"] .pnc-cooperation__button:visited {
  background: #243b5a !important;
  color: #ffffff !important;
  border: 1px solid #6ea8e8 !important;
}

/* Przycisk Zakładam konto – Dark Mode */
html[data-theme="dark"] .pnc-button--primary {
  background: #2563a6 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

html[data-theme="dark"] .pnc-button--primary:hover {
  background: #1d4f88 !important;
}

/* Zakładam konto – Dark Mode */
html[data-theme="dark"] .pnc-dolacz a.pnc-button--light,
html[data-theme="dark"] .pnc-dolacz a.pnc-button--light:visited {
  background: #2563a6 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-dolacz a.pnc-button--light:hover {
  background: #1d4f88 !important;
  color: #ffffff !important;
}


/* Strona główna – sekcja Poradnia Polonijna */
html[data-theme="dark"] .pnc-soft-cta a.pnc-button--secondary,
html[data-theme="dark"] .pnc-soft-cta a.pnc-button--secondary:visited {
  background: #243b5a !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #6ea8e8 !important;
}

html[data-theme="dark"] .pnc-soft-cta a.pnc-button--secondary:hover {
  background: #1d4f88 !important;
  color: #ffffff !important;
}

/* Strona główna – przyciski Więcej w Dark Mode */
html[data-theme="dark"] .pnc-home-card .pnc-button--small {
    background: #2563a6;
    color: #ffffff;
    border: 1px solid #60a5fa;
}

html[data-theme="dark"] .pnc-home-card .pnc-button--small:hover {
    background: #1d4f88;
    color: #ffffff;
}

/* Strona główna – przyciski Więcej */
html[data-theme="dark"] .pnc-home-card a.pnc-button--small,
html[data-theme="dark"] .pnc-home-card a.pnc-button--small:visited {
    background: #2563a6 !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-home-card a.pnc-button--small:hover {
    background: #1d4f88 !important;
    color: #ffffff !important;
}

/* Panel administracyjny – Zakresy dostępu */
html[data-theme="dark"] .pnc-permission-guide {
    background: #243449 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #405875 !important;
}

html[data-theme="dark"] .pnc-permission-guide h2,
html[data-theme="dark"] .pnc-permission-guide li strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] .pnc-permission-guide li span {
    color: #dbeafe !important;
    -webkit-text-fill-color: #dbeafe !important;
}

html[data-theme="dark"] .pnc-permission-guide .pnc-eyebrow {
    color: #7dd3fc !important;
}

/* Dark Mode – główne przyciski w panelu */
html[data-theme="dark"] .pnc-invite-panel .pnc-button,
html[data-theme="dark"] .pnc-panel-content .pnc-button:not(.pnc-button--secondary):not(.pnc-button--ghost) {
    background: #2563a6 !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-invite-panel .pnc-button:hover,
html[data-theme="dark"] .pnc-panel-content .pnc-button:not(.pnc-button--secondary):not(.pnc-button--ghost):hover {
    background: #1d4f88 !important;
    color: #ffffff !important;
}


/* Dark Mode – zaznaczona rola administratora */
html[data-theme="dark"] .pnc-access-level {
    background: #243449 !important;
    color: #ffffff !important;
    border: 1px solid #405875 !important;
}

html[data-theme="dark"] .pnc-access-level:has(input:checked),
html[data-theme="dark"] .pnc-access-level:focus-within {
    background: #1d4f88 !important;
    border-color: #60a5fa !important;
}

html[data-theme="dark"] .pnc-access-level strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] .pnc-access-level small {
    color: #dbeafe !important;
    -webkit-text-fill-color: #dbeafe !important;
}

/* Panel – poprawa układu opisów ról */
html[data-theme="dark"] .pnc-permission-guide ol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 0;
    list-style: none;
}

html[data-theme="dark"] .pnc-permission-guide li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
    width: 100%;
}

html[data-theme="dark"] .pnc-permission-guide li strong {
    grid-column: 2;
    grid-row: 1;
}

html[data-theme="dark"] .pnc-permission-guide li span {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    max-width: none;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.5;
}

/* Panel – wyrównanie numerów 1, 2, 3, 4 */
html[data-theme="dark"] .pnc-permission-guide ol {
    list-style: none;
    counter-reset: roles;
    padding: 0;
}

html[data-theme="dark"] .pnc-permission-guide li {
    counter-increment: roles;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 5px;
    align-items: center;
    position: relative;
    padding: 4px 0;
}

html[data-theme="dark"] .pnc-permission-guide li::before {
    content: counter(roles);
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #70bfff;
    color: #102033;
    font-weight: 700;
    font-size: 12px;
}

html[data-theme="dark"] .pnc-permission-guide li strong {
    grid-column: 2;
    grid-row: 1;
}

html[data-theme="dark"] .pnc-permission-guide li span {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
}

/* Większe numery i nazwy ról */
html[data-theme="dark"] .pnc-permission-guide li {
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
}

html[data-theme="dark"] .pnc-permission-guide li::before {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

html[data-theme="dark"] .pnc-permission-guide li strong {
    font-size: 15px;
}

html[data-theme="dark"] .pnc-permission-guide li span {
    font-size: 13px;
    line-height: 1.5;
}


/* Panel – status Aktywne w Dark Mode */
html[data-theme="dark"] .pnc-team-section .pnc-status--published {
    background: #164e3b !important;
    color: #d1fae5 !important;
    -webkit-text-fill-color: #d1fae5 !important;
    border: 1px solid #34d399 !important;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 600;
}

/* Panel – status Szkic */
html[data-theme="dark"] .pnc-status--draft {
    background: #3f3426 !important;
    color: #fde68a !important;
    -webkit-text-fill-color: #fde68a !important;
    border: 1px solid #d6a54b !important;
}

/* Panel – status Publiczny / Opublikowany */
html[data-theme="dark"] .pnc-status--published {
    background: #164e3b !important;
    color: #d1fae5 !important;
    -webkit-text-fill-color: #d1fae5 !important;
    border: 1px solid #34d399 !important;
}

/* Panel – status widoczności Publiczny */
html[data-theme="dark"] .pnc-status--public {
    background: #164e3b !important;
    color: #d1fae5 !important;
    border: 1px solid #34d399 !important;
}


/* Dark Mode – status Publiczny */
html[data-theme="dark"] .pnc-badge--public {
    background: #164e3b !important;
    background-image: none !important;
    color: #d1fae5 !important;
    -webkit-text-fill-color: #d1fae5 !important;
    border: 1px solid #34d399 !important;
    border-radius: 999px;
    font-weight: 600;
}

/* Zakresy dostępu – poprawny układ w obu motywach */
.pnc-permission-guide ol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 0;
    list-style: none;
}

.pnc-permission-guide li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    width: 100%;
}

.pnc-permission-guide li strong {
    grid-column: 2;
    grid-row: 1;
}

.pnc-permission-guide li span {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    max-width: none;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.5;
}

/* ===================================
   DARK MODE – SZCZEGÓŁY MATERIAŁU
   =================================== */

/* Górna sekcja materiału */
html[data-theme="dark"] .pnc-material-hero {
    background: #243449 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #405875 !important;
}

/* Tytuł i opisy */
html[data-theme="dark"] .pnc-material-hero h1 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] .pnc-material-hero p,
html[data-theme="dark"] .pnc-material-hero .pnc-lead {
    color: #dbeafe !important;
}

/* Nawigacja Strona główna / Materiały */
html[data-theme="dark"] .pnc-material-hero .pnc-card-meta a {
    color: #93c5fd !important;
}

/* Spis treści */
html[data-theme="dark"] .pnc-toc,
html[data-theme="dark"] .pnc-toc-mobile {
    background: #243449 !important;
    color: #ffffff !important;
    border: 1px solid #405875 !important;
}

/* Nagłówek spisu treści */
html[data-theme="dark"] .pnc-toc .pnc-eyebrow {
    color: #7dd3fc !important;
}

/* Linki spisu treści */
html[data-theme="dark"] .pnc-toc a,
html[data-theme="dark"] .pnc-toc-mobile a {
    color: #dbeafe !important;
    -webkit-text-fill-color: #dbeafe !important;
}

html[data-theme="dark"] .pnc-toc a:hover,
html[data-theme="dark"] .pnc-toc-mobile a:hover {
    color: #ffffff !important;
}

/* Mobilny nagłówek spisu treści */
html[data-theme="dark"] .pnc-toc-mobile summary {
    color: #ffffff !important;
}

/* Dark Mode – przycisk Wróć do materiałów */
html[data-theme="dark"] .pnc-prose .pnc-button--secondary,
html[data-theme="dark"] .pnc-prose .pnc-button--secondary:visited {
    background: #2563a6 !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-prose .pnc-button--secondary:hover {
    background: #1d4f88 !important;
    color: #ffffff !important;
}


/* Dark Mode – przycisk Pobierz plik */
html[data-theme="dark"] .pnc-prose a.pnc-button:not(.pnc-button--secondary),
html[data-theme="dark"] .pnc-prose a.pnc-button:not(.pnc-button--secondary):visited {
    background: #2563a6 !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-prose a.pnc-button:not(.pnc-button--secondary):hover {
    background: #1d4f88 !important;
}

/* Czytelny komunikat błędu logowania – Dark Mode */
[data-theme="dark"] .pnc-login-error {
    background-color: #f8e7e7;
    color: #751616;
    border: 1px solid #d99a9a;
    border-radius: 10px;
    padding: 14px 16px;
    font-weight: 600;
    line-height: 1.5;
}

[data-theme="dark"] .pnc-login-error,
[data-theme="dark"] .pnc-login-error * {
    color: #751616;
}


/* Wspólny przycisk powrotu do listy gier */

.game-back-link {
    position: fixed;
    top: 145px;
    right: 24px;
    z-index: 1000;
    display: inline-block;
    padding: 10px 16px;
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #60a5fa;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.game-back-link:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.game-back-link:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .game-back-link {
        top: 135px;
        right: 12px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Zaloguj się do Polski – przycisk start w trybie ciemnym */

html[data-theme="dark"] .pnc-game-start {
    background: #2563a6 !important;
    color: #ffffff !important;
    border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .pnc-game-start:hover {
    background: #1d4f86 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .pnc-game-start:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}



/* ==========================================
   ZALOGUJ SIĘ DO POLSKI – DARK MODE
   Poprawa czytelności pytań
========================================== */

/* Jasna karta pytania */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card {
  background: #f0f7fc;
  border: 1px solid #b8d3e8;
  color: #17324d;
}

/* Etykieta pytania */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-label] {
  color: #245b85;
}

/* Główne pytanie */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-text] {
  color: #17324d;
  -webkit-text-fill-color: #17324d;
}

/* Przykładowa odpowiedź */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-hint] {
  color: #39546b;
  -webkit-text-fill-color: #39546b;
}

/* Przycisk losowania innego pytania */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-new-question] {
  color: #174e7a;
}

/* ==========================================
   ZALOGUJ SIĘ DO POLSKI – DARK MODE
   Poprawa kontrastu przycisków
========================================== */

html[data-theme="dark"] .pnc-game-dialog > .pnc-button,
html[data-theme="dark"] .pnc-game-dialog > form > .pnc-button {
  background: #175a98 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #73b7ed !important;
  font-weight: 700;
}

html[data-theme="dark"] .pnc-game-dialog > .pnc-button:hover,
html[data-theme="dark"] .pnc-game-dialog > form > .pnc-button:hover {
  background: #2474b5 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .pnc-game-dialog > .pnc-button:focus-visible,
html[data-theme="dark"] .pnc-game-dialog > form > .pnc-button:focus-visible {
  outline: 3px solid #a8dbff;
  outline-offset: 3px;
}

/* ZALOGUJ SIĘ DO POLSKI – ciemna karta pytania */

html[data-theme="dark"] .pnc-event-dialog .pnc-question-card {
  background: #34465e !important;
  border: 1px solid #627b98 !important;
  color: #ffffff !important;
}

/* Etykieta */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-label] {
  color: #a8dbff !important;
}

/* Treść pytania */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-text] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Podpowiedź i przykładowa odpowiedź */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-question-hint] {
  color: #d3e0ee !important;
  -webkit-text-fill-color: #d3e0ee !important;
}

/* Wylosuj inne pytanie */
html[data-theme="dark"] .pnc-event-dialog .pnc-question-card [data-new-question] {
  color: #a8dbff !important;
  -webkit-text-fill-color: #a8dbff !important;
}

/* POLSKA W PIGUŁCE – Quiz w Dark Mode */

html[data-theme="dark"] .pnc-prose .pnc-locked {
    background: #243449 !important;
    background-image: none !important;
    color: #f4f7fb !important;
    border: 1px solid #52708d !important;
    border-radius: 12px;
}

html[data-theme="dark"] .pnc-prose .pnc-locked h3,
html[data-theme="dark"] .pnc-prose .pnc-locked p,
html[data-theme="dark"] .pnc-prose .pnc-locked strong {
    color: #f4f7fb !important;
    -webkit-text-fill-color: #f4f7fb !important;
}

html[data-theme="dark"] .pnc-prose .pnc-locked .pnc-eyebrow {
    color: #8bd8ff !important;
    -webkit-text-fill-color: #8bd8ff !important;
}
/* Strefa nauczyciela – przyciski w trybie ciemnym */
html[data-theme="dark"] .pnc-teacher-games .pnc-button {
    background: #2563a6 !important;
    color: #ffffff !important;
    border: 1px solid #60a5fa !important;
    border-radius: 8px;
    font-weight: 700;
}

html[data-theme="dark"] .pnc-teacher-games .pnc-button:hover {
    background: #347fc2 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .pnc-teacher-games .pnc-button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}