/* ═══════════════════════════════════════════════════════════════
   StringIt — Premium dark-mode one-page e-shop
   Aesthetic: "Dark Geometry" — obsidian, technical, gallery-grade.
   Accent discipline: HYBRID — cyan ONLY for the live thread +
   interactive/active states + the single primary CTA.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --obsidian: #050505;   /* page background, matte */
  --charcoal: #141414;   /* surfaces / cards / configurator workspace */
  --silver:   #F2F2F7;   /* text primary (Liquid Silver) */
  --titanium: #8E8E93;   /* text secondary / metadata */
  --accent:   #00E5FF;   /* Cyber Cyan — surgical use only */

  --line:     rgba(242, 242, 247, 0.10); /* hairline dividers */
  --line-soft:rgba(242, 242, 247, 0.06);
  --nav-h:    80px;
  --maxw:     1280px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Záměrně NE „smooth" globálně: jinak prohlížeč po refreshi animovaně sjede
   z vršku na obnovenou pozici. Plynulé rolování řeší JS (scrollTo behavior:smooth)
   jen u klikání na kotvy. */
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; background: var(--obsidian); }

body {
  margin: 0;
  /* Průhledné — základní obsidián drží <html>, mezi tím prosvítá dekorativní
     string-art plátno (#stringBg, position:fixed; z-index:-1). */
  background: transparent;
  color: var(--silver);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: "ss01" on, "cv01" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── Dekorativní string-art pozadí (celý web, fixní, velmi decentní) ── */
#stringBg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: block;
}

/* ── Loader: překryje stránku do obnovení scrollu (brání probliknutí hero) ── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--obsidian);
  transition: opacity 0.4s var(--ease);
}
.page-loader.is-hidden { opacity: 0; pointer-events: none; }
.page-loader__mark {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--titanium);
  animation: loaderPulse 1.1s ease-in-out infinite;
}
@keyframes loaderPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .page-loader__mark { animation: none; } }

img, canvas, svg { display: block; max-width: 100%; }
canvas, img { user-select: none; -webkit-user-drag: none; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: "Syne", system-ui, sans-serif; margin: 0; text-wrap: balance; }

::selection { background: var(--accent); color: #000; }

/* Cyan custom scrollbar accent kept minimal (silver, not cyan, at rest) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ─── Layout helpers ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--titanium);
  margin: 0 0 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--titanium);
  display: inline-block;
}

.section { padding-block: clamp(5rem, 11vh, 9rem); position: relative; }
/* Charcoal blok plynule navazuje na obsidiánové sekce nad i pod sebou:
   nahoře i dole se barva přelévá z obsidiánu do charcoalu (bez tvrdého švu).
   Gradient je v pozadí, takže text zůstává čitelný. */
.section--charcoal {
  background: linear-gradient(180deg,
    var(--obsidian) 0%,
    var(--charcoal) 14%,
    var(--charcoal) 86%,
    var(--obsidian) 100%);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ═══ A. STICKY NAV ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(5, 5, 5, 0.62);
  /* blur radius drží nízko (10px) — backdrop-filter se přepočítává při každém
     scroll-framu a velký poloměr (20px) způsoboval sekání. 10px vypadá skoro
     stejně, ale scrolluje plynule (60 fps). */
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(5, 5, 5, 0.78); }

.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__brand { display: flex; align-items: center; gap: 0.7rem; }
.nav__logo { width: 34px; height: 34px; flex: none; }
.nav__logo .si-ring { stroke: url(#siGrad); }
.nav__logo .si-mono { stroke: url(#siGrad); fill: none; }
.nav__wordmark {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  color: var(--silver);
}

.nav__links { display: flex; gap: clamp(1.5rem, 3vw, 2.5rem); }
.nav__link {
  position: relative;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--titanium);
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover { color: var(--silver); }
.nav__link.is-active { color: var(--silver); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cart {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--silver);
  background: transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav__cart:hover { border-color: var(--silver); }
.nav__cart svg { width: 18px; height: 18px; }
.nav__badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #000;
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--obsidian);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}
.nav__badge.is-visible { transform: scale(1); }

/* pravá skupina (košík + hamburger) */
.nav__actions { display: flex; align-items: center; gap: 0.75rem; }

/* hamburger – skrytý na desktopu, viditelný pod 860px */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.3s var(--ease);
}
.nav__toggle:hover { border-color: var(--silver); }
.nav__toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 17px; height: 1.5px;
  margin-left: -8.5px;
  background: var(--silver);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle span:nth-child(1) { transform: translateY(-5px); }
.nav__toggle span:nth-child(2) { transform: translateY(0); }
.nav__toggle span:nth-child(3) { transform: translateY(5px); }
/* křížek po otevření */
.nav.is-open .nav__toggle span:nth-child(1) { transform: rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: rotate(-45deg); }
.nav__badge.bump { animation: badgeBump 0.4s var(--ease); }
@keyframes badgeBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ═══ B. HERO ═════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 45% 55%;
  align-items: center;
  position: relative;
  padding-top: var(--nav-h);
}
.hero__content {
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
  padding-block: 2rem;
  max-width: 640px;
  margin-left: auto;
  width: 100%;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.hero__title .ln { display: block; }
.hero__subtitle {
  font-weight: 300;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--titanium);
  max-width: 30ch;
  margin-bottom: 2.6rem;
  line-height: 1.55;
}

/* Outlined CTA → fills cyan on hover */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 220px;
  height: 50px;
  padding-inline: 1.5rem;
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--silver);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.35);
}

/* vyplněná varianta – primární hero CTA (objednávka na míru) */
.btn-outline--fill {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-outline--fill:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.45);
  transform: translateY(-1px);
}

/* hero tlačítka vedle sebe, na mobilu pod sebou */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero__canvas-wrap {
  position: relative;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Before/after porovnávací slider (kruhový) ── */
.compare {
  --pos: 50%;
  position: relative;
  width: min(82%, 560px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(242, 242, 247, 0.14),
              0 24px 70px rgba(0, 0, 0, 0.55);
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}
.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
/* horní vrstva (fotka) oříznutá zleva podle pozice táhla */
.compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
/* svislá dělicí linka */
.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  transform: translateX(-50%);
  background: rgba(242, 242, 247, 0.9);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0a0a0b;
  background: rgba(242, 242, 247, 0.95);
  border: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  cursor: ew-resize;
  pointer-events: auto;
  transition: box-shadow 0.3s var(--ease), transform 0.15s var(--ease);
}
.compare__handle:hover { box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.18), 0 2px 14px rgba(0, 0, 0, 0.45); }
.compare__handle:active { transform: translate(-50%, -50%) scale(0.94); }
.compare__handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare__handle svg { width: 22px; height: 22px; }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: clamp(1.25rem, 4vw, 3.5rem);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--titanium);
  display: flex; align-items: center; gap: 0.6rem;
}
.hero__scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(var(--titanium), transparent);
  animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ═══ C. GALLERY ══════════════════════════════════════════════ */
.gallery__head { margin-bottom: 3.5rem; }
.gallery__title {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.gallery__grid {
  display: grid;
  /* Auto-fit + vystředění: jediná dlaždice sedí na střed, případné další se rozloží. */
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  justify-content: center;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}
.piece {
  display: flex;
  flex-direction: column;
}
.piece__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  /* Matné sklo: poloprůhledný uhel + rozostření, aby okolo kruhu jemně
     prosvítalo dynamické string-art pozadí (#stringBg). */
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease),
              box-shadow 0.5s var(--ease);
}
/* The generative SVG mandala fills the frame */
.piece__frame svg { width: 86%; height: 86%; overflow: visible; }
.piece__frame .mandala-stroke {
  stroke: var(--silver);
  transition: stroke 0.5s var(--ease);
}
.piece:hover .piece__frame {
  transform: scale(1.02);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.piece:hover .piece__frame .mandala-stroke { stroke: var(--accent); }
/* Real product photo would replace .piece__frame svg later:
   <img src="..." alt="..."> at 4:5 ratio. */

/* ── Fotková dlaždice: string-art s hoverem na originál ──
   Obě vrstvy mají identické rozměry/ořez, takže na sebe přesně navazují
   (stejné zdrojové snímky jako hero compare). Originál se prolne při hoveru. */
.piece__photo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Snímek je čtverec s kruhovým portrétem na bílém pozadí. Box stáhneme na
     čtverec (šířka rámu) a kruhovým clipem o něco menším než vepsaný kruh
     (~48,5 %) odřízneme bílé rohy i tenký bílý prstenec u okraje snímku.
     Pozadí rámu zůstává jako u ostatních dlaždic (var(--charcoal)). */
  object-fit: cover;
  object-position: center;
  clip-path: circle(48.5% at 50% 50%);
  /* Vlastní GPU kompozitní vrstva: drží dekódovaný bitmap i u skryté (opacity:0)
     vrstvy, takže se hover-prolnutí dělá jen na průhlednosti, bez nové
     rasterizace/dekódu → žádné „rozmazané probliknutí" při najetí. */
  transform: translateY(-50%) translateZ(0);
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.piece__photo--orig {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.piece:hover .piece__photo--orig,
.piece:focus-within .piece__photo--orig { opacity: 1; }
/* Reverzní varianta: základ = originál, na hover se prolne string-art. */
.piece__frame--photo-rev .piece__photo--orig { opacity: 1; }
.piece__frame--photo-rev .piece__photo--art {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.piece__frame--photo-rev:hover .piece__photo--art,
.piece__frame--photo-rev:focus-within .piece__photo--art { opacity: 1; }
/* Plná varianta: originál vyplní celý rám, na hover zůstane jen kruhový string výřez. */
.piece__frame--photo-full .piece__photo--orig {
  opacity: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  top: 0;
  transform: none;
  clip-path: none;
  /* Stejné měřítko jako string výřez (cover, šířka = vazba). Svislé těžiště
     posuneme na ~25 %, aby obličej přesně navazoval na string-art kruh
     (ten je generován z výřezu top=185, střed obličeje ≈ y 545). */
  object-position: 50% 25%;
  transition: opacity 0.5s var(--ease);
}
.piece__frame--photo-full .piece__photo--art {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.piece__frame--photo-full:hover .piece__photo--orig,
.piece__frame--photo-full:focus-within .piece__photo--orig { opacity: 0; }
.piece__frame--photo-full:hover .piece__photo--art,
.piece__frame--photo-full:focus-within .piece__photo--art { opacity: 1; }
.piece__hint {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  /* Štítek sedí ve volném pásu pod kruhovou fotkou (kruh má r ≈ 48,5 % šířky,
     pod ním zbývá ~14 % výšky rámu) — nesmí zasahovat do snímku. */
  max-width: calc(100% - 1.4rem);
  white-space: nowrap;          /* vždy na jednom řádku */
  padding: 0.32rem 0.7rem;
  font-size: clamp(0.5rem, 1.4vw, 0.62rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver);
  background: rgba(5, 5, 6, 0.62);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.piece:hover .piece__hint { opacity: 0; }
.piece__cta {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.piece__cta:hover { border-bottom-color: var(--accent); }

.piece__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}
.piece__name {
  font-family: "Syne", sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--silver);
}
.piece__price-row { display: flex; align-items: center; gap: 0.75rem; }
.piece__price {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--silver);
  white-space: nowrap;
}
.piece__stats {
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.piece__add {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--silver);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.piece__add svg { width: 13px; height: 13px; }
.piece__add:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ═══ D. PROCESS ══════════════════════════════════════════════ */
.process__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  /* Scroll runway: this grid is the sticky containing block for BOTH columns,
     so the weave must finish before the grid bottom releases them. Height here
     (not a sibling spacer) keeps the canvas pinned for the whole animation.
     Kept short so the whole weave needs only a little scrolling. */
  min-height: 150vh;
}
.process__left {
  position: sticky;
  top: calc(var(--nav-h) + 4vh);
  align-self: start;
}
.process__title {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
/* Ořezové okno: fáze se uvnitř plynule posouvají (track) synchronně s nití,
   takže aktivní fáze je vždy vidět (dřív Fáze 3 padala pod fold). */
.steps {
  position: relative;
  overflow: hidden;
  /* výšku okna dopočítá JS podle nejvyšší fáze; tohle je fallback */
  height: 24rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
}
.steps__track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  will-change: transform;
}
.step {
  position: relative;
  padding: 1.5rem 0 1.5rem 2.5rem;
  border-left: 1px solid var(--line);
  opacity: 0.4;
  transition: border-color 0.5s var(--ease), opacity 0.5s var(--ease);
}
.step.is-active { opacity: 1; }
.step::before {
  content: "";
  position: absolute;
  left: -4.5px; top: 1.9rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2a2a2a;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.step__num {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--titanium);
  transition: color 0.5s var(--ease);
}
.step__name {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0.4rem 0 0.6rem;
  color: var(--titanium);
  transition: color 0.5s var(--ease);
}
.step__desc {
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--titanium);
  max-width: 38ch;
  transition: color 0.5s var(--ease);
}
.step.is-active { border-left-color: var(--accent); }
.step.is-active::before { background: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, 0.6); }
.step.is-active .step__num { color: var(--accent); }
.step.is-active .step__name { color: var(--silver); }
.step.is-active .step__desc { color: var(--silver); }

.process__right {
  position: sticky;
  top: calc(var(--nav-h) + 4vh);
}
.process__canvas-wrap {
  aspect-ratio: 1;
  width: 100%;
  /* Matné sklo — stejně jako u galerie: kolem kruhové desky jemně prosvítá
     dynamické string-art pozadí (#stringBg). */
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
#processCanvas { width: 100%; height: 100%; }
/* Real macro photos / slow-mo video loops of the actual weaving would
   slot in here later (e.g. a <video> behind/beside the canvas). */

.process__spacer { display: none; } /* runway now lives in .process__grid min-height */

/* ═══ E. CONFIGURATOR (real working integration) ══════════════ */
.config__head { margin-bottom: 1.5rem; }
.config__title {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  text-transform: uppercase;
}
.config__grid {
  display: grid;
  /* 3 sloupce: editor | parametry | výstup — vše se vejde na jednu obrazovku */
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.82fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.4vw, 2rem);
  align-items: start;
}

/* ── LEFT: editor okno + parametry / RIGHT: výstup + akce ── */
.config__left,
.config__right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Obě "okna" jsou čtverce řízené výškou (zastropovanou), aby se vešla bez
   scrollu; šířka se dopočítá z výšky → čtverec, vycentrovaný ve sloupci. */
#canvas-container,
#generateContainer {
  position: relative;
  height: clamp(280px, 42vh, 440px);
  aspect-ratio: 1;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  background: var(--obsidian);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#canvas-container canvas { display: block; max-width: 100%; max-height: 100%; }
/* fotka se v editoru tahá (posun pod fixním kruhem) */
#canvas-container:has(.upload-label.hidden) canvas { cursor: grab; }
#canvas-container:has(.upload-label.hidden) canvas:active { cursor: grabbing; }

/* ── Ovládání ořezu: přiblížení + velikost výřezu ── */
.crop-controls { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.65rem; }
.crop-controls[hidden] { display: none; }
.crop-controls__row {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr auto;
  align-items: center;
  gap: 0.7rem;
}
.crop-controls__label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--titanium);
  white-space: nowrap;
}
.crop-controls__val {
  font-size: 0.78rem;
  color: var(--silver);
  min-width: 3.4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.crop-controls__hint { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--titanium); opacity: 0.8; }

/* ── Režim přepínač (záložky nad okny) ── */
.config__tabs {
  display: inline-flex;
  gap: 0.4rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem;
}
.config__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--titanium);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.config__tab:hover { color: var(--silver); }
.config__tab.is-active { color: #000; background: var(--accent); }
.config__tab:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* ── Levé okno v režimu „z funkce" — panel s výběrem funkce + parametry ── */
#funcContainer {
  position: relative;
  min-height: clamp(280px, 42vh, 440px);
  width: clamp(280px, 42vh, 440px);
  max-width: 100%;
  margin-inline: auto;
  background: var(--obsidian);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.4rem;
  overflow: visible;
}
.func__select {
  appearance: none;
  width: 100%;
  background: rgba(5, 5, 5, 0.6);
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 16px;
}
.func__select:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.func__params { display: flex; flex-direction: column; gap: 1rem; }

/* ── Přepínání viditelnosti podle režimu (řídí JS přes [data-mode] na .config__grid) ── */
.config__grid[data-mode="photo"] [data-mode="func"],
.config__grid[data-mode="func"]  [data-mode="photo"] { display: none !important; }
/* Drag-and-drop upload label — dashed silver at rest, cyan on hover/dragover */
.upload-label {
  position: absolute;
  z-index: 5;
  inset: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--titanium);
  color: var(--titanium);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: rgba(5, 5, 5, 0.4);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.upload-label::before {
  content: "";
  width: 46px; height: 46px;
  background: currentColor;
  /* minimal cloud-upload glyph as mask (no emoji) */
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 18a4 4 0 0 1-.5-7.97A6 6 0 0 1 18 9.5a3.5 3.5 0 0 1-.5 8.5'/><path d='M12 13v6'/><path d='M9 15l3-3 3 3'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 18a4 4 0 0 1-.5-7.97A6 6 0 0 1 18 9.5a3.5 3.5 0 0 1-.5 8.5'/><path d='M12 13v6'/><path d='M9 15l3-3 3 3'/></svg>") center / contain no-repeat;
}
.upload-label:hover,
#canvas-container.is-dragover .upload-label {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 229, 255, 0.04);
}
.upload-label.hidden { display: none !important; }

/* Tlačítko × — odebere fotku a umožní nahrát novou bez refreshe stránky */
.editor__clear {
  position: absolute;
  z-index: 6;
  top: 0.6rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.6);
  color: var(--silver);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease);
}
.editor__clear:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.06);
}
.editor__clear:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.editor__clear[hidden] { display: none; }

.editor__hint {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--titanium);
}

/* ── Parametry (pod levým oknem) ── */
.config__params {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
/* posuvníky vedle sebe, ať parametry zaberou méně výšky */
.config__sliders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem 1.1rem;
}
.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--titanium);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.field__label strong { color: var(--silver); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Segmented buttons (board size + thread type) */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--obsidian);
  color: var(--silver);
  text-align: center;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
              background 0.25s var(--ease);
}
.seg__main { font-family: "Syne", sans-serif; font-weight: 600; font-size: 1.02rem; }
.seg__sub { font-size: 0.68rem; font-weight: 300; color: var(--titanium); letter-spacing: 0.03em; }
.seg__tag {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--titanium);
  margin-top: 0.15rem;
}
.segmented label:hover .seg { border-color: var(--silver); }
.segmented input:checked + .seg {
  border-color: var(--accent);
  color: var(--accent);
}
.segmented input:checked + .seg .seg__sub,
.segmented input:checked + .seg .seg__tag { color: var(--accent); }
.segmented input:focus-visible + .seg { outline: 1px solid var(--accent); outline-offset: 2px; }

/* Thread color swatches (shared photo + function mode) */
.swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.swatch {
  --sw: #1a1a1a;
  width: 30px; height: 30px; padding: 0;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch--light { border-color: rgba(255, 255, 255, 0.4); }
.swatch.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.35);
}
.swatch.is-active::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  mix-blend-mode: difference;
}
.swatch:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* Range sliders */
.field__slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
.field__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--silver);
  cursor: pointer;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field__slider::-webkit-slider-thumb:hover { background: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, 0.5); }
.field__slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--silver);
  cursor: pointer;
}
.field__slider::-moz-range-thumb:hover { background: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, 0.5); }

/* Advanced details */
.advanced {
  border: 1px solid var(--line-soft);
  padding: 0;
}
.advanced > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0.9rem 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--titanium);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.25s var(--ease);
}
.advanced > summary:hover { color: var(--silver); }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  color: var(--titanium);
  transition: transform 0.3s var(--ease);
}
.advanced[open] > summary::before { content: "\2212"; /* minus */ }
.advanced__body {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: 0.4rem 1rem 1.2rem;
}

/* ── Tipy pro nejlepší výsledek: spouštěcí tlačítko ── */
.tips-trigger {
  margin-top: 0.9rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--silver);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.tips-trigger:hover { border-color: var(--accent); color: #fff; background: rgba(0, 229, 255, 0.08); }
.tips-trigger__icon { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ── Tipy: popup s vizuálním příběhem ── */
.tips-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  /* odsazení shora pod navbar (+ malá mezera), ať panel nelepí na menu */
  padding: calc(var(--nav-h) + 1rem) 4vmin 4vmin;
}
.tips-modal[hidden] { display: none; }
.tips-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 3, 0.86);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.tips-modal.is-open .tips-modal__backdrop { opacity: 1; }
.tips-modal__panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - var(--nav-h) - 2.5rem);
  overflow-y: auto;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.tips-modal.is-open .tips-modal__panel { transform: none; opacity: 1; }
.tips-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.6);
  color: var(--silver);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tips-modal__close:hover { color: var(--accent); border-color: var(--accent); }
.tips-modal__title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  margin: 0.2rem 0 0.5rem;
  color: #fff;
}
.tips-modal__lead {
  margin: 0 0 1.2rem;
  color: var(--titanium);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  max-width: 54ch;
}

.tips-story { display: flex; flex-direction: column; gap: 1.3rem; }
.tips-scene__title {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
}
.tips-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tips-card { margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.tips-illu { position: relative; }
.tips-svg {
  width: 100%;
  max-width: 190px;       /* menší ilustrace → celý popup se vejde do okna */
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 14px;
  background: var(--obsidian);
}
.tips-card--bad .tips-svg { box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.4); }
.tips-card--good .tips-svg { box-shadow: inset 0 0 0 1px rgba(46, 204, 113, 0.45); }
.tips-ring { stroke: rgba(0, 0, 0, 0.12); stroke-width: 1.5; }
.tips-margin { stroke: rgba(0, 0, 0, 0.22); stroke-width: 1; stroke-dasharray: 3 4; }
.tips-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.tips-badge--bad { background: #e74c3c; }
.tips-badge--good { background: #2ecc71; }
.tips-card figcaption { font-size: 0.8rem; line-height: 1.4; color: var(--titanium); }
.tips-card figcaption strong { display: block; color: #fff; font-weight: 600; font-size: 0.82rem; margin-bottom: 0.1rem; }

/* nit se „nakreslí" při otevření popupu */
.tips-thread > line { stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tips-modal.is-open .tips-thread > line { animation: tipsThreadDraw 0.8s var(--ease) forwards; }
.tips-modal.is-open .tips-thread > line:nth-child(1) { animation-delay: 0.05s; }
.tips-modal.is-open .tips-thread > line:nth-child(2) { animation-delay: 0.12s; }
.tips-modal.is-open .tips-thread > line:nth-child(3) { animation-delay: 0.19s; }
.tips-modal.is-open .tips-thread > line:nth-child(4) { animation-delay: 0.26s; }
.tips-modal.is-open .tips-thread > line:nth-child(5) { animation-delay: 0.33s; }
.tips-modal.is-open .tips-thread > line:nth-child(6) { animation-delay: 0.40s; }
.tips-modal.is-open .tips-thread > line:nth-child(7) { animation-delay: 0.47s; }
.tips-modal.is-open .tips-thread > line:nth-child(8) { animation-delay: 0.54s; }
.tips-modal.is-open .tips-thread > line:nth-child(9) { animation-delay: 0.61s; }
.tips-modal.is-open .tips-thread > line:nth-child(10) { animation-delay: 0.68s; }
@keyframes tipsThreadDraw { to { stroke-dashoffset: 0; } }

body.tips-modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .tips-pair { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tips-modal.is-open .tips-thread > line { animation: none; stroke-dashoffset: 0; }
  .tips-modal__panel, .tips-modal__backdrop { transition: none; }
}

/* Buttons */
.config__actions { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.4rem; }
/* primary = the single solid cyan CTA on the page */
.btn-primary {
  width: 100%;
  height: 54px;
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: box-shadow 0.3s var(--ease), transform 0.2s var(--ease),
              opacity 0.3s var(--ease);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(0, 229, 255, 0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* secondary order CTA — outlined silver, enables after generate */
.btn-ghost {
  width: 100%;
  height: 54px;
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--silver);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.btn-ghost:hover:not(:disabled) { background: var(--silver); color: #000; }
.btn-ghost:disabled { opacity: 0.3; cursor: not-allowed; border-color: var(--line); color: var(--titanium); }

/* ── Output area ── (rozměry okna řeší sdílené pravidlo #canvas-container,#generateContainer) */
.config__output { display: flex; flex-direction: column; }
/* server preview canvas is injected here by generateImage.js */
#generateContainer canvas {
  display: block;
  max-width: 92%;
  max-height: 90%;
  /* Náhled je čtverec s kruhem na bílém pozadí (foto-algoritmus) — kruhovým
     clipem odřízneme bílé rohy i tenký bílý prstenec, takže okolo nezůstane
     bílé pozadí. Pro režim „z funkce" je deska kreslená jen jako kruh (viz
     render() v stringit.js), takže clip nemá co odříznout. */
  clip-path: circle(48.5% at 50% 50%);
  /* odrazení od stahování: zákaz tažení a výběru (viz initDownloadGuard) */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.output__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--titanium);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  pointer-events: none;
}
/* hide placeholder once a result canvas exists */
#generateContainer:has(#stringArtCanvas) .output__placeholder { display: none; }

/* #progress už není vidět — slouží jen jako kotva, kam generateImage.js /
   stringit.js vkládají <canvas> (insertBefore). Vyúčtování řeší .billing níže. */
.progress-text { display: none; }

/* ── Vyúčtování (profesionální rozpis ceny pod náhledem) ── */
.billing {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 14, 16, 0.9), rgba(8, 8, 9, 0.9));
  padding: 1.2rem 1.3rem;
  font-variant-numeric: tabular-nums;
}
.billing[hidden] { display: none; }
.billing #orderButton { width: 100%; margin-top: 1.1rem; }
.billing__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.billing__title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--titanium);
}
.billing__status { font-size: 0.75rem; color: var(--accent); letter-spacing: 0.04em; }
.billing__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.billing__lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--silver);
}
.billing__lines li span:first-child { color: var(--titanium); font-weight: 300; }
.billing__lines li span:last-child { white-space: nowrap; }
.billing__meta {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem;
  color: var(--titanium);
  letter-spacing: 0.03em;
}
.billing__note { display: block; margin-top: 0.35rem; font-size: 0.72rem; color: var(--titanium); font-style: italic; }
.billing__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(0, 229, 255, 0.35);
}
.billing__total span { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver); }
.billing__total strong {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ── Varianta nákupu (hotový obraz vs. jen posloupnost + doplňky) ── */
.purchase {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
.purchase[hidden] { display: none; }
.purchase__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--titanium);
  margin-bottom: 0.7rem;
}
.purchase__opts { display: flex; flex-direction: column; gap: 0.6rem; }
.purchase__opt {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.purchase__opt:hover { border-color: var(--silver); }
.purchase__opt input { margin-top: 0.2rem; accent-color: var(--accent); flex-shrink: 0; }
.purchase__opt:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.05);
}
.purchase__opt-body { display: flex; flex-direction: column; gap: 0.15rem; }
.purchase__opt-title { font-size: 0.9rem; color: var(--silver); }
.purchase__opt-desc { font-size: 0.76rem; font-weight: 300; color: var(--titanium); line-height: 1.4; }
.purchase__addons {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.purchase__addons[hidden] { display: none; }
.purchase__addons-label {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--titanium);
}
.purchase__addon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--silver);
  cursor: pointer;
}
.purchase__addon input { accent-color: var(--accent); }
.purchase__addon-detail { color: var(--titanium); font-size: 0.8rem; }
.purchase__addon-price { color: var(--titanium); font-variant-numeric: tabular-nums; }

/* ═══ F. FOOTER ═══════════════════════════════════════════════ */
.footer {
  position: relative;
  /* Bez vlastního pozadí — prosvítá dekorativní string-art plátno.
     Oddělení od obsahu nad ní řeší jen jemné dělítko (::before/::after). */
  background: transparent;
  padding-block: clamp(7rem, 12vh, 11rem) 1.5rem;
}
/* Měkký dělící vlas (místo plné tvrdé linky) — uprostřed sytý, na okrajích mizí. */
/* Decentní akcentní záблesk uprostřed dělítka. */
.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: 2.5rem;
}
.footer__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer__brand .nav__logo { width: 30px; height: 30px; }
.footer__brand .nav__wordmark { font-size: 1.05rem; }
.footer__tag {
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--titanium);
  max-width: 32ch;
}
.footer__col-title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--titanium);
  margin-bottom: 1.2rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer__list a, .footer__list span {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--silver);
  transition: color 0.3s var(--ease);
}
.footer__list a:hover { color: var(--accent); }
.footer__social a {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.84rem;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--titanium);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.footer__bottom p { margin: 0; }
.footer__made { color: var(--line); }

/* ═══ E2. MÁTE DOTAZ? / KONTAKT ═══════════════════════════════ */
.help__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.help__title {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  margin: 0 0 1.2rem;
}
.help__text {
  color: var(--titanium);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 46ch;
  margin: 0;
}
.help__contact {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.help__line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  background: var(--obsidian);
  border: 1px solid var(--line);
  color: var(--silver);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
              transform 0.3s var(--ease);
}
a.help__line:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}
.help__line svg {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: var(--accent);
}
.help__line > span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  font-size: 0.98rem;
}
.help__line-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--titanium);
  margin-bottom: 0.15rem;
}
.help__line--static { cursor: default; margin: 0; }

/* ═══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 50% 50%; }
  /* .gallery__grid je auto-fit + center → responzivitu řeší samo, bez přepisu. */
  /* nevejdou-li se 3 sloupce, editor+výstup nahoře, parametry přes celou šířku */
  .config__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config__params { grid-column: 1 / -1; }
  .config__sliders { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  /* odkazy se mění na rozbalovací panel pod hlavičkou */
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 3.5rem) 1.25rem;
    background: #050505;
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease);
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links .nav__link {
    padding: 1rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__links .nav__link:last-child { border-bottom: none; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 1rem);
  }
  .hero__content { margin-inline: auto; max-width: 640px; padding-block: 3rem 1rem; }
  .hero__canvas-wrap { height: 70vw; max-height: 520px; margin-bottom: 3rem; }
  .hero__scroll { display: none; }

  .process__grid { grid-template-columns: 1fr; min-height: 0; }
  .process__left { position: static; }
  .process__right { position: sticky; top: calc(var(--nav-h) + 1rem); margin-top: 2rem; }
  .process__spacer { display: none; }
  /* na mobilu se fáze nečtou scrollytellingem – ukaž je celé pod sebou */
  .steps { height: auto !important; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .steps__track { transform: none !important; }
  .step { opacity: 1; }

  .config__grid { grid-template-columns: 1fr; }
  .help__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand-col { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .config__sliders { grid-template-columns: 1fr; gap: 1.1rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { justify-content: center; text-align: center; }
  .segmented { gap: 0.4rem; }
  .seg { padding: 0.7rem 0.3rem; }
  .seg__main { font-size: 0.9rem; }
  .btn-outline { width: 100%; }
}

/* ════════════ LEGAL / PROSE PAGES (obchodní podmínky, ochrana údajů) ════════════ */
.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 0 5rem;
}
.legal__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.legal h1 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
}
.legal__meta { color: var(--titanium); font-size: 0.85rem; margin: 0 0 2.5rem; }
.legal h2 {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin: 2.6rem 0 0.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1rem; font-weight: 600; margin: 1.6rem 0 0.5rem; color: var(--silver); }
.legal p, .legal li { color: var(--titanium); line-height: 1.75; font-weight: 300; }
.legal p { margin: 0 0 1rem; }
.legal ul, .legal ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal strong { color: var(--silver); font-weight: 500; }
.legal a { color: var(--accent); }
.legal .legal__note {
  border: 1px solid var(--line);
  background: rgba(0, 229, 255, 0.04);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.92rem;
}
.legal .legal__placeholder {
  background: rgba(255, 200, 0, 0.12);
  color: #ffd23f;
  padding: 0 0.35em;
  border-radius: 3px;
  font-weight: 500;
}
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
  color: var(--titanium);
  font-size: 0.9rem;
}
.legal__back:hover { color: var(--silver); }

/* ════════════ COOKIE CONSENT BANNER ════════════ */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 200;
  width: min(1080px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: nowrap;
  padding: 1rem 1.4rem;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.98);
  /* žádný backdrop-filter: pozadí je téměř neprůhledné (blur byl skoro neviditelný),
     ale přepočítával se při každém scroll-framu, dokud lišta svítí → zdroj sekání. */
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.cookie-bar[hidden] { display: none; }
.cookie-bar__text { flex: 1 1 auto; font-size: 0.85rem; line-height: 1.6; color: var(--titanium); margin: 0; }
.cookie-bar__text a { color: var(--accent); }
.cookie-bar__actions { display: flex; gap: 0.7rem; flex-wrap: nowrap; flex: 0 0 auto; }
.cookie-bar .btn-ghost, .cookie-bar .btn-primary { padding: 0.6rem 1.1rem; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 560px) {
  .cookie-bar { flex-direction: column; align-items: stretch; }
  .cookie-bar__actions { justify-content: stretch; }
  .cookie-bar__actions button { flex: 1; }
}

/* ════════════ CHECKOUT MODAL ════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(3, 3, 4, 0.72);
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 16, 18, 0.98), rgba(9, 9, 10, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 1.8rem;
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--silver);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { border-color: var(--silver); }
.modal__title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 1.3rem;
}
.checkout__recap {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.checkout__recap li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--titanium);
}
.checkout__recap li span:first-child { font-weight: 300; }
.checkout__recap li.is-total {
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line-soft);
  color: var(--silver);
  font-size: 1rem;
}
.checkout__recap li.is-total span:last-child { font-weight: 600; }
.checkout__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin-bottom: 1.4rem;
}
.field__input, .field__select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--silver);
  font: inherit;
  font-size: 0.92rem;
}
.field__input:focus, .field__select:focus {
  outline: none;
  border-color: var(--accent);
}
.field--full { grid-column: 1 / -1; }
.field > .field__label { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; color: var(--titanium); }
.checkout__error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  min-height: 1.1em;
}
.checkout__submit { width: 100%; }
@media (max-width: 560px) {
  .checkout__grid { grid-template-columns: 1fr; }
}

/* ════════════ MINI-KOŠÍK POPUP (po přidání) ════════════ */
.minicart { animation: minicartFade 0.26s var(--ease) both; }
.minicart .minicart__dialog {
  width: min(404px, 100%);
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  animation: minicartPop 0.42s var(--ease) both;
}
@keyframes minicartFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes minicartPop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.minicart .modal__close {
  top: 0.85rem;
  right: 0.85rem;
  border-color: transparent;
  color: var(--titanium);
}
.minicart .modal__close:hover { border-color: var(--line); color: var(--silver); }

/* hlavička – potvrzovací pruh */
.minicart__added {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 1.4rem 1.6rem 1.25rem;
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--silver);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.09), rgba(0, 229, 255, 0));
  border-bottom: 1px solid var(--line);
}
.minicart__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #050505;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 0 0 5px rgba(0, 229, 255, 0.14);
  animation: minicartCheck 0.5s var(--ease) 0.12s both;
}
@keyframes minicartCheck {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); }
}

/* produktový řádek */
.minicart__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.6rem;
}
.minicart__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center;
  /* Náhled má bílé pozadí kolem kruhu — kruhovým clipem odřízneme bílé rohy. */
  clip-path: circle(48.5% at 50% 50%);
  flex-shrink: 0;
}
.minicart__meta { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.minicart__name { font-size: 0.95rem; font-weight: 500; color: var(--silver); line-height: 1.3; }
.minicart__sub { font-size: 0.82rem; font-weight: 300; color: var(--titanium); }

/* souhrn */
.minicart__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0 1.6rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.minicart__count { font-size: 0.86rem; font-weight: 300; color: var(--titanium); }
.minicart__sum {
  font-family: "Syne", sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--silver);
}
.minicart__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.6rem 1.5rem;
}
.minicart__actions .btn-primary,
.minicart__actions .btn-ghost {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ════════════ STRÁNKA KOŠÍKU (kosik.html) ════════════ */
.cart-page { padding: 7rem 0 5rem; min-height: 70vh; }
.cart-page__title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 2rem;
}
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.cart-item__thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  object-position: center;
  /* Náhled je čtverec s kruhem na bílém pozadí — kruhovým clipem o něco menším
     než vepsaný kruh odřízneme bílé rohy i tenký bílý prstenec u okraje. */
  clip-path: circle(48.5% at 50% 50%);
}
img.cart-item__thumb { cursor: zoom-in; transition: transform 0.2s var(--ease); }
img.cart-item__thumb:hover { transform: scale(1.04); }
img.cart-item__thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Lightbox náhledu položky ── */
.cart-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(2, 2, 3, 0.86);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s var(--ease);
}
.cart-lightbox.is-open { opacity: 1; visibility: visible; }
.cart-lightbox__img {
  max-width: min(86vw, 86vh);
  max-height: min(86vw, 86vh);
  width: auto;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.22s var(--ease);
}
.cart-lightbox.is-open .cart-lightbox__img { transform: scale(1); }
.cart-lightbox__close {
  position: absolute;
  top: max(1.2rem, 3vmin);
  right: max(1.2rem, 3vmin);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.7);
  color: var(--silver);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cart-lightbox__close:hover { color: var(--accent); border-color: var(--accent); }
body.cart-lightbox-open { overflow: hidden; }
.cart-item__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--titanium);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0b0b0c;
  clip-path: none;
}
.cart-item__info { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.cart-item__name { font-size: 1rem; color: var(--silver); }
.cart-item__attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--titanium);
}
.cart-item__swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--line);
  vertical-align: -1px;
  margin-right: 0.35rem;
}
.cart-item__edit {
  align-self: flex-start;
  margin-top: 0.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  color: var(--titanium);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cart-item__edit:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.cart-item__addons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cart-addon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.5rem 0.22rem 0.65rem;
  font-size: 0.76rem;
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.cart-addon--on {
  background: rgba(0, 229, 255, 0.06);
}
.cart-addon--add {
  font: inherit;
  font-size: 0.76rem;
  padding: 0.22rem 0.65rem;
  color: var(--titanium);
  background: none;
  border-style: dashed;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
              background 0.2s var(--ease);
}
.cart-addon--add:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.06);
}
.cart-addon__plus {
  font-size: 0.95rem;
  line-height: 1;
}
.cart-addon__price {
  color: var(--titanium);
  font-variant-numeric: tabular-nums;
}
.cart-addon--add:hover .cart-addon__price { color: var(--accent); }
.cart-addon__rm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--titanium);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.cart-addon__rm:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}
.cart-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}
.cart-item__price { font-size: 1rem; font-weight: 600; color: var(--silver); font-variant-numeric: tabular-nums; }
.cart-item__controls { display: flex; align-items: center; gap: 0.6rem; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.cart-qty__btn {
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  color: var(--silver);
  font-size: 1rem;
  cursor: pointer;
}
.cart-qty__btn:hover { color: var(--accent); }
.cart-qty__val {
  min-width: 32px;
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.cart-item__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--titanium);
  cursor: pointer;
  padding: 0;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease);
}
.cart-item__remove svg { display: block; }
.cart-item__remove:hover {
  color: #ff6b6b;
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
}
.cart-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--titanium);
}
.cart-empty p { margin: 0 0 1.5rem; font-weight: 300; }
.cart-summary {
  position: sticky;
  top: 6rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 16, 18, 0.7), rgba(9, 9, 10, 0.7));
  padding: 1.6rem;
}
.cart-summary__title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 1.2rem;
}
.cart-summary__lines { list-style: none; margin: 0 0 1.2rem; padding: 0; font-variant-numeric: tabular-nums; }
.cart-summary__lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--titanium);
}
.cart-summary__lines li.is-total {
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  color: var(--silver);
}
.cart-summary__lines li.is-total span:last-child { font-weight: 600; }
.cart-checkout { margin-top: 1.4rem; }
.cart-checkout[hidden] { display: none; }
.cart-checkout__title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 1rem;
}
@media (max-width: 880px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 520px) {
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item__thumb { width: 64px; height: 64px; }
  .cart-item__right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ════════════ FIKTIVNÍ PLATEBNÍ BRÁNA (platba.html) ════════════ */
.pay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.pay__card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 16, 18, 0.98), rgba(9, 9, 10, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 2.2rem;
  text-align: center;
}
.pay__card[hidden] { display: none; }
.pay__demo {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.25rem 0.6rem;
  margin: 0 0 1.4rem;
}
.pay__logo, .pay__check { display: flex; justify-content: center; margin-bottom: 1rem; }
.pay__title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.pay__order { color: var(--titanium); font-size: 0.9rem; margin: 0 0 1.2rem; }
.pay__order strong { color: var(--silver); font-variant-numeric: tabular-nums; }
.pay__amount {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  margin: 0 0 1.4rem;
  font-variant-numeric: tabular-nums;
}
.pay__recap {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.85rem;
}
.pay__recap li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; color: var(--titanium); }
.pay__actions { display: flex; flex-direction: column; gap: 0.7rem; }
.pay__msg { color: var(--titanium); line-height: 1.7; font-weight: 300; margin: 0 0 1.6rem; }
.pay__note { color: var(--titanium); font-size: 0.78rem; font-style: italic; margin: 1.2rem 0 0; }

/* ════════════ Ochrana obrázků a náhledů ════════════
   Zabraňuje snadnému přetažení/uložení fotek z galerie, hero porovnání,
   procesního plátna i vygenerovaného string-art náhledu. (Není to DRM —
   screenshot nelze zakázat — jen to ztíží běžné „uložit obrázek".) */
.compare__img, .piece__photo, #stringArtCanvas, #processCanvas, #canvas-container canvas {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;   /* iOS: žádné „uložit obrázek" podržením */
  pointer-events: none;          /* nelze označit/přetáhnout; overlay řeší hover přes rodiče */
}
/* Editor plátno potřebuje myš (pan/zoom) — necháme jen ochranu proti tažení/výběru. */
#canvas-container canvas { pointer-events: auto; }
