/* =============================================================================
   FurrFinder – Mobile & Polish Pack v2 (iOS / Android / iPad / Laptop)
   Ładowany automatycznie przez pwa-mobile.js po style.css.
   ============================================================================= */

/* 1. Naprawa position: sticky na Safari (iOS / iPadOS / macOS) */
body {
  overflow-x: clip !important;
  -webkit-tap-highlight-color: transparent;
}

/* 2. Brak wymuszonego auto-zoomu formularzy na iPhone (iOS Safari wymaga >= 16px) */
@media (max-width: 900px) {
  input, select, textarea,
  .chat-compose input, .chat-compose select, .chat-compose textarea,
  .request-actions input, .request-actions select,
  .data-table select {
    font-size: 16px !important;
  }
}

/* 3. Dynamiczny viewport (dvh) + blokada scroll-chaining na modalach i czacie */
.modal-box,
.modal-box.wide,
.chat-log {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-box.wide { max-height: 90dvh; }
#ff-snack .modal-box { max-height: 92dvh; }
.chat-panel { max-height: min(600px, calc(100dvh - 180px)); }

/* 4. Wyłączamy „przyklejony” :hover na ekranach dotykowych */
@media (hover: none) and (pointer: coarse) {
  .pet-tile:hover,
  .step:hover,
  .snack-card:hover,
  .btn:hover,
  .act:hover,
  .tile-snack:hover,
  .help-card:hover,
  .cat-pill:hover {
    transform: none !important;
  }
  .pet-tile:hover .pet-photo img,
  article.pet-tile:hover .pet-photo img {
    transform: none !important;
  }
}

/* 5. Strefa iPada i mniejszych laptopów (901px – 1140px): menu bez ścisku */
@media (min-width: 901px) and (max-width: 1140px) {
  .nav { padding: .5rem .6rem .5rem 1.1rem; }
  .nav-links { gap: 1.05rem; font-size: .92rem; }
  .nav-actions .btn-small { padding: .55rem .95rem; font-size: .88rem; }
}

/* 6. Dolny pasek nawigacji mobilnej (Bottom Tab Bar) + Safe Area iPhone */
.mobile-tabbar { display: none; }
@media (max-width: 900px) {
  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 75;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(46, 30, 120, 0.12);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 16px 40px -14px rgba(30, 20, 80, 0.35);
  }
  [data-theme="dark"] .mobile-tabbar {
    background: rgba(22, 19, 34, 0.90);
    border-color: rgba(190, 175, 255, 0.14);
    box-shadow: 0 18px 42px -12px rgba(0, 0, 0, 0.78);
  }
  .mtab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
  }
  .mtab svg { width: 22px; height: 22px; fill: currentColor; }
  .mtab.active { color: var(--accent-text); background: rgba(108, 77, 255, 0.12); }
  [data-theme="dark"] .mtab.active { background: rgba(180, 164, 255, 0.16); }

  body.has-mobile-tabbar .chat-fab {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    right: 14px;
  }
  body.has-mobile-tabbar .chat-panel {
    bottom: calc(142px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    max-height: calc(100dvh - 175px - env(safe-area-inset-bottom, 0px));
  }
  body.has-mobile-tabbar .toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.has-mobile-tabbar .site-footer {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }
}
@media print { .mobile-tabbar, .compare-bar { display: none !important; } }

/* 7. Ekran Swipe na małych telefonach: karta + 4 przyciski na jednym ekranie */
@media (max-width: 600px) {
  .swipe-page { padding-top: 1rem; padding-bottom: 1rem; }
  .swipe-intro { margin-bottom: .7rem; }
  .swipe-intro .kicker, .swipe-intro p:not(.kicker) { display: none; }
  .swipe-intro .page-title.small { font-size: 1.45rem; margin: 0; }
  .sw-banner { padding: .55rem .85rem; margin-bottom: .7rem; font-size: .82rem; }
  .swipe-top { margin-bottom: .7rem; }
  .deck { height: clamp(340px, calc(100dvh - 340px), 480px); min-height: 330px; }
  .deck-actions { margin-top: 1rem; gap: .85rem; }
  .act-no, .act-yes { width: 58px; height: 58px; font-size: 1.55rem; }
  .act-super { width: 48px; height: 48px; }
  .act-undo { width: 44px; height: 44px; }
  .deck-hint { display: none; }
}

/* 8. Podkategorie / Szybkie kolekcje (poziomy pasek pigułek nad filtrami) */
.cat-strip {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: .2rem .1rem .8rem;
  margin-bottom: .6rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--ink);
  font: 600 .88rem "Inter", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.cat-pill:hover { transform: translateY(-1px); border-color: var(--blue); }
.cat-pill.on {
  background: linear-gradient(135deg, #6c4dff, #e0245e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(108, 77, 255, 0.75);
}

/* 9. Skeleton Loaders */
@keyframes ff-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel {
  background: linear-gradient(90deg, rgba(108,77,255,.07) 25%, rgba(108,77,255,.15) 50%, rgba(108,77,255,.07) 75%);
  background-size: 200% 100%;
  animation: ff-shimmer 1.4s ease-in-out infinite;
  border-radius: 12px;
}
[data-theme="dark"] .skel {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
.skel-photo { aspect-ratio: 4 / 4.2; border-radius: 0; }
.skel-body { padding: 1.1rem 1.2rem 1.3rem; display: grid; gap: .6rem; }
.skel-line { height: 14px; width: 70%; }
.skel-line.lg { height: 20px; width: 55%; }
.skel-line.sm { height: 12px; width: 85%; }

/* 10. Odznaki kontekstowe na kartach (Nowy / Senior) + przycisk porównania na karcie */
.pet-badges {
  position: absolute;
  bottom: .8rem;
  right: .8rem;
  display: flex;
  gap: .35rem;
}
.mini-tag {
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mini-tag.new { background: rgba(108, 77, 255, 0.90); color: #fff; }
.mini-tag.senior { background: rgba(245, 165, 36, 0.92); color: #1f1400; }

article.pet-tile .chips { padding-right: 102px; }
.tile-compare {
  position: absolute;
  right: 4.15rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line, rgba(46,30,120,.16));
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.tile-compare.on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* 11. Pływający pasek porównywarki + tabela porównawcza */
.compare-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 74;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .6rem .45rem .7rem;
  border-radius: 999px;
  max-width: calc(100vw - 24px);
}
@media (max-width: 900px) {
  body.has-mobile-tabbar .compare-bar {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    transform: none;
  }
}
.compare-thumbs { display: flex; }
.compare-thumbs img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  margin-left: -8px;
}
.compare-thumbs img:first-child { margin-left: 0; }
.compare-label { font-size: .86rem; color: var(--ink); white-space: nowrap; }
.compare-clear {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 14, 16, 0.08);
  color: var(--ink);
  cursor: pointer;
}
[data-theme="dark"] .compare-clear { background: rgba(255, 255, 255, 0.10); }
.cmp-pet { display: grid; justify-items: center; gap: .25rem; text-align: center; min-width: 120px; }
.cmp-pet img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.cmp-table td, .cmp-table th { text-align: center; }
.cmp-table td:first-child, .cmp-table th:first-child { text-align: left; white-space: nowrap; }

/* 12. Pasek Quizu dopasowania w galerii */
.quiz-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .95rem 1.25rem;
  border-radius: 22px;
  margin-bottom: 1rem;
  border: 1px solid rgba(108, 77, 255, 0.22);
  background: linear-gradient(135deg, rgba(108,77,255,.08), rgba(255,61,127,.06));
}
.quiz-bar strong { color: var(--ink); display: block; font-size: 1rem; }
.quiz-bar span { color: var(--muted); font-size: .88rem; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.quiz-opt {
  padding: .85rem .9rem;
  border-radius: 16px;
  border: 1.5px solid var(--line, rgba(46,30,120,.16));
  background: var(--bg);
  color: var(--ink);
  font: 600 .92rem "Inter", sans-serif;
  cursor: pointer;
  text-align: left;
}
.quiz-opt.on {
  border-color: var(--blue);
  background: rgba(108, 77, 255, 0.12);
  color: var(--accent-text);
}
[data-theme="dark"] .quiz-opt { background: #1c192a; }

/* 13. Kalkulator kosztów utrzymania na profilu zwierzaka */
.cost-box {
  margin-top: 1.4rem;
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}
.cost-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: .7rem;
}
.cost-head h3 { margin: 0; }
.cost-total {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-text);
}
.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  margin-bottom: .6rem;
}
.cost-item {
  padding: .65rem .8rem;
  border-radius: 16px;
  background: rgba(108, 77, 255, 0.06);
}
.cost-item span { display: block; font-size: .78rem; color: var(--muted); }
.cost-item strong { font-size: .95rem; color: var(--ink); }
@media (max-width: 600px) { .cost-grid { grid-template-columns: minmax(0, 1fr); } }

/* 14. Generator plakatu / posta FB/IG */
.poster-preview-wrap {
  display: grid;
  place-items: center;
  background: rgba(14, 14, 16, 0.04);
  border-radius: 20px;
  padding: .8rem;
}
[data-theme="dark"] .poster-preview-wrap { background: rgba(255, 255, 255, 0.04); }
.poster-canvas {
  width: min(320px, 100%);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 18px 40px -18px rgba(30, 20, 80, 0.4);
}
.poster-text { width: 100%; font-size: .88rem; line-height: 1.5; }
.poster-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 520px) { .poster-actions, .quiz-options { grid-template-columns: minmax(0, 1fr); } }

/* 15. Miniaturki wielozdjęciowej galerii (pet_media) */
.pet-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}
.thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #e8e8ec;
  cursor: pointer;
}
.thumb-btn.on { border-color: var(--blue); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Okna (np. quiz „Kogo szukasz?”) nigdy nie wychodzą poza ekran: przewijają się w środku (iPad w poziomie, telefony) */
.modal { overflow-y: auto; }
.modal > .modal-box {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
#ff-quiz-form > button[type="submit"] {
  position: sticky;
  bottom: -2rem;
  margin: 0 -2rem -2rem;
  width: calc(100% + 4rem);
  border-radius: 0 0 32px 32px;
  padding-block: 1.05rem;
  box-shadow: 0 -10px 24px rgba(20,14,40,.12);
}
.print-help { display: grid; gap: .8rem; }
.print-help ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* ===== Audyt 5: karta zwierzęcia (równe wysokości, kluczowe informacje, licznik oczekiwania) ===== */
article.pet-tile { display: flex; flex-direction: column; }
article.pet-tile .pet-link { flex: 1; display: flex; flex-direction: column; }
article.pet-tile .pet-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem 1.05rem; }
article.pet-tile .pet-body h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
article.pet-tile .pet-meta, article.pet-tile .pet-place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.tile-compat { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0 0; }
.tc { display: inline-flex; align-items: center; gap: .2rem; padding: .22rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.2; }
.tc.ok  { background: rgba(47,191,143,.13); color: #0f6b4a; }
.tc.no  { background: rgba(224,36,94,.09); color: #a3123f; }
.tc.unk { background: transparent; color: var(--muted); border: 1px dashed rgba(120,115,140,.45); }
.tile-foot { margin: auto 0 0; padding-top: .7rem; min-height: 46px; display: flex; align-items: center; padding-right: 104px; }
.tile-wait { font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tile-wait.long { color: #a2560c; }
.tile-wait.home { color: #0f6b4a; }
article.pet-tile .tile-compare { bottom: 1.05rem; }
article.pet-tile .tile-snack { bottom: 1rem; }
[data-theme="dark"] .tc.ok { color: #5fe0b0; background: rgba(47,191,143,.14); }
[data-theme="dark"] .tc.no { color: #ff8fb1; background: rgba(224,36,94,.14); }
[data-theme="dark"] .tile-wait.long { color: #ffb86b; }
[data-theme="dark"] .tile-wait.home { color: #5fe0b0; }
.match-badge.warn { background: #fff3e6; color: #8a3a00; box-shadow: 0 0 0 1px rgba(200,100,0,.35) inset; }
.match-badge.low { opacity: .9; }
[data-theme="dark"] .match-badge.warn { background: #3a2410; color: #ffc58a; }

/* ===== Audyt 5: profil jak wizytówka ===== */
.key-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1.1rem 0 .9rem; }
.kf { display: grid; justify-items: center; text-align: center; gap: .15rem; padding: .85rem .5rem; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 6px 18px -14px rgba(20,20,40,.35); }
.kf span { font-size: 1.15rem; line-height: 1; }
.kf strong { font-size: 1rem; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.kf small { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 560px) { .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compat { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .9rem; }
.compat li { display: flex; align-items: center; gap: .5rem; font-size: .93rem; color: var(--ink); }
.compat li b { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; }
.compat li.ok b { background: rgba(47,191,143,.16); color: #0f6b4a; }
.compat li.no b { background: rgba(224,36,94,.12); color: #a3123f; }
.compat li.unk { color: var(--muted); }
.compat li.unk b { border: 1.5px solid rgba(120,115,140,.5); color: var(--muted); }
@media (max-width: 520px) { .compat { grid-template-columns: minmax(0, 1fr); } }
[data-theme="dark"] .compat li.ok b { color: #5fe0b0; }
[data-theme="dark"] .compat li.no b { color: #ff8fb1; }

.match-meter { display: grid; gap: .35rem; margin: .4rem 0 .8rem; text-align: left; }
.match-meter > div:first-child { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.mm-num { font: 800 2rem/1 "Plus Jakarta Sans", "Inter", sans-serif; color: #12945f; }
.match-meter small { color: var(--muted); font-size: .82rem; }
.mm-bar { height: 8px; border-radius: 99px; background: rgba(120,115,140,.18); overflow: hidden; }
.mm-bar i { display: block; height: 100%; border-radius: inherit; }
.mm-bar.fit i { background: linear-gradient(90deg, #2fbf8f, #12945f); }
.mm-bar.data i { background: linear-gradient(90deg, #8f6bff, #6c4dff); }
.mm-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: .35rem; }
.mm-row b { color: var(--ink); font-size: .9rem; }
.match-box { text-align: left; }
.match-box li.ok b { background: rgba(47,191,143,.16); color: #0f6b4a; }
.match-box li.mid b { background: rgba(245,165,36,.2); color: #8a5a00; }
.match-box li.no b { background: rgba(120,115,140,.16); color: var(--muted); }
.match-box li.bad b { background: #e0245e; color: #fff; }
.match-box li.unk b { border: 1.5px solid rgba(120,115,140,.5); color: var(--muted); background: transparent; }
.match-box li.unk { color: var(--muted); }
.match-alert { margin: .2rem 0 .6rem; padding: .6rem .8rem; border-radius: 14px; background: #fff3e6; color: #7a3300; font-size: .9rem; font-weight: 600; }
[data-theme="dark"] .match-alert { background: #3a2410; color: #ffc58a; }
[data-theme="dark"] .mm-num { color: #5fe0b0; }

details.fold { border-radius: 22px; margin: 0 0 .8rem; padding: 0; overflow: hidden; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem 1.15rem; font-weight: 700; color: var(--ink); min-height: 48px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary em { font-style: normal; font-weight: 600; font-size: .88rem; color: var(--muted); text-align: right; }
details.fold > summary::after { content: "▾"; color: var(--muted); transition: transform .2s ease; flex: none; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > :not(summary) { padding: 0 1.15rem 1.1rem; }
details.fold .health { display: flex; flex-wrap: wrap; gap: .45rem; }

.calc { display: grid; gap: .75rem; }
.calc-row { display: grid; grid-template-columns: 1fr auto; gap: .25rem .8rem; align-items: center; font-size: .9rem; color: var(--ink); }
.calc-row b { font-size: .92rem; }
.calc-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: #6c4dff; height: 28px; margin: 0; }
.calc-sum { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding-top: .6rem; border-top: 1px solid rgba(120,115,140,.2); }
.calc-sum small { display: block; color: var(--muted); font-size: .8rem; }
.calc-sum strong { font: 800 1.5rem/1.15 "Plus Jakarta Sans", "Inter", sans-serif; color: var(--ink); }
.calc-sum div:first-child strong { color: #12945f; }
[data-theme="dark"] .calc-sum div:first-child strong { color: #5fe0b0; }
.calc-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.calc-bar i { flex: 1 1 0; min-width: 0; }
.calc-bar i:nth-child(1) { background: #6c4dff; }
.calc-bar i:nth-child(2) { background: #e0245e; }
.calc-bar i:nth-child(3) { background: #2fbf8f; }
.calc-bar i:nth-child(4) { background: #f5a524; }
.needs .need:last-child:nth-child(odd) { grid-column: 1 / -1; }
.profile-info .match-box { margin-top: 1rem; }

/* ===== Audyt 5: strona główna – kolekcje tematyczne i „Chcę pomóc” ===== */
.hero-help { margin: .9rem 0 0; font-size: .95rem; }
.hero-help a { color: var(--accent-text, #5a3be0); font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.anchor-target { display: block; position: relative; top: -110px; height: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.theme-tile { position: relative; display: grid; align-content: end; gap: .15rem; min-height: 190px; padding: 1.1rem 1.2rem; border-radius: 26px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 10px 30px -20px rgba(20,20,40,.4); transition: transform .2s ease, box-shadow .2s ease; isolation: isolate; }
.theme-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.theme-tile .tt-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; z-index: -2; }
.theme-tile.has-photo { color: #fff; }
.theme-tile.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,8,20,0) 25%, rgba(10,8,20,.78) 100%); }
.tt-ic { position: absolute; top: .9rem; left: .9rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; font-size: 1.3rem; background: rgba(255,255,255,.88); box-shadow: 0 6px 16px -8px rgba(0,0,0,.4); }
.theme-tile strong { font: 800 1.2rem/1.2 "Plus Jakarta Sans", "Inter", sans-serif; }
.theme-tile small { font-size: .85rem; opacity: .9; }
.theme-tile em { font-style: normal; font-weight: 700; font-size: .85rem; margin-top: .3rem; }
.theme-tile:not(.has-photo) small, .theme-tile:not(.has-photo) em { color: var(--muted); }
@media (max-width: 860px) { .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .theme-grid { gap: .7rem; } .theme-tile { min-height: 160px; padding: .9rem; border-radius: 22px; } .theme-tile strong { font-size: 1.02rem; } .theme-tile small { font-size: .78rem; } }
[data-theme="dark"] .tt-ic { background: rgba(30,28,42,.9); }
.theme-tile.has-photo small, .theme-tile.has-photo em, .theme-tile.has-photo strong { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); }

/* ===== Audyt 5: spokojniejszy tryb ciemny – mniej poświat, wyraźne krawędzie kart, naturalne zdjęcia ===== */
[data-theme="dark"] .blob { opacity: .12; }
[data-theme="dark"] body:not(.home)::before { opacity: .4; }
[data-theme="dark"] .pet-tile,
[data-theme="dark"] .snack-card,
[data-theme="dark"] .kf,
[data-theme="dark"] .theme-tile:not(.has-photo),
[data-theme="dark"] details.fold { background: #18161f; border-color: rgba(255,255,255,.10); }
[data-theme="dark"] .pet-tile:hover { border-color: rgba(180,164,255,.35); }
[data-theme="dark"] .glass { border-color: rgba(255,255,255,.10); }
[data-theme="dark"] .pet-photo img, [data-theme="dark"] .profile-photo img { filter: none; }
[data-theme="dark"] .cta-box { background: linear-gradient(135deg, #4b2fb8, #8a2a6e); }

/* Ekran offline (sw.js) */
.offline-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.2rem; }
.offline-box { max-width: 460px; width: 100%; padding: 2rem 1.6rem; border-radius: 30px; text-align: center; display: grid; gap: .7rem; justify-items: center; }
.offline-box h1 { font-size: clamp(1.5rem, 5vw, 2rem); margin: 0; }
.offline-box .card-actions { justify-content: center; }
.sw-update { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 120; display: flex; gap: .7rem; align-items: center;
  padding: .6rem .7rem .6rem 1rem; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 14px 34px -14px rgba(0,0,0,.5); font-size: .9rem; max-width: calc(100vw - 24px); }
.sw-update button { border: 0; border-radius: 999px; padding: .45rem .9rem; font-weight: 700; cursor: pointer; background: #fff; color: #111; min-height: 36px; }
[data-theme="dark"] .sw-update { background: #f4f4f6; color: #111; }
[data-theme="dark"] .sw-update button { background: #111; color: #fff; }

/* ===== Audyt 5: oś procesu adopcji w „Moje wnioski” ===== */
.process { margin: .7rem 0 .4rem; }
.process-bar { height: 6px; border-radius: 99px; background: rgba(120,115,140,.18); overflow: hidden; margin-bottom: .7rem; }
.process-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2fbf8f, #6c4dff); }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.process li { position: relative; display: flex; gap: .6rem; align-items: flex-start; padding: .2rem 0 .45rem; font-size: .9rem; color: var(--muted); }
.process li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: -4px; width: 2px; background: rgba(120,115,140,.22); }
.process li b { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .7rem; background: rgba(120,115,140,.2); color: #fff; }
.process li.done { color: var(--ink); }
.process li.done b { background: #2fbf8f; }
.process li.done::after { background: #2fbf8f; }
.process li.now { color: var(--ink); font-weight: 700; }
.process li.now b { background: #fff; color: #f08a24; box-shadow: 0 0 0 2px #f08a24 inset; }
.process li em { display: block; font-style: normal; font-weight: 500; font-size: .78rem; color: var(--muted); }
[data-theme="dark"] .process li.now b { background: #18161f; }
.modal-box:focus { outline: none; }

/* Telefon: pasek porównywarki i przyklejony „Chcę adoptować” jeden nad drugim (wcześniej mogły na siebie nachodzić) */
@media (max-width: 900px) {
  body.has-mobile-tabbar:has(.compare-bar:not([hidden])) .sticky-cta { bottom: calc(146px + env(safe-area-inset-bottom, 0px)); }
  body:not(.has-mobile-tabbar):has(.compare-bar:not([hidden])) .sticky-cta { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  body:has(.compare-bar:not([hidden])):has(.sticky-cta:not(.away)) .chat-fab { bottom: calc(214px + env(safe-area-inset-bottom, 0px)); }
  body:has(.compare-bar:not([hidden])):has(.sticky-cta:not(.away)) .chat-panel { bottom: calc(274px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  .theme-tile { align-content: space-between; min-height: 150px; }
  .tt-ic { position: static; width: 36px; height: 36px; font-size: 1.1rem; border-radius: 12px; margin-bottom: .6rem; }
  .theme-tile small { display: none; }
}

/* Menu 901–1180 px (małe laptopy, iPad w poziomie): ciaśniej, żeby przyciski konta nie wychodziły poza pasek */
@media (min-width: 901px) and (max-width: 1180px) {
  header .nav .nav-links { gap: clamp(.7rem, 1.6vw, 1.4rem); }
  header .nav .nav-links a { font-size: .93rem; }
  header .nav .nav-actions { gap: .35rem; }
  header .nav .nav-actions .btn-small { padding-left: .8rem; padding-right: .8rem; }
}
@media (min-width: 901px) and (max-width: 1060px) {
  header .nav .logo-word { display: none; }
  header .nav .nav-links a { font-size: .88rem; }
}
