/* ============================================================
   urzadzenie.css — design system strony urządzenia (CPT urzadzenie)
   Przeniesione z mockupu kuchnia-eugeniusza (E3). Patterny używają
   tych klas (.screen, .eu-stage, .section-title, .step-list itd.).
   ============================================================ */

  /* ============================================
     BOTANICAL PLAYGROUND — Kuchnia Eugeniusza
     ============================================ */

  :root {
    /* === OFICJALNY BRAND NPZ === */
    --bg-base:      #FFFFFF;
    --bg-paper:     #FFFFFF;
    --bg-warm:      #F2FAEA;
    --ink-deep:     #1D1932;        /* granat NPZ — tekst */
    --ink-medium:   #4A4658;
    --ink-soft:     #8A8794;
    --border:       #EAE8EF;

    /* Zielenie NPZ */
    --eu-green:     #68B42D;
    --eu-green-dark:#4F8A22;
    --eu-green-soft:#EBF7DD;
    --green-light:  #9FE34A;
    --green-muted:  #61993B;
    --green-deep:   #34611A;        /* tła dużych ciemnych bloków */

    /* Różowe NPZ */
    --pink:         #DD19B2;
    --pink-dark:    #C80E92;
    --pink-violet:  #9D5391;
    --magenta:      #910F66;

    /* Akcenty sekcji — z palety NPZ (zielenie + różowe) */
    --accent-czesc:    #68B42D;
    --accent-bawic:    #DD19B2;
    --accent-dzieje:   #61993B;
    --accent-daje:     #9D5391;
    --accent-pomysly:  #910F66;
    --accent-plecak:   #4F8A22;

    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(29, 25, 50, 0.05), 0 8px 32px rgba(29, 25, 50, 0.05);
    --shadow-card: 0 4px 16px rgba(29, 25, 50, 0.07), 0 16px 48px rgba(29, 25, 50, 0.09);
    --shadow-pop:  0 12px 36px rgba(29, 25, 50, 0.13), 0 32px 80px rgba(29, 25, 50, 0.15);

    /* Fonts */
    --font-display: 'Oswald', system-ui, sans-serif;
    --font-body:    'Montserrat', system-ui, sans-serif;
    --font-hand:    'Caveat', cursive;
    --font-a11y:    'Atkinson Hyperlegible', system-ui, sans-serif;

    /* Spacing scale */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

    /* Radii */
    --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-xl: 40px;
  }

  /* reset zawężony do appki — nie ruszamy paska admina WP */
  .app, .app *, .app *::before, .app *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html { -webkit-text-size-adjust: 100%; }
  body.single-urzadzenie {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-deep);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    min-height: 100vh;
  }

  .app button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  .app img { display: block; max-width: 100%; }

  /* ============================================
     APP SHELL
     ============================================ */

  .app {
    position: fixed; inset: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
  }
  /* offset pod pasek admina WP (zalogowany podgląd) */
  .admin-bar .app { top: 32px; }
  @media screen and (max-width: 782px) {
    .admin-bar .app { top: 46px; }
  }

  /* ============================================
     HEADER (top bar)
     ============================================ */

  .app-header {
    background: var(--bg-paper);
    border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--s-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    z-index: 10;
    position: relative;
  }

  .brand {
    display: flex; align-items: center; gap: var(--s-3);
  }

  .brand-logo {
    height: 36px;
    width: auto;
    display: block;
    flex-shrink: 0;
    /* logo to SVG z osadzonym rastrem (eksport Canva) — Safari mobile rozmywał
       przy skalowaniu. Wymuszamy ostre renderowanie + GPU layer. */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .brand-text { display: none; }
  .brand-text small { display: none; }

  .a11y-controls {
    display: flex; gap: var(--s-2);
    align-items: center;
  }

  .a11y-btn {
    height: 44px;
    padding: 0 var(--s-4);
    border-radius: 999px;
    background: var(--bg-warm);
    color: var(--ink-medium);
    font-size: 14px;
    font-weight: 600;
    display: flex; align-items: center; gap: var(--s-2);
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    text-decoration: none;   /* dla <a> w roli przycisku (link ETR) */
  }
  .a11y-btn:hover { background: var(--eu-green-soft); transform: translateY(-1px); }
  .a11y-btn.active {
    background: var(--eu-green);
    color: white;
    border-color: var(--eu-green-dark);
  }
  .a11y-btn .icon { font-size: 18px; line-height: 1; }
  .a11y-btn img.icon, .a11y-btn .etr-logo-icon { width: 20px; height: 20px; border-radius: 4px; display: block; }
  .a11y-btn .label { display: none; text-transform: uppercase; letter-spacing: 0.03em; }

  @media (min-width: 480px) {
    .a11y-btn .label { display: inline; }
  }

  /* Sound wave animation when audio active */
  .a11y-btn.active.audio .icon { animation: pulse 1.5s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

  /* ============================================
     MAIN STAGE — sliding screens
     ============================================ */

  .app-stage {
    position: relative;
    overflow: hidden;
    background: var(--bg-base);
  }

  .screens {
    position: absolute; inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .screen {
    position: absolute; inset: 0;
    padding: var(--s-5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
  }

  .screen-inner {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: var(--s-8);
  }

  /* ============================================
     EUGENIUSZ STAGE (character + speech bubble)
     ============================================ */

  .eu-stage {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
    padding: var(--s-5) var(--s-3) 0;
  }

  .eu-figure {
    width: 140px;
    flex-shrink: 0;
    position: relative;
    animation: bob 4s ease-in-out infinite;
  }

  @keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }

  .eu-figure img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(29, 25, 50, 0.15));
  }

  .eu-bubble {
    background: var(--bg-paper);
    border: 2px solid var(--ink-deep);
    border-radius: var(--r-md);
    padding: var(--s-4) var(--s-5);
    position: relative;
    font-family: var(--font-display);
    font-weight: 500;
    font-variation-settings: "opsz" 14, "SOFT" 100;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ink-deep);
    box-shadow: 4px 4px 0 var(--ink-deep);
    flex: 1;
    margin-bottom: var(--s-5);
  }

  /* Dymek Eugeniusza — ogonek po lewej.
     T16: poprawiona geometria — biały trójkąt zatrzymuje się na wewnętrznej
     krawędzi obwódki (2px), nie wchodzi w środek dymka. */
  .eu-bubble::before {
    content: '';
    position: absolute;
    left: -10px;          /* zewnętrzna krawędź czarnego trójkąta = zewnętrzna krawędź dymka */
    bottom: 18px;
    width: 0; height: 0;
    border: 10px solid transparent;
    border-right-color: var(--ink-deep);
  }
  .eu-bubble::after {
    content: '';
    position: absolute;
    left: -6px;           /* biały trójkąt dotyka tylko wewnętrznej krawędzi obwódki */
    bottom: 20px;
    width: 0; height: 0;
    border: 8px solid transparent;
    border-right-color: var(--bg-paper);
  }

  /* ============================================
     SECTION CONTENT CARDS
     ============================================ */

  .section-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 6px var(--s-3);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--s-3);
  }

  .screen[data-section="czesc"]    .section-tag { background: rgba(104, 180, 45, 0.18); color: var(--accent-czesc); }
  .screen[data-section="bawic"]    .section-tag { background: rgba(221, 25, 178, 0.18); color: #C80E92; }
  .screen[data-section="dzieje"]   .section-tag { background: rgba(97, 153, 59, 0.18); color: #4F8A22; }
  .screen[data-section="daje"]     .section-tag { background: rgba(157, 83, 145, 0.18); color: #910F66; }
  .screen[data-section="pomysly"]  .section-tag { background: rgba(145, 15, 102, 0.18); color: #910F66; }

  .section-title {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
    font-weight: 700;
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1.0;
    letter-spacing: -0.025em;
    color: var(--ink-deep);
    margin-bottom: var(--s-5); /* T12: większy oddech do leadu (z s-3 12px → s-5 24px) */
  }
  .section-title em {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    color: var(--eu-green-dark);
  }

  .section-lead {
    font-family: var(--font-display);
    font-weight: 400;
    font-variation-settings: "opsz" 18, "SOFT" 100;
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    line-height: 1.5;
    color: var(--ink-medium);
    margin-bottom: var(--s-5);
    max-width: 56ch;
  }
  /* Odstęp tytuł → opis (globalnie, każde urządzenie, każda sekcja).
     .section-title {margin-bottom} jest zerowane przez .app .wp-block-heading{margin:0}
     (specyficzność 0,2,0), więc oddech dajemy tu — selektor 0,3,0 wygrywa niezależnie
     od kolejności w pliku. */
  .app .section-title + .section-lead { margin-top: 15px; }

  /* Step list (for "Jak się bawić") */
  .step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin: var(--s-5) 0;
  }

  .step-item {
    background: var(--bg-paper);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-4) var(--s-5);
    display: flex;
    align-items: center;
    gap: var(--s-4);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
  }
  .step-item:hover {
    border-color: var(--accent-bawic);
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
  }
  .step-num {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent-bawic);
    color: var(--bg-paper);
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(221, 25, 178, 0.4);
  }
  .step-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink-deep);
    line-height: 1.4;
  }

  /* ETR alternative text */
  .etr-version { display: none; }
  body.etr-active .normal-version { display: none; }
  body.etr-active .etr-version { display: block; }

  /* Info cards (for "Co to daje", "Co tu się dzieje") */
  .info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    margin: var(--s-5) 0;
  }
  @media (min-width: 600px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
  }

  .info-card {
    background: var(--bg-paper);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-5);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
  }
  .info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--card-accent, var(--eu-green));
  }
  .info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--card-accent, var(--eu-green));
  }
  .info-icon {
    font-size: 32px;
    margin-bottom: var(--s-3);
    display: block;
  }
  .info-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-variation-settings: "opsz" 24, "SOFT" 70;
    font-size: 19px;
    color: var(--ink-deep);
    margin-bottom: var(--s-2);
    line-height: 1.2;
  }
  .info-body {
    font-size: 14px;
    color: var(--ink-medium);
    line-height: 1.55;
  }

  /* History note ("Co tu się dzieje" - storytelling) */
  .story-block {
    background: linear-gradient(135deg, rgba(97, 153, 59, 0.08), rgba(123, 185, 214, 0.04));
    border-left: 4px solid var(--accent-dzieje);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6);
    margin: var(--s-5) 0;
    position: relative;
  }
  .story-block .pull {
    font-family: var(--font-display);
    font-style: italic;
    font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1;
    font-size: 20px;
    line-height: 1.4;
    color: var(--ink-deep);
    margin-bottom: var(--s-3);
  }
  .story-block .body { color: var(--ink-medium); font-size: 15px; line-height: 1.65; }

  /* Idea chips (Pomysły na więcej) */
  .idea-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    margin: var(--s-5) 0;
  }
  @media (min-width: 500px) {
    .idea-grid { grid-template-columns: 1fr 1fr; }
  }

  .idea-card {
    background: var(--bg-paper);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    position: relative;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1.5px solid var(--border);
    overflow: hidden;
  }
  .idea-card:nth-child(odd) { transform: rotate(-0.5deg); }
  .idea-card:nth-child(even) { transform: rotate(0.5deg); }
  .idea-card:hover {
    transform: translateY(-4px) rotate(0);
    border-color: var(--accent-pomysly);
    box-shadow: var(--shadow-card);
  }
  .idea-card .idea-emoji {
    font-size: 36px;
    margin-bottom: var(--s-3);
    display: block;
  }
  .idea-card .idea-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-variation-settings: "opsz" 24, "SOFT" 80;
    font-size: 18px;
    color: var(--ink-deep);
    margin-bottom: var(--s-1);
  }
  .idea-card .idea-desc {
    font-size: 14px;
    color: var(--ink-medium);
    line-height: 1.5;
  }

  /* Action button */
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px dashed var(--border);
  }

  .btn {
    padding: var(--s-4) var(--s-6);
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 52px;
  }
  .btn-primary {
    background: var(--eu-green);
    color: white;
    box-shadow: 0 4px 12px rgba(104, 180, 45, 0.35);
  }
  .btn-primary:hover {
    background: var(--eu-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(104, 180, 45, 0.45);
  }
  /* .btn-ghost wrapper bez własnego tła — tło ustawiamy TYLKO na .wp-block-button__link
     wewnątrz, inaczej powstaje "podwójny kolor" (zewnętrzny + wewnętrzny ring) */
  .btn-ghost { background: transparent; color: var(--ink-deep); }
  .btn-ghost:hover { background: transparent; }

  .btn .arrow { transition: transform 0.2s ease; }
  .btn:hover .arrow { transform: translateX(3px); }

  /* ============================================
     BOTTOM NAV (mobile)
     ============================================ */

  .app-nav {
    background: var(--bg-paper);
    border-top: 1px solid var(--border);
    padding: var(--s-2) var(--s-2) max(var(--s-2), env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    z-index: 10;
    position: relative;
  }

  .nav-btn {
    flex: 1;
    max-width: 90px;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
  }
  .nav-btn:hover { color: var(--ink-medium); }
  .nav-btn.active {
    color: var(--ink-deep);
  }
  .nav-btn .nav-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: transparent;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 18px;
  }
  .nav-btn.active .nav-icon {
    background: var(--nav-color, var(--eu-green-soft));
    color: var(--nav-color-deep, var(--eu-green-dark));
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 6px 14px rgba(29, 25, 50, 0.12);
  }
  .nav-btn[data-section="czesc"]   { --nav-color: rgba(104, 180, 45, 0.22); --nav-color-deep: var(--eu-green-dark); }
  .nav-btn[data-section="bawic"]   { --nav-color: rgba(221, 25, 178, 0.22); --nav-color-deep: #C80E92; }
  .nav-btn[data-section="dzieje"]  { --nav-color: rgba(97, 153, 59, 0.22); --nav-color-deep: #4F8A22; }
  .nav-btn[data-section="daje"]    { --nav-color: rgba(157, 83, 145, 0.22); --nav-color-deep: #910F66; }
  .nav-btn[data-section="pomysly"] { --nav-color: rgba(145, 15, 102, 0.22); --nav-color-deep: #910F66; }

  .nav-btn .nav-label {
    line-height: 1.2;
    text-align: center;
    transition: opacity 0.2s;
  }

  /* Pozycja „powrót" to link <a> (nie <button>): dociągnij do reszty nav —
     bez podkreślenia, etykieta wersalikami jak pozostałe pozycje menu. */
  .nav-btn--powrot { text-decoration: none; }
  .nav-btn--powrot .nav-label { text-transform: uppercase; }

  /* ============================================
     TRYB „WKRÓTCE" — urządzenie z ekranem zapowiedzi
     (treść w przygotowaniu; głębsze sekcje wyszarzone)
     ============================================ */
  .nav-btn--soon {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
  }
  .nav-btn--soon .nav-soon {
    display: block;
    margin-top: 1px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  /* Plakietka „wkrótce" w ekranie powitalnym — mocny akcent magenta NPZ */
  .hero-soon {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    margin-top: var(--s-3);
    padding: 0.55em 1.15em;
    border-radius: 999px;
    background: var(--magenta);
    color: #fff;
    border: 1px solid var(--magenta);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(145, 15, 102, 0.25);
  }
  .hero-soon-note {
    margin-top: var(--s-3);
    max-width: 46ch;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.5;
  }

  /* ============================================
     PLECAK FAB (floating action button)
     ============================================ */

  .plecak-fab {
    position: fixed;
    right: var(--s-4);
    bottom: 90px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-plecak), #6B5436);
    color: white;
    display: grid; place-items: center;
    box-shadow: var(--shadow-pop);
    z-index: 20;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 28px;
  }
  .plecak-fab:hover {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 16px 48px rgba(79, 138, 34, 0.4);
  }
  .plecak-fab::after {
    content: '5';
    position: absolute;
    top: 2px; right: 2px;
    background: var(--accent-pomysly);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: grid; place-items: center;
    border: 2px solid var(--bg-paper);
  }

  /* ============================================
     PLECAK MODAL
     ============================================ */

  .plecak-modal {
    position: fixed; inset: 0;
    background: rgba(31, 53, 38, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 30;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .plecak-modal.open { opacity: 1; pointer-events: auto; }

  .plecak-sheet {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    background: var(--bg-paper);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: var(--s-5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow-y: auto;
    box-shadow: 0 -20px 60px rgba(31, 53, 38, 0.25);
  }
  .plecak-modal.open .plecak-sheet { transform: translateY(0); }

  .plecak-grip {
    width: 48px; height: 5px;
    background: var(--border);
    border-radius: 999px;
    margin: 0 auto var(--s-5);
  }

  .plecak-head {
    display: flex; align-items: center; gap: var(--s-3);
    margin-bottom: var(--s-5);
  }
  .plecak-head img { width: 60px; height: auto; flex-shrink: 0; }
  .plecak-head h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-variation-settings: "opsz" 36, "SOFT" 80;
    font-size: 26px;
    line-height: 1.1;
    color: var(--ink-deep);
  }
  .plecak-head small {
    display: block;
    font-family: var(--font-hand);
    font-size: 17px;
    color: var(--accent-plecak);
    margin-top: 2px;
  }
  .plecak-close {
    margin-left: auto;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-warm);
    color: var(--ink-medium);
    display: grid; place-items: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .plecak-close:hover { background: var(--border); }

  .plecak-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
  }

  .plecak-item {
    display: flex;
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-4);
    border-radius: var(--r-md);
    background: var(--bg-base);
    border: 1.5px solid var(--border);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }
  .plecak-item:hover {
    background: var(--bg-warm);
    border-color: var(--accent-plecak);
    transform: translateX(2px);
  }
  .plecak-thumb {
    width: 56px; height: 56px;
    border-radius: var(--r-sm);
    display: grid; place-items: center;
    font-size: 26px;
    flex-shrink: 0;
  }
  .plecak-thumb.pdf  { background: rgba(157, 83, 145, 0.18); color: #910F66; }
  .plecak-thumb.audio { background: rgba(97, 153, 59, 0.18); color: #4F8A22; }
  .plecak-thumb.image { background: rgba(145, 15, 102, 0.18); color: #910F66; }

  .plecak-meta { flex: 1; min-width: 0; }
  .plecak-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-variation-settings: "opsz" 18, "SOFT" 70;
    font-size: 16px;
    color: var(--ink-deep);
    line-height: 1.25;
    margin-bottom: 2px;
  }
  .plecak-info {
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
  }
  .plecak-dl {
    color: var(--accent-plecak);
    font-size: 18px;
    flex-shrink: 0;
  }

  /* ============================================
     DESKTOP LAYOUT
     ============================================ */

  @media (min-width: 1024px) {
    .app {
      grid-template-columns: 280px 1fr;
      grid-template-rows: auto 1fr;
      grid-template-areas:
        "header header"
        "nav    stage";
    }

    .app-header { grid-area: header; }
    .app-stage  { grid-area: stage; padding: var(--s-5); }
    .app-nav    {
      grid-area: nav;
      flex-direction: column;
      justify-content: flex-start;
      gap: var(--s-2);
      padding: var(--s-5) var(--s-4);
      border-top: none;
      border-right: 1px solid var(--border);
    }

    .nav-btn {
      flex: 0 0 auto;
      max-width: 100%;
      width: 100%;
      flex-direction: row;
      justify-content: flex-start;
      padding: var(--s-3) var(--s-4);
      gap: var(--s-3);
      font-size: 14px;
      border-radius: var(--r-md);
    }
    .nav-btn .nav-icon {
      width: 40px; height: 40px;
      font-size: 20px;
    }
    .nav-btn.active .nav-icon {
      transform: scale(1.05);
    }
    .nav-btn.active {
      background: var(--nav-color);
    }

    .screen { padding: var(--s-7); }
    .screen-inner { max-width: 880px; }

    .eu-stage { padding-top: 0; }
    .eu-figure { width: 200px; }
    .eu-bubble { font-size: 20px; padding: var(--s-5) var(--s-6); }

    .plecak-fab {
      bottom: var(--s-5);
      right: var(--s-5);
      width: 68px; height: 68px;
      font-size: 32px;
    }
  }

  /* ============================================
     ANIMATIONS — staggered entry
     ============================================ */

  .screen.active .eu-figure { animation: bob 4s ease-in-out infinite, slideIn 0.6s 0.05s ease-out backwards; }
  .screen.active .eu-bubble { animation: slideIn 0.5s 0.15s ease-out backwards; }
  .screen.active .section-tag { animation: slideIn 0.5s 0.2s ease-out backwards; }
  .screen.active .section-title { animation: slideIn 0.5s 0.25s ease-out backwards; }
  .screen.active .section-lead { animation: slideIn 0.5s 0.3s ease-out backwards; }
  .screen.active .step-item,
  .screen.active .info-card,
  .screen.active .idea-card,
  .screen.active .story-block {
    animation: slideIn 0.5s ease-out backwards;
  }
  .screen.active .step-item:nth-child(1)  { animation-delay: 0.35s; }
  .screen.active .step-item:nth-child(2)  { animation-delay: 0.42s; }
  .screen.active .step-item:nth-child(3)  { animation-delay: 0.49s; }
  .screen.active .step-item:nth-child(4)  { animation-delay: 0.56s; }
  .screen.active .step-item:nth-child(5)  { animation-delay: 0.63s; }
  .screen.active .info-card:nth-child(1)  { animation-delay: 0.35s; }
  .screen.active .info-card:nth-child(2)  { animation-delay: 0.42s; }
  .screen.active .info-card:nth-child(3)  { animation-delay: 0.49s; }
  .screen.active .info-card:nth-child(4)  { animation-delay: 0.56s; }
  .screen.active .idea-card:nth-child(1)  { animation-delay: 0.35s; }
  .screen.active .idea-card:nth-child(2)  { animation-delay: 0.42s; }
  .screen.active .idea-card:nth-child(3)  { animation-delay: 0.49s; }
  .screen.active .idea-card:nth-child(4)  { animation-delay: 0.56s; }

  @keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Hero special intro */
  .hero-cta {
    margin-top: var(--s-6);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
  }

  /* T14: hero-meta w jednej linii na mobile — mniejszy font, mniejsze gapy.
     Domyślnie nowrap; wrap dopiero gdy w naprawdę długich tekstach nie zmieści */
  .hero-meta {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-4);
    padding-top: var(--s-4);
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--ink-soft);
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    line-height: 1.2;
  }
  .hero-meta p, .hero-meta span { display: inline-flex; align-items: center; gap: 4px; margin: 0; white-space: nowrap; flex-shrink: 1; min-width: 0; }
  @media (max-width: 380px) {
    .hero-meta { gap: 6px; font-size: 11px; }
  }

  /* Mobile bottom safe-area */
  @media (max-width: 1023px) {
    .screen { padding-bottom: 100px; }
  }

  /* Custom scrollbar */
  .screen::-webkit-scrollbar,
  .plecak-sheet::-webkit-scrollbar { width: 6px; }
  .screen::-webkit-scrollbar-track,
  .plecak-sheet::-webkit-scrollbar-track { background: transparent; }
  .screen::-webkit-scrollbar-thumb,
  .plecak-sheet::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
  }

  /* Disable transitions on first paint */
  .preload * { transition: none !important; }

  /* ============================================
     EXPANDED CONTENT BLOCKS (v2 rozbudowa)
     ============================================ */

  /* Section helpers */
  .block-label {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: var(--s-6) 0 var(--s-3);
  }
  .block-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* ---- Gallery (zdjęcia urządzenia) ---- */
  /* v2.0: HORIZONTAL CAROUSEL — skaluje się od 5 do 20+ zdjęć bez zmian markup.
     Powód: poprzedni grid auto-fill rozjeżdżał layout (interleaving z step-list).
     Carousel = 1 rząd, scroll-snap, natural touch swipe na mobile. */
  .gallery {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: var(--s-2) !important;
    padding: var(--s-2) var(--s-1) !important;
    margin: var(--s-4) 0 var(--s-5) !important;
    height: 220px !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: thin !important;
    -webkit-overflow-scrolling: touch !important;
    background: linear-gradient(180deg, var(--bg-warm) 0%, transparent 30%, transparent 70%, var(--bg-warm) 100%) !important;
    border-radius: var(--r-md) !important;
  }
  /* Gdy ≤5 zdjęć — przywróć mockup hero+grid (zachowanie design) */
  .gallery:has(.gphoto:nth-child(5)):not(:has(.gphoto:nth-child(6))) {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    height: 320px !important;
    overflow: visible !important;
    background: none !important;
    padding: 0 !important;
  }
  .gallery .gphoto {
    flex: 0 0 200px !important;
    height: 100% !important;
    scroll-snap-align: start !important;
  }
  /* Reset flex constraints gdy mockup grid (≤5 zdjęć) */
  .gallery:has(.gphoto:nth-child(5)):not(:has(.gphoto:nth-child(6))) .gphoto {
    flex: unset !important;
    height: auto !important;
  }
  .gallery .gphoto {
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--eu-green-soft), var(--bg-warm));
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: grid;
    place-items: center;
    color: var(--ink-medium);
    font-family: var(--font-display);
    font-style: italic;
    text-align: center;
    padding: var(--s-3);
    border: 1.5px dashed var(--border);
  }
  .gallery .gphoto:hover { transform: scale(1.02); box-shadow: var(--shadow-soft); }
  .gallery .gphoto .gphoto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--r-md);
  }
  /* Gdy slot ma <img>, zignoruj fallback-gradient/padding/border (radialne warianty per nth-child) */
  .gallery .gphoto:has(.gphoto-img) {
    background: none;
    padding: 0;
    border: 0;
  }
  .gallery .gphoto:nth-child(1) {
    grid-row: 1 / 3;
    background:
      radial-gradient(circle at 30% 40%, rgba(104, 180, 45, 0.35), transparent 60%),
      radial-gradient(circle at 70% 70%, rgba(79, 138, 34, 0.3), transparent 50%),
      linear-gradient(135deg, #EBF7DD, #D6EFC0);
  }
  .gallery .gphoto:nth-child(2) {
    background:
      radial-gradient(circle at 50% 60%, rgba(221, 25, 178, 0.4), transparent),
      linear-gradient(160deg, #f5d99e, #d9bb7a);
  }
  .gallery .gphoto:nth-child(3) {
    background:
      radial-gradient(circle at 50% 50%, rgba(97, 153, 59, 0.35), transparent),
      linear-gradient(135deg, #FBE0F4, #F3C3E6);
  }
  .gallery .gphoto:nth-child(4) {
    background:
      radial-gradient(circle at 50% 50%, rgba(145, 15, 102, 0.35), transparent),
      linear-gradient(135deg, #FBE0F4, #ECC7E2);
  }
  .gallery .gphoto:nth-child(5) {
    background:
      radial-gradient(circle at 50% 50%, rgba(157, 83, 145, 0.4), transparent),
      linear-gradient(135deg, #FBE0F4, #F0CEE8);
  }
  .gallery .gphoto-caption {
    background: rgba(255, 253, 247, 0.85);
    backdrop-filter: blur(4px);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm);
    font-size: 12px;
    font-family: var(--font-body);
    font-style: normal;
    color: var(--ink-deep);
    font-weight: 600;
    line-height: 1.3;
  }
  .gallery .gphoto-tag {
    position: absolute;
    top: var(--s-2); left: var(--s-2);
    background: var(--ink-deep);
    color: var(--bg-paper);
    font-size: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px var(--s-2);
    border-radius: 999px;
    text-transform: uppercase;
  }

  /* Ukryj sekcję wideo gdy to tylko placeholder (.video-card bez realnego YT).
     Urządzenia z filmem mają .yt-wrap (osobny render). Bez filmu — chowamy
     placeholder + jego label „🎬 Wideo instruktażowe". */
  .video-card { display: none !important; }
  .block-label:has(+ .video-card) { display: none !important; }

  /* ---- Video player placeholder (style zachowane gdyby kiedyś wrocic) ---- */
  .video-card--legacy {
    background: var(--ink-deep);
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    margin: var(--s-4) auto var(--s-5);
    max-width: 720px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-card);
  }
  .video-card:hover { transform: translateY(-2px); }
  .video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 30% 30%, rgba(104, 180, 45, 0.4), transparent 60%),
      radial-gradient(circle at 70% 70%, rgba(221, 25, 178, 0.3), transparent 50%),
      linear-gradient(135deg, #2F4D33, #1D1932);
  }
  .video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255, 253, 247, 0.95);
    display: grid;
    place-items: center;
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
    transition: all 0.25s ease;
    z-index: 2;
  }
  .video-card:hover .video-play {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--eu-green);
  }
  .video-play::before {
    content: '';
    width: 0; height: 0;
    border-left: 22px solid var(--ink-deep);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 6px;
    transition: border-left-color 0.25s ease;
  }
  .video-card:hover .video-play::before { border-left-color: white; }
  .video-meta {
    position: absolute;
    bottom: var(--s-4); left: var(--s-4); right: var(--s-4);
    color: var(--bg-paper);
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--s-3);
  }
  .video-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  }
  .video-duration {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 4px var(--s-3);
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .video-tag {
    position: absolute;
    top: var(--s-3); left: var(--s-3);
    background: var(--accent-bawic);
    color: var(--ink-deep);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 5px var(--s-3);
    border-radius: 999px;
    z-index: 2;
    text-transform: uppercase;
  }

  /* ---- Accordion (Dowiedz się więcej) ---- */
  .accordion {
    border-top: 1px dashed var(--border);
    margin-top: var(--s-5);
  }
  .accordion-item {
    border-bottom: 1px dashed var(--border);
  }
  .accordion-trigger {
    width: 100%;
    text-align: left;
    padding: var(--s-4) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    font-family: var(--font-display);
    font-weight: 600;
    font-variation-settings: "opsz" 24, "SOFT" 70;
    font-size: 17px;
    color: var(--ink-deep);
    cursor: pointer;
    transition: color 0.2s ease;
  }
  .accordion-trigger:hover { color: var(--eu-green-dark); }
  .accordion-trigger::after {
    content: '+';
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-warm);
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 400;
    color: var(--ink-medium);
    flex-shrink: 0;
    transition: all 0.25s ease;
  }
  .accordion-item.open .accordion-trigger::after {
    content: '−';
    background: var(--eu-green);
    color: white;
    transform: rotate(180deg);
  }
  .accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
  }
  .accordion-item.open .accordion-body {
    max-height: 800px;
    padding-bottom: var(--s-5);
  }
  .accordion-body p {
    color: var(--ink-medium);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: var(--s-3);
  }
  .accordion-body p:last-child { margin-bottom: 0; }
  .accordion-body strong { color: var(--ink-deep); font-weight: 600; }

  /* ---- Expandable info card (Co to daje — klikalne) ---- */
  .info-card.expandable { cursor: pointer; }
  .info-card.expandable::after {
    content: 'Czytaj więcej →';
    display: block;
    margin-top: var(--s-3);
    font-size: 13px;
    font-weight: 700;
    color: var(--card-accent, var(--eu-green-dark));
    letter-spacing: 0.02em;
  }

  /* ---- Generic details modal ---- */
  .details-modal {
    position: fixed; inset: 0;
    background: rgba(31, 53, 38, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .details-modal.open { opacity: 1; pointer-events: auto; }

  .details-sheet {
    background: var(--bg-paper);
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    border-radius: var(--r-lg);
    padding: var(--s-6);
    overflow-y: auto;
    box-shadow: var(--shadow-pop);
    position: relative;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .details-modal.open .details-sheet { transform: scale(1); }

  .details-close {
    position: absolute;
    top: var(--s-4); right: var(--s-4);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-warm);
    color: var(--ink-medium);
    display: grid; place-items: center;
    font-size: 20px;
    font-weight: 700;
    z-index: 2;
  }
  .details-close:hover { background: var(--border); }

  .details-icon {
    font-size: 44px;
    margin-bottom: var(--s-3);
  }
  .details-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-variation-settings: "opsz" 36, "SOFT" 80;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.15;
    color: var(--ink-deep);
    margin-bottom: var(--s-4);
    max-width: 90%;
  }
  .details-body p {
    color: var(--ink-medium);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: var(--s-3);
  }
  .details-body strong { color: var(--ink-deep); font-weight: 600; }
  .details-body h4 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: var(--ink-deep);
    margin: var(--s-5) 0 var(--s-2);
  }
  .details-body ul {
    list-style: none;
    padding: 0;
    margin: var(--s-3) 0;
  }
  .details-body ul li {
    padding: var(--s-2) 0 var(--s-2) var(--s-5);
    position: relative;
    color: var(--ink-medium);
    font-size: 15px;
    line-height: 1.55;
  }
  .details-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--eu-green);
    font-weight: 800;
  }
  .details-body blockquote {
    border-left: 3px solid var(--accent-dzieje);
    padding: var(--s-2) var(--s-4);
    margin: var(--s-4) 0;
    background: rgba(97, 153, 59, 0.06);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
    color: var(--ink-deep);
  }
  .details-body blockquote cite {
    display: block;
    margin-top: var(--s-2);
    font-style: normal;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
  }
  .details-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--s-3);
    margin: var(--s-4) 0;
  }
  .details-meta-item {
    background: var(--bg-warm);
    border-radius: var(--r-sm);
    padding: var(--s-3);
    text-align: center;
  }
  .details-meta-item .v {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink-deep);
    display: block;
    margin-bottom: 2px;
  }
  .details-meta-item .l {
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* ---- Step enhancements ---- */
  .step-item.has-detail .step-text { padding-right: var(--s-4); }
  .step-item .step-tip {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
  }

  /* ---- Story-block enhancements ---- */
  .story-paragraph {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-medium);
    margin-bottom: var(--s-3);
  }
  .story-paragraph:last-child { margin-bottom: 0; }
  .story-paragraph strong { color: var(--ink-deep); font-weight: 600; }

  /* ---- Schemat / illustration block ---- */
  .schemat-card {
    background: var(--bg-paper);
    border: 1.5px dashed var(--accent-dzieje);
    border-radius: var(--r-md);
    padding: var(--s-5);
    margin: var(--s-4) 0;
    display: flex;
    align-items: center;
    gap: var(--s-4);
  }
  .schemat-visual {
    width: 100px;
    height: 100px;
    border-radius: var(--r-sm);
    background:
      radial-gradient(circle at 30% 30%, rgba(97, 153, 59, 0.4), transparent),
      linear-gradient(135deg, #EBF7DD, #F3C3E6);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 36px;
  }
  .schemat-text {
    flex: 1;
  }
  .schemat-text h4 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--ink-deep);
    margin-bottom: 4px;
  }
  .schemat-text p {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.5;
  }
  /* Wariant z prawdziwym zdjęciem (np. Maria Montessori) zamiast emoji */
  .schemat-card--photo { align-items: flex-start; }
  .schemat-card--photo .schemat-visual {
    width: 200px;
    height: 150px;
    background: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
  }
  .schemat-card--photo .schemat-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--r-sm);
  }
  @media (max-width: 600px) {
    .schemat-card--photo { flex-direction: column; }
    /* mobile: pełna szerokość, wysokość auto + object-fit:contain —
       ilustracje historyczne (np. panorama Galileusza) nie mogą być przycięte */
    .schemat-card--photo .schemat-visual {
      width: 100%;
      height: auto;
      aspect-ratio: auto;
      background: var(--bg-warm);
    }
    .schemat-card--photo .schemat-visual img {
      height: auto;
      max-height: 70vh;
      object-fit: contain;
    }
  }

  /* ---- Klik = powiększenie (lightbox z urzadzenie.js) ----
     Ilustracja treści jest klikalna: kursor zoom + trwała lupka w rogu.
     Lupka widoczna także bez hovera - użytkownik QR jest na telefonie (brak kursora). */
  .schemat-card--photo .schemat-visual {
    position: relative;
    cursor: zoom-in;
  }
  .schemat-card--photo .schemat-visual::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: rgba(15, 12, 28, 0.55);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 15px 15px;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }
  .schemat-card--photo .schemat-visual:hover::after,
  .schemat-card--photo .schemat-visual:focus-within::after {
    opacity: 1;
    transform: scale(1.08);
  }
  .schemat-card--photo .schemat-visual:focus-visible {
    outline: 2px solid var(--accent-dzieje);
    outline-offset: 3px;
  }
  .schemat-card--photo .schemat-visual img {
    transition: transform 0.25s ease;
  }
  .schemat-card--photo .schemat-visual:hover img {
    transform: scale(1.04);
  }

  /* ---- YouTube embed (v4: mobile-only — desktop ukryty z powodu grid `.app` konflikt) ---- */
  /* Desktop: ukrywamy film + label + caption. Mobile: pełen render. */
  .block-label:has(+ .yt-wrap),
  .yt-wrap,
  .yt-caption {
    display: none !important;
  }
  @media (max-width: 768px) {
    .block-label:has(+ .yt-wrap) { display: block !important; }
    .yt-wrap {
      display: block !important;
      position: relative !important;
      width: 100% !important;
      max-width: 100% !important;
      margin: var(--s-4) 0 var(--s-2) !important;
      aspect-ratio: 16/9 !important;
      background: #000 !important;
      border-radius: var(--r-md) !important;
      overflow: hidden !important;
      box-shadow: var(--shadow-card) !important;
    }
    .yt-wrap iframe {
      position: absolute !important;
      inset: 0 !important;
      width: 100% !important;
      height: 100% !important;
      border: 0 !important;
    }
    .yt-caption {
      display: flex !important;
      justify-content: space-between;
      align-items: center;
      gap: var(--s-3);
      font-size: 12px;
      color: var(--ink-soft);
      margin: 0 0 var(--s-5);
    }
    .yt-caption-title {
      font-family: var(--font-display);
      font-weight: 600;
      color: var(--ink-deep);
      font-size: 13px;
    }
    .yt-caption-tag {
      font-weight: 700;
      letter-spacing: 0.06em;
      color: var(--ink-soft);
      font-size: 10px;
    }
  }

  /* ---- Video embed (YouTube iframe) — modifier dla .video-card ----
     UWAGA: .video-card ma aspect-ratio + position:relative, ale przez WP
     `display:contents` na inner-container rozsypuje to. Dlatego embed
     reset'uje wymiary card'a i sam trzyma proporcje. */
  .video-card--embed {
    background: transparent;
    cursor: default;
    aspect-ratio: auto;
    height: auto;
    box-shadow: none;
    overflow: visible;
  }
  .video-card--embed::before { display: none; }
  .video-card--embed .video-play { display: none; }
  .video-card--embed:hover { transform: none; }
  .video-card--embed .video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
  .video-card--embed .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }
  .video-card--embed .video-meta {
    position: static;
    background: none;
    padding: var(--s-2) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
  }
  .video-card--embed .video-meta .video-title {
    color: var(--ink-deep);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
  }
  .video-card--embed .video-meta .video-tag {
    /* reset wszystkiego z bazowej .video-tag (absolute, pink chip) */
    position: static;
    top: auto; left: auto; right: auto; bottom: auto;
    background: none;
    padding: 0;
    border-radius: 0;
    z-index: auto;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
  }

  /* ---- Idea card expandable ---- */
  .idea-card { cursor: pointer; }
  .idea-card .idea-cta {
    margin-top: var(--s-3);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-pomysly);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* ---- Plecak group headers ---- */
  .plecak-group {
    margin-top: var(--s-4);
    margin-bottom: var(--s-2);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-left: var(--s-2);
  }
  .plecak-group:first-child { margin-top: 0; }

  /* Link do pobrania materiału (plecak.py apply wstawia <a class="plecak-dl">) */
  .plecak-name a.plecak-dl {
    color: var(--ink-deep);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1.5px solid currentColor;
    transition: opacity 0.2s ease;
  }
  .plecak-name a.plecak-dl::after {
    content: " ⬇";
    font-size: 0.85em;
    opacity: 0.7;
  }
  .plecak-name a.plecak-dl:hover { opacity: 0.7; }
  /* pozycja z linkiem — cała staje się klikalna na hover */
  .plecak-item:has(a.plecak-dl) { cursor: pointer; }
  .plecak-item:has(a.plecak-dl):hover { background: var(--bg-warm); }

  /* Mobile gallery adjustment */
  @media (max-width: 600px) {
    .gallery {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: auto auto auto;
      height: auto;
    }
    .gallery .gphoto {
      aspect-ratio: 4/3;
    }
    .gallery .gphoto:nth-child(1) {
      grid-column: 1 / 3;
      grid-row: 1;
      aspect-ratio: 16/9;
    }
  }

  /* Desktop gallery a bit taller */
  @media (min-width: 1024px) {
    .gallery { height: 400px; }
  }

  /* ============================================
     MOSTEK WP — bloki Gutenberga ↔ klasy mockupu
     Patterny składane są z bloków core/Kadence; tu
     mapujemy ich realny markup na wygląd z mockupu.
     ============================================ */

  /* grupy nie dokładają własnych marginesów wewnątrz appki */
  .app .wp-block-group { margin: 0; }

  /* KLUCZOWE: wp:group renderuje wrapper .wp-block-group__inner-container,
     przez co grid/flex z klas mockupu (.eu-stage, .gallery, .step-list,
     .info-grid…) nie widzi dzieci. display:contents „rozpuszcza" wrapper —
     dzieci stają się bezpośrednimi dziećmi stylowanej klasy. */
  .app .wp-block-group > .wp-block-group__inner-container { display: contents; }

  /* obraz Eugeniusza — figura bloku image z klasą .eu-figure */
  .app figure.eu-figure { margin: 0; width: 140px; }
  @media (min-width: 1024px) { .app figure.eu-figure { width: 200px; } }

  /* przyciski: pattern używa wp:button z klasą btn + btn-primary/btn-ghost
     na wrapperze .wp-block-button; stylujemy realny link w środku
     T13: nie pełna szerokość — przyciski szersze niż treść, ale nie do krawędzi
     T15: zmniejszone min-height i padding, font 15px */
  .app .wp-block-buttons.hero-cta {
    display: flex; flex-direction: column; gap: var(--s-3);
    align-items: flex-start; /* desktop: wyrównanie do lewej */
  }
  @media (max-width: 768px) {
    /* mobile: wszystkie grupy przycisków w sekcjach wycentrowane */
    .app .wp-block-buttons.hero-cta,
    .app .wp-block-buttons.actions,
    .app .wp-block-buttons { justify-content: center; align-items: center; }
  }
  /* Wrapper .wp-block-button.btn ZNIKA z layoutu (display: contents) — Kadence/core WP
     dodaje do niego biały bg/padding/border który tworzył "podwójną obudowę". */
  .app .wp-block-button.btn {
    display: contents !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* Sam link = przycisk: stała szerokość, wyrównanie kontrolowane przez flex parent (hero-cta) */
  .app .wp-block-button.btn .wp-block-button__link {
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    transition: background 0.18s ease, transform 0.18s ease;
    text-decoration: none;
    border: none;
    width: 280px;                /* obu tej samej szerokości — kontrolujemy na linku */
    max-width: 100%;
    line-height: 1.25;
    box-sizing: border-box;
  }
  .app .wp-block-button.btn-primary .wp-block-button__link {
    background: var(--eu-green);
    color: #fff;
  }
  .app .wp-block-button.btn-primary .wp-block-button__link:hover {
    background: var(--eu-green-dark);
    transform: translateY(-1px);
  }
  .app .wp-block-button.btn-ghost .wp-block-button__link {
    background: var(--eu-green-soft);
    color: var(--ink-deep);
  }
  .app .wp-block-button.btn-ghost .wp-block-button__link:hover {
    background: var(--bg-warm);
    transform: translateY(-1px);
  }

  /* meta hero — grupa flex z akapitami zamiast <span> */
  .app .hero-meta p { margin: 0; display: inline-flex; align-items: center; gap: 6px; }

  /* grupy buttonów: własne marginesy ustawiają klasy .actions / .hero-cta */
  .app .wp-block-buttons { margin: 0; }
  .app .wp-block-buttons.actions {
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
    gap: var(--s-3);
  }

  /* krok: numer + (tekst + tip) — kolumna treści kroku */
  .app .step-item { align-items: flex-start; }
  .app .step-body { flex: 1; }
  .app .step-body .step-text { margin: 0; }

  /* akordeon: nagłówek jako klikalny trigger */
  .app h4.accordion-trigger { cursor: pointer; }

  /* nadpisz domyślne marginesy nagłówków bloków wewnątrz appki */
  .app .wp-block-heading { margin: 0; }

  /* ============================================================
     T17: Modal — szczegóły info-card / idea-card
     ============================================================ */
  .info-card, .idea-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
  }
  .info-card:hover, .idea-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(29, 25, 50, 0.12);
  }
  .info-card:focus-visible, .idea-card:focus-visible {
    outline: 3px solid var(--eu-green, #68B42D);
    outline-offset: 4px;
  }
  /* mini hint that card is expandable (top-right corner) */
  .info-card::after, .idea-card::after {
    content: '+';
    position: absolute;
    top: 12px; right: 12px;
    width: 28px; height: 28px;
    border-radius: 999px;
    background: var(--bg-paper, #fff);
    border: 1.5px solid var(--border, rgba(29,25,50,0.18));
    color: var(--ink-medium, #555);
    font-size: 18px; font-weight: 600; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0.7; transition: opacity 0.2s, transform 0.2s;
  }
  .info-card:hover::after, .idea-card:hover::after { opacity: 1; transform: rotate(45deg); }
  /* hide the default detail div in the card (only shown in modal) */
  .info-card .card-detail, .idea-card .card-detail { display: none; }

  /* Modal itself */
  .card-modal {
    position: fixed; inset: 0;
    z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    padding: var(--s-4, 16px);
  }
  .card-modal.open { display: flex; }
  .card-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(29, 25, 50, 0.65);
    backdrop-filter: blur(4px);
    animation: cardModalFadeIn 0.2s ease;
  }
  .card-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: var(--r-lg, 28px);
    padding: var(--s-7, 48px) var(--s-6, 32px) var(--s-6, 32px);
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(29, 25, 50, 0.35);
    animation: cardModalSlideIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .card-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 999px;
    border: 1.5px solid var(--border, rgba(29,25,50,0.18));
    background: var(--bg-paper, #fff);
    color: var(--ink-deep, #1D1932);
    font-size: 18px; font-weight: 600; line-height: 1;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.18s;
  }
  .card-modal-close:hover { background: var(--ink-deep, #1D1932); color: #fff; transform: rotate(90deg); }
  .card-modal-icon {
    font-size: 56px;
    margin-bottom: var(--s-3, 12px);
    line-height: 1;
  }
  .card-modal-heading {
    font-family: var(--font-display, serif);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.1;
    color: var(--ink-deep, #1D1932);
    margin: 0 0 var(--s-4, 16px);
  }
  .card-modal-body {
    font-family: var(--font-body, sans-serif);
    font-size: 17px; line-height: 1.55;
    color: var(--ink-medium, #555);
    margin: 0 0 var(--s-5, 24px);
  }
  .card-modal-detail {
    font-family: var(--font-body, sans-serif);
    font-size: 15px; line-height: 1.65;
    color: var(--ink-medium, #555);
    border-top: 1px dashed var(--border, rgba(29,25,50,0.18));
    padding-top: var(--s-5, 24px);
  }
  .card-modal-detail p { margin: 0 0 var(--s-3, 12px); }
  .card-modal-detail p:last-child { margin-bottom: 0; }
  .card-modal-detail strong { color: var(--ink-deep, #1D1932); }
  .card-modal-detail ul { padding-left: 1.2em; margin: 0 0 var(--s-3, 12px); }

  /* prevent body scroll when modal open */
  body.modal-open { overflow: hidden; }

  @keyframes cardModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cardModalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Mobile: fullscreen modal */
  @media (max-width: 640px) {
    .card-modal { padding: 0; align-items: stretch; }
    .card-modal-dialog {
      border-radius: 0;
      max-height: 100vh;
      max-width: 100%;
      padding-top: 72px;
    }
  }

  /* ========================================================
     LIGHTBOX galerii (urzadzenie.js → .lb-overlay)
     ======================================================== */
  /* iOS-safe scroll lock: position:fixed + offset (JS ustawia body.style.top).
     Samo overflow:hidden nie blokuje scrolla tła na Safari mobile. */
  body.lb-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
  .lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 12, 28, 0.92);
    backdrop-filter: blur(4px);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .lb-overlay.is-open { display: flex; }
  .lb-stage {
    margin: 0;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .lb-img {
    max-width: 92vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    background: #fff;
  }
  .lb-caption {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body, sans-serif);
    font-size: 14px;
    text-align: center;
    max-width: 80vw;
  }
  .lb-overlay button {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    /* reset odziedziczonego globalnego button {padding:15px 24px; line-height:25.6px}
       — zjadał grid-track do ~1px i wypychał SVG w prawo/dół (krzywe centrowanie) */
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .lb-overlay button:hover,
  .lb-overlay button:focus-visible { background: var(--eu-green, #68B42D); transform: scale(1.08); outline: none; }
  /* ikony SVG — stały rozmiar px (procenty zawodne bez intrinsic size) */
  .lb-overlay button svg { width: 22px; height: 22px; display: block; flex-shrink: 0; }
  .lb-close {
    top: 16px; right: 16px;
    width: 48px; height: 48px;
  }
  .lb-prev, .lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
  }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }
  .lb-prev:focus-visible, .lb-next:focus-visible { transform: translateY(-50%) scale(1.08); }
  .lb-counter {
    position: absolute;
    bottom: 18px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body, sans-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }
  @media (max-width: 600px) {
    .lb-close { width: 44px; height: 44px; top: 10px; right: 10px; }
    .lb-prev, .lb-next { width: 44px; height: 44px; }
    .lb-prev { left: 6px; } .lb-next { right: 6px; }
    .lb-img { max-height: 74vh; }
  }

/* ============================================================
   WCAG AA — kontrast (2026-07-30). Ciemniejsza zieleń #3E6E1B
   (biały tekst 6.09:1, obwódka 6.09:1) dla białych przycisków,
   linków, ikon i obwódek fokusu. Jasna --eu-green #68B42D zostaje
   dla dekoracji/tintów. Szary --ink-soft #8A8794→#6B6580 (5.5:1).
   Nadpisania na końcu pliku wygrywają w kaskadzie.
   ============================================================ */
:root{ --eu-green-strong:#3E6E1B; --ink-soft:#6B6580; }
.btn-primary,
.app .wp-block-button.btn-primary .wp-block-button__link,
.lb-overlay button:focus-visible{ background:var(--eu-green-strong); }
.details-body ul li::before{ color:var(--eu-green-strong); }
.accordion-item.open .accordion-trigger::after{ background:var(--eu-green-strong); }
.info-card:focus-visible,
.idea-card:focus-visible{ outline-color:var(--eu-green-strong); }
.screen[data-section="czesc"] .section-tag{ color:var(--eu-green-strong); }
