/* =========================================================
   Aplikacja Ajax: pobranie + instrukcje
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.app-hero { padding-block: clamp(28px, 4.2vw, 60px) clamp(32px, 4.7vw, 64px); background: var(--mist); }
.app-hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.035em; }
.app-hero .lead { margin-top: 20px; }

/* ---------- Sklepy ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(16px, 2.6vw, 24px); }
.store {
  display: flex; align-items: center; gap: 24px;
  padding: 20px 24px 20px 20px; border-radius: var(--radius-lg); background: var(--paper);
}
.store__btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 22px 0 18px; border-radius: 14px;
  background: var(--ink); color: #fff; text-decoration: none;
  transition: background-color .2s, transform .12s ease-out;
}
.store__btn:hover { background: #2b2f35; }
.store__btn:active { transform: scale(.97); }
.store__btn svg { width: 28px; height: 28px; flex: none; fill: #fff; }
.store__btn span { display: grid; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; }
.store__btn small { font-size: .75rem; font-weight: 450; letter-spacing: 0; opacity: .8; }
.store__qr { margin: 0; display: grid; justify-items: center; gap: 8px; }
.store__qr svg { width: 96px; height: 96px; }
.store__qr figcaption { font-size: .75rem; color: var(--ink-3); }
/* Telefon rozpoznany (app.js): jego sklep pierwszy, drugi przygaszony. */
.stores[data-os] .store:not(.is-mine) { order: 1; opacity: .7; }

/* Na telefonie QR nie ma sensu. */
@media (max-width: 760px), (pointer: coarse) {
  .store__qr { display: none; }
  .store { padding: 0; background: none; }
}
@media (max-width: 480px) {
  .stores { display: grid; }
  .store__btn { width: 100%; }
}

/* ---------- Pierwsze kroki ---------- */
.app-steps {
  list-style: none; margin: clamp(24px, 3.7vw, 40px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px clamp(24px, 4vw, 48px);
}
.app-steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; row-gap: 4px; }
.app-steps span {
  grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: .875rem; font-weight: 600;
}
.app-steps strong { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; padding-top: 4px; }
.app-steps p { margin: 0; font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- Instrukcje ---------- */
.help { padding-block: var(--sec); }
.help__head { display: grid; gap: 28px; margin-bottom: clamp(16px, 2.6vw, 28px); }
.help__search {
  position: relative; display: block;
}
.help__search svg {
  position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 20px; height: 20px;
  fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none;
}
.help__search input {
  width: 100%; min-height: 56px; padding: 0 20px 0 50px;
  border: 0; border-radius: 16px; background: var(--mist);
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  transition: box-shadow .2s;
}
.help__search input::placeholder { color: var(--ink-3); }
.help__search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.35); background: var(--paper); }

.help__group + .help__group { margin-top: clamp(20px, 2.6vw, 28px); }
.help__group h3 { margin-bottom: 8px; font-size: .9375rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.help__group[hidden], .guide[hidden] { display: none; }

.guide { border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.help__group .guide:last-child { border-bottom: 1px solid var(--line); }
.guide summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; font-size: 1.1875rem; font-weight: 560; letter-spacing: -0.015em;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg); transition: transform .35s var(--ease);
}
.guide[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.guide summary:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; border-radius: 6px; }

.guide__body { padding: 0 0 28px; max-width: 38em; }
.guide__a { margin: 0 0 18px; color: var(--ink-2); }
.guide__steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide__steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; line-height: 1.5; }
.guide__steps li::before {
  content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; margin-top: -1px;
  border-radius: 50%; background: var(--mist); font-size: .8125rem; font-weight: 600;
}
.guide__steps b { font-weight: 600; }
.guide__note {
  margin: 20px 0 0; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--mist); font-size: .9375rem; color: var(--ink-2); line-height: 1.45;
}
.guide__share {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 0;
  border: 0; background: none; font: inherit; font-size: .875rem; color: var(--ink-2); cursor: pointer;
}
.guide__share:hover { color: var(--ink); }
.guide__share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.guide__share.is-done { color: var(--armed-deep); }


.help__empty { padding: 32px 0; color: var(--ink-2); }
.help__call {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin-top: clamp(24px, 3.7vw, 36px); padding: 24px 28px; border-radius: var(--radius-lg); background: var(--mist);
}
.help__call p { margin: 0; }
.help__src { margin-top: 20px; font-size: .8125rem; color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
  .guide[open] .guide__body { animation: guide-in .4s var(--ease); }
  @keyframes guide-in { from { opacity: 0; transform: translateY(-6px); } }
  .guide.is-target summary { animation: guide-flash 1.6s ease-out; }
  @keyframes guide-flash { 0%, 30% { color: var(--armed-deep); } }
}
