/* Beginner3D UI — uklad strony: powloka, pasek gorny, siatki, stopka. */

/* == Powloka ======================================================== */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell__main {
  flex: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm) var(--space-2xl);
}

@media (min-width: 768px) {
  .shell__main {
    padding-inline: var(--space-md);
  }
}

/* == Pasek gorny ==================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--layer-sticky);
  border-bottom: var(--border-width) solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-2xs) var(--space-sm);
}

@media (min-width: 768px) {
  .topbar__inner {
    padding-inline: var(--space-md);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  flex: none;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  display: block;
  /* Kafel SVG ma własne zaokrąglenie; promień tutaj tylko przycina
     ewentualne tło pod spodem, gdyby obrazek się nie wczytał. */
  border-radius: var(--radius-sm);
}

.brand__name {
  display: none;
}

@media (min-width: 560px) {
  .brand__name {
    display: block;
  }
}

/* Wyszukiwarka zajmuje wolna przestrzen paska. Na stronach bez niej ten
   kontener jest pusty i dziala jak rozporka, dosuwajac akcje do prawej. */
.topbar__search {
  flex: 1;
  min-width: 0;
}

/* Ponizej tej szerokosci pasek lamie sie na dwa rzedy: marka i akcje w
   gornym, cale pole wyszukiwania w dolnym. */
@media (max-width: 720px) {
  .topbar__inner {
    flex-wrap: wrap;
  }

  .topbar__search {
    order: 3;
    flex-basis: 100%;
    padding-bottom: var(--space-3xs);
  }

  .topbar__search:empty {
    display: none;
  }
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3xs);
  flex: none;
}

/* == Nawigacja glowna =============================================== */
.nav {
  display: none;
  align-items: center;
  gap: var(--space-3xs);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

.nav__link {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.nav__link:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}

.nav__link[aria-current="page"] {
  background: var(--surface-active);
  color: var(--text);
}

/* == Konto w pasku ================================================== */
.account {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.account__name {
  display: none;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (min-width: 700px) {
  .account__name {
    display: block;
  }
}

/* == Pasek wyszukiwania ============================================= */
.searchbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.searchbar__row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2xs);
}

.searchbar__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.searchbar__input {
  width: 100%;
  height: 100%;
  padding: 0.45rem 2.25rem 0.45rem 2.25rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition: border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}

/* Na waskim ekranie sam znaczek filtrow wystarczy - miejsce w rzedzie
   jest potrzebne polu wyszukiwania. */
@media (max-width: 480px) {
  .searchbar__filters-label {
    display: none;
  }
}

.searchbar__input::placeholder {
  color: var(--text-faint);
}

.searchbar__input:hover {
  border-color: var(--border-strong);
}

.searchbar__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.searchbar__icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.searchbar__clear {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.searchbar__clear:hover {
  color: var(--text);
}

.searchbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 1.5rem;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* == Panel filtrow ================================================== */
.filters {
  right: 0;
  top: calc(100% + var(--space-3xs));
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.filters__legend {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.filters__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2xs);
}

/* == Popularne frazy ================================================ */
.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

/* == Lista wynikow ================================================== */
/* Jeden model na rzad: wiecej pozycji miesci sie bez przewijania, a oko
   porownuje tytuly i licencje wzdluz jednej krawedzi. */
.results {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  /* Wiersze ukladaja sie wedlug szerokosci tej listy, a nie okna - ta sama
     lista stoi tez w wezszej karcie biblioteki. */
  container-type: inline-size;
}

.results__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2xs);
  margin-bottom: var(--space-sm);
}

.results__count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* == Wiersz modelu ================================================== */
/* Waski ekran: miniatura, blok tytulu, autor i zrodlo jeden pod drugim,
   gwiazdka z prawej. Szeroki: pieic prawdziwych kolumn. */

/* Kolumna gwiazdki: przycisk plus jego prawy margines. Naglowek listy liczy
   ja tak samo - jego komorka gwiazdki jest pusta, wiec przy `auto` zwezilaby
   sie do zera i przesunela wszystkie pozostale kolumny wzgledem wierszy. */
.model,
.model-head {
  --star-column: calc(2.25rem + var(--space-2xs));
}

.model {
  position: relative;
  display: grid;
  align-items: center;
  gap: var(--space-3xs) var(--space-sm);
  grid-template-columns: 5.5rem minmax(0, 1fr) var(--star-column);
  grid-template-areas:
    "media body   star"
    "media author star"
    "media source star";
  overflow: hidden;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease);
}

/* == Naglowek kolumn listy ========================================== */
/* Lista modeli jest siatka, nie tabela - "thead" to zwykly wiersz o tym
   samym ukladzie kolumn. W ukladzie pionowym pola stoja jedno pod drugim
   i nie ma czego opisywac, wiec naglowek pojawia sie razem z kolumnami. */
.model-head {
  display: none;
}

.model-head__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pieic kolumn dopiero wtedy, gdy tytul realnie ma gdzie sie zmiescic.
   Przy braku obslugi @container zostaje uklad ulozony w pionie - czytelny,
   tylko wyzszy, i bez naglowka. */
@container (min-width: 44rem) {
  /* Jedna definicja torow dla wiersza i naglowka - rozjazd tych dwoch list
     bylby natychmiast widoczny jako przesuniete kolumny. */
  .model,
  .model-head {
    grid-template-columns: 7rem minmax(10rem, 1fr) 10rem 8.5rem var(--star-column);
  }

  .model {
    grid-template-areas: "media body author source star";
  }

  .model-head {
    position: sticky;
    /* Pasek gorny tez jest przyklejony, wiec naglowek zatrzymuje sie pod nim. */
    top: var(--topbar-height);
    /* Nad wierszami, ktore pod niego wjezdzaja: gwiazdka i link do katalogu
       maja wlasny z-index 2. Ponizej paska gornego (--layer-sticky). */
    z-index: 3;
    display: grid;
    align-items: center;
    gap: var(--space-3xs) var(--space-sm);
    /* Ramka jest przezroczysta, ale musi byc - bez niej kolumny naglowka
       przesunelyby sie o jej grubosc wzgledem kolumn wiersza. */
    border: var(--border-width) solid transparent;
    padding-block: var(--space-2xs);
    background: var(--bg);
    color: var(--text-faint);
    font-size: var(--text-2xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

.model__media { grid-area: media; }
.model__body { grid-area: body; }
.model__author { grid-area: author; }
.model__source { grid-area: source; }
.model__fav { grid-area: star; }

/* W ukladzie listowym unoszenie karty rozjezdza rytm wierszy, wiec
   sygnalem najechania jest tlo i obrys. */
.model:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.model__media {
  position: relative;
  align-self: stretch;
  min-height: 4.75rem;
  background: var(--bg-sunken);
  overflow: hidden;
}

/* Miniatura z podgladem sygnalizuje to kursorem lupy. */
.model__media[data-zoom] {
  cursor: zoom-in;
}

.model__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--space-3xs);
  color: var(--text-faint);
  font-size: var(--text-2xs);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.model__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3xs);
  padding: var(--space-2xs) 0;
}

.model__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.model__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Przycisk tytulu rozciaga swoj obszar klikniecia na caly wiersz, ale
   gwiazdka ma wyzszy z-index i zostaje nad nim. */
.model__open {
  font: inherit;
  color: inherit;
  text-align: left;
}

.model__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.model:hover .model__open {
  color: var(--accent-text);
}

/* Obrys fokusu obejmuje caly wiersz, a nie sam tekst tytulu - inaczej
   nawigujacy klawiatura nie widzi, ktory element za chwile kliknie. */
.model__open:focus-visible {
  outline: none;
}

.model:has(.model__open:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.model__author {
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Link do katalogu zrodlowego. Musi byc nad warstwa klikniecia wiersza,
   inaczej otwieralby okno szczegolow zamiast serwisu. */
.model__source {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  justify-self: start;
  min-width: 0;
  padding: 0.15rem 0.4rem;
  margin-left: -0.4rem;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

a.model__source:hover {
  background: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.model__source-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Gwiazdka jest osobna kolumna wiersza, wiec nie zaslania tytulu. */
.model__fav {
  z-index: 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: var(--space-2xs);
  border-radius: 50%;
  border: var(--border-width) solid transparent;
  color: var(--text-faint);
  transition: color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.model__fav:hover {
  background: var(--surface-active);
  color: var(--accent);
}

.model__fav[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.model__fav[aria-pressed="true"] .btn__icon {
  fill: currentColor;
}

/* == Postep zrodel ================================================== */
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  padding: 0.15rem 0.5rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.source-pill--pending {
  color: var(--text-faint);
}

.source-pill--done {
  border-color: var(--ok-border);
  color: var(--ok);
}

.source-pill--error {
  border-color: var(--danger-border);
  color: var(--danger);
}

.source-pill__spinner {
  width: 0.7rem;
  height: 0.7rem;
  border-width: 1.5px;
}

/* Udzial procentowy widoczny tylko dla admina - odrozniamy go od liczby
   wynikow, zeby dwie liczby obok siebie nie zlewaly sie w jedna. */
.source-pill__share {
  padding-left: var(--space-3xs);
  border-left: var(--border-width) solid currentColor;
  color: var(--text-faint);
  opacity: 0.85;
}

/* == Strony uwierzytelniania ======================================== */
.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--space-md) var(--space-sm);
}

.auth__card {
  width: min(24rem, 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  text-align: center;
}

.auth__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth__footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth__footer a {
  color: var(--accent-text);
  font-weight: var(--weight-medium);
}

/* == Uklad konta ==================================================== */
/* Zakladki sekcji konta: ten sam komponent .tabs co w oknie szczegolow,
   tylko bez bocznych paddingow modala. */
.tabs--page {
  padding: 0;
  margin-bottom: var(--space-md);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stack--tight {
  gap: var(--space-sm);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
}

.row--between {
  justify-content: space-between;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  margin-bottom: var(--space-md);
}

.page-head__lead {
  max-width: var(--prose-max);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* == Kreator etui =================================================== */
.case {
  display: grid;
  gap: var(--space-md);
  align-items: start;
}

/* Kroki po lewej, schemat i podglad po prawej - juz od szerokosci tabletu,
   zeby ustawienia i rzuty byly widoczne rownoczesnie. */
@media (min-width: 760px) {
  .case {
    grid-template-columns: clamp(17rem, 34vw, 22rem) 1fr;
  }

  /* Formularz zostaje w polu widzenia, gdy podglad jest wysoki. */
  .case__panel {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding-right: var(--space-3xs);
  }
}

.case__panel,
.case__stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.case__steps {
  display: flex;
  gap: var(--space-3xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.case__step {
  width: 1.75rem;
  height: 1.75rem;
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.case__step:hover {
  background: var(--surface-hover);
}

.case__step--done {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.case__step--current,
.case__step--current:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-inverted);
}

.case__slide {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.case__slide--enter {
  animation: case-slide-in var(--duration) var(--ease);
}

@keyframes case-slide-in {
  from {
    opacity: 0;
    transform: translateX(0.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .case__slide--enter {
    animation: none;
  }
}

.case__slide-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.case__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
}

.case__nav-count {
  color: var(--text-faint);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums;
}

.case__grid {
  display: grid;
  gap: var(--space-2xs);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.case__button-row {
  display: grid;
  gap: var(--space-3xs);
  grid-template-columns: 5.5rem 1fr 1fr auto;
  align-items: center;
}

.case__preview {
  transition: opacity var(--duration) var(--ease);
}

/* W trakcie liczenia przygaszamy podglad, zamiast go usuwac - inaczej
   przy kazdym ruchu suwaka miga pusty prostokat. */
.case__preview--busy {
  opacity: 0.55;
}

.case__canvas {
  height: 22rem;
}

.case__schematic {
  display: grid;
  place-items: center;
}

.case__svg {
  width: 100%;
  max-width: 18rem;
  height: auto;
}

/* Trzy rzuty obok siebie, wyrownane do wspolnej wysokosci. */
.case__views {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
}

.case__view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xs);
  margin: 0;
  transition: opacity var(--duration) var(--ease);
}

.case__views .case__svg {
  width: auto;
  max-width: 100%;
  height: 16rem;
}

/* == Integracja z pokazem slajdow ===================================
   Krok kreatora (data-step) pokazuje wylacznie rzut strony, ktora
   wlasnie edytujesz, i podswietla ustawiane elementy. Ostatni krok
   (bez regul) pokazuje wszystkie rzuty. */
.case__views[data-step="0"] .case__view--back,
.case__views[data-step="1"] .case__view--back,
.case__views[data-step="2"] .case__view--front,
.case__views[data-step="2"] .case__view--side,
.case__views[data-step="3"] .case__view--front,
.case__views[data-step="4"] .case__view--front,
.case__views[data-step="4"] .case__view--side {
  display: none;
}

/* Krok „Telefon": przerywany obrys telefonu w kolorze akcentu. */
.case__views[data-step="0"] .case__svg-phone {
  stroke: var(--accent);
}

/* Krok „Etui": obrys, otwor i obrzeze. */
.case__views[data-step="1"] .case__svg-outline {
  stroke: var(--accent);
  stroke-width: 1;
}

.case__views[data-step="1"] .case__svg-opening {
  stroke: var(--accent);
}

/* Krok „Aparat": wyrazniejsze okno do przeciagania. */
.case__views[data-step="2"] .case__svg-camera {
  stroke-width: 1.4;
}

/* Krok „Port i przyciski". */
.case__views[data-step="3"] .case__svg-port {
  fill: var(--accent);
}

.case__views[data-step="3"] .case__svg-button {
  stroke-width: 1.2;
}

/* Podpowiedz pod schematem, dopasowana do biezacego kroku. */
.case__views-hint {
  margin: var(--space-2xs) 0 0;
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--text-sm);
  text-align: center;
}

.case__svg-outline {
  fill: var(--surface-hover);
  stroke: var(--border-strong);
  stroke-width: 0.6;
}

.case__svg-phone {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 0.4;
  stroke-dasharray: 2 2;
}

.case__svg-camera {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 0.8;
}

.case__svg-port {
  fill: var(--text-faint);
}

.case__svg-opening {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 0.5;
}

.case__svg-button {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 0.6;
}

/* Przycisk po przeciwnej (niewidocznej) stronie profilu. */
.case__svg-button--far {
  fill: none;
  stroke: var(--text-faint);
  stroke-dasharray: 2 2;
}

/* Element schematu bedacy odnosnikiem do kroku, w ktorym sie go ustawia. */
.case__svg-link {
  cursor: pointer;
}

.case__svg-link:hover {
  stroke: var(--accent);
  stroke-width: 1.2;
}

/* Element odpowiadajacy polu, ktore uzytkownik wlasnie edytuje. */
.case__views .case__svg--active {
  stroke: var(--accent);
  stroke-width: 1.6;
}

.case__views-hint--active {
  font-weight: var(--weight-semibold);
}

/* Wzor azurowy w plecach. */
.case__svg-pattern {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 0.4;
}

/* Krok „Wzor": wyrazniejszy kontur wzoru. */
.case__views[data-step="4"] .case__svg-pattern {
  stroke-width: 0.9;
}

/* Legenda pod schematem - te same kolory, co elementy SVG powyzej. */
.case__legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.case__legend li {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.case__legend-swatch {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
}

.case__legend-swatch--outline {
  border: var(--border-width) solid var(--border-strong);
  background: var(--surface-hover);
}

.case__legend-swatch--phone {
  border: var(--border-width) dashed var(--text-faint);
}

.case__legend-swatch--camera {
  border: var(--border-width) solid var(--accent);
  background: var(--accent-soft);
}

.case__legend-swatch--port {
  background: var(--text-faint);
}

/* == Stopka ========================================================= */
.footer {
  border-top: var(--border-width) solid var(--border);
  background: var(--bg-sunken);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-faint);
}
