/* Wspólna stopka: pełne linki w pierwszym wierszu, profile i aplikacje obok podpisu. */
footer.cvl-footer {
  --footer-bg: #0a0a0a;
  --footer-text: #fafafa;
  --footer-muted: #a1a1a1;
  --footer-line: #2a2a2a;
  --footer-accent: #71deb0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  min-width: 0;
  margin: 0;
  padding: 12px max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left));
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bg);
  color: var(--footer-muted);
  font: 13px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.cvl-footer .footer-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  min-width: 0;
}

.cvl-footer .system-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--footer-muted);
  font: inherit;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.cvl-footer .system-link:hover {
  color: var(--footer-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cvl-footer .footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.cvl-footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  color: var(--footer-muted);
}

.cvl-footer .social-link:hover {
  color: var(--footer-accent);
}

.cvl-footer .appstore-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  margin: 0;
  line-height: 0;
}

.cvl-footer .appstore-badge img {
  display: block;
  height: 32px;
  width: auto;
}

/* Grafika Google zawiera margines ochronny: widoczny badge ma tę samą wysokość co Apple. */
.cvl-footer .appstore-badge img.play-badge {
  height: 42px;
  width: auto;
}

.cvl-footer .credit-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.cvl-footer .powered-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  color: var(--footer-text);
  text-decoration: none;
  white-space: nowrap;
}

.cvl-footer .powered-brand > span {
  color: var(--footer-muted);
  font-size: 12px;
}

.cvl-footer .powered-brand svg {
  color: var(--footer-accent);
  transform: scaleX(-1);
}

.cvl-footer .powered-brand strong {
  font-size: 19px;
  letter-spacing: -0.6px;
}

.cvl-footer .powered-brand strong span {
  color: #d4d4d4;
  font-weight: 500;
}

.cvl-footer .powered-brand:hover strong {
  color: var(--footer-accent);
}

.cvl-footer .build-stamp {
  color: var(--footer-muted);
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cvl-footer a:focus-visible,
.cvl-footer button:focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  footer.cvl-footer {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
    gap: 12px;
  }

  .cvl-footer .footer-links {
    gap: 0 16px;
  }

  .cvl-footer .credit-right {
    align-items: flex-start;
  }
}
