/* Pickle Brick — veřejný web (statický, generuje site_build.py).
   Paleta: okurková zelená jako značka + pastelová fialová/tyrkys/růžová
   (barvy uživatele), světlý „papírový" podklad, tmavý režim přes
   prefers-color-scheme i ruční přepínač (data-theme na <html>). */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --ink: #17161c;
  --ink-2: #3b3946;
  --muted: #6b6878;
  --line: #e4e0d6;
  --brand: #2f9e5b;
  --brand-ink: #0f5130;
  --brand-soft: #ddf3e4;
  --violet: #6f4fd0;
  --violet-soft: #ece6fb;
  --teal: #0f8f8f;
  --teal-soft: #dcf3f2;
  --pink: #d2457d;
  --pink-soft: #fce4ee;
  --amber: #b97a06;
  --amber-soft: #fdf0d5;
  --red: #d93636;
  --red-soft: #fde5e3;
  --shadow: 0 1px 2px rgba(23, 22, 28, .05), 0 8px 24px -12px rgba(23, 22, 28, .18);
  --shadow-lift: 0 2px 4px rgba(23, 22, 28, .06), 0 18px 40px -16px rgba(23, 22, 28, .28);
  --radius: 18px;
  --img-blend: multiply;
  /* pozadí obrázků — světlé pastely i v tmavém režimu (BL rendery mají bílé pozadí) */
  --tint-0: #ece6fb;
  --tint-1: #dcf3f2;
  --tint-2: #fce4ee;
  --tint-3: #ddf3e4;
  --tint-4: #fdf0d5;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121117;
    --surface: #1b1a22;
    --surface-2: #24222d;
    --ink: #f2f0f7;
    --ink-2: #d6d3e0;
    --muted: #a29eb2;
    --line: #2e2b38;
    --brand: #5bd08a;
    --brand-ink: #b9f0cf;
    --brand-soft: rgba(91, 208, 138, .14);
    --violet: #b39dff;
    --violet-soft: rgba(179, 157, 255, .14);
    --teal: #5fd6d2;
    --teal-soft: rgba(95, 214, 210, .13);
    --pink: #ff8fb8;
    --pink-soft: rgba(255, 143, 184, .14);
    --amber: #f2c25b;
    --amber-soft: rgba(242, 194, 91, .14);
    --red: #ff7a72;
    --red-soft: rgba(255, 122, 114, .15);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .75);
    --img-blend: multiply;
    --tint-0: #d9d1f0;
    --tint-1: #cde6e4;
    --tint-2: #efd6e1;
    --tint-3: #d0e6d7;
    --tint-4: #eee2c6;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121117;
  --surface: #1b1a22;
  --surface-2: #24222d;
  --ink: #f2f0f7;
  --ink-2: #d6d3e0;
  --muted: #a29eb2;
  --line: #2e2b38;
  --brand: #5bd08a;
  --brand-ink: #b9f0cf;
  --brand-soft: rgba(91, 208, 138, .14);
  --violet: #b39dff;
  --violet-soft: rgba(179, 157, 255, .14);
  --teal: #5fd6d2;
  --teal-soft: rgba(95, 214, 210, .13);
  --pink: #ff8fb8;
  --pink-soft: rgba(255, 143, 184, .14);
  --amber: #f2c25b;
  --amber-soft: rgba(242, 194, 91, .14);
  --red: #ff7a72;
  --red-soft: rgba(255, 122, 114, .15);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .75);
  --img-blend: multiply;
  --tint-0: #d9d1f0;
  --tint-1: #cde6e4;
  --tint-2: #efd6e1;
  --tint-3: #d0e6d7;
  --tint-4: #eee2c6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* [hidden] musí vyhrát nad display: flex/grid u karet a řádků (filtr nabídky) */
[hidden] { display: none !important; }
/* tap-highlight: Chrome na Androidu jinak při tapnutí kreslí modrý obdélník,
   Safari šedý; odezvu na dotyk dává :active níž */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
@media (hover: none) {
  a:active, button:active, summary:active, label:active { opacity: .72; }
}

h1, h2, h3, .display {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- hlavička ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo span { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.28rem; letter-spacing: -0.03em; }
.logo b { color: var(--brand); font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 999px;
  font-weight: 500; font-size: .95rem; color: var(--ink-2); white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer; font-size: 1rem;
}
.menu-btn { display: none; }
/* Tři čárky v barvách palety. Po kliknutí se každá rozletí jiným směrem a složí se do křížku
   (prostřední odletí doprava a zmizí); při zavření totéž pozpátku. Koncový stav je i ve
   statických pravidlech, aby seděl při vypnutých animacích (prefers-reduced-motion). */
.menu-btn span {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 2.5px; margin: -1.25px 0 0 -8px;
  border-radius: 2px; pointer-events: none;
}
/* Čárky menu mají vlastní neonové barvy (přání 2026-11-11), ne pastelové --violet/--pink/--teal.
   site.js při každém kliknutí posune barvy o jednu (--mb-1..3), takže křížek má pokaždé jinou dvojici. */
.menu-btn { --mb-1: #bc13fe; --mb-2: #ff1f8f; --mb-3: #00e5d8; }
.menu-btn span:nth-child(1) { background: var(--mb-1); transform: translateY(-5.5px); }
.menu-btn span:nth-child(2) { background: var(--mb-2); }
.menu-btn span:nth-child(3) { background: var(--mb-3); transform: translateY(5.5px); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); animation: mb-open-1 .5s cubic-bezier(.3, .7, .3, 1) both; }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateX(9px) scaleX(.3); opacity: 0; animation: mb-open-2 .5s cubic-bezier(.3, .7, .3, 1) both; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); animation: mb-open-3 .5s cubic-bezier(.3, .7, .3, 1) both; }
.menu-btn.used[aria-expanded="false"] span:nth-child(1) { animation: mb-close-1 .45s cubic-bezier(.3, .7, .3, 1) both; }
.menu-btn.used[aria-expanded="false"] span:nth-child(2) { animation: mb-close-2 .45s cubic-bezier(.3, .7, .3, 1) both; }
.menu-btn.used[aria-expanded="false"] span:nth-child(3) { animation: mb-close-3 .45s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes mb-open-1 {
  0% { transform: translateY(-5.5px); }
  45% { transform: translate(-5px, -9px) rotate(-20deg); }
  100% { transform: rotate(45deg); }
}
@keyframes mb-open-2 {
  0% { transform: none; opacity: 1; }
  45% { transform: translateX(6px) rotate(14deg); opacity: 1; }
  100% { transform: translateX(9px) scaleX(.3); opacity: 0; }
}
@keyframes mb-open-3 {
  0% { transform: translateY(5.5px); }
  45% { transform: translate(-4px, 9px) rotate(18deg); }
  100% { transform: rotate(-45deg); }
}
@keyframes mb-close-1 {
  0% { transform: rotate(45deg); }
  55% { transform: translate(-5px, -9px) rotate(-20deg); }
  100% { transform: translateY(-5.5px); }
}
@keyframes mb-close-2 {
  0% { transform: translateX(9px) scaleX(.3); opacity: 0; }
  55% { transform: translateX(6px) rotate(14deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes mb-close-3 {
  0% { transform: rotate(-45deg); }
  55% { transform: translate(-4px, 9px) rotate(18deg); }
  100% { transform: translateY(5.5px); }
}
.lang-switch {
  display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); flex: none;
}
.lang-switch a {
  text-decoration: none; padding: 5px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { background: var(--brand); color: #fff; }

/* 940 px: pod touto šířkou se EN menu nevejde na řádek (tablet na výšku) */
@media (max-width: 940px) {
  .site-header .wrap { gap: 12px; }
  .lang-switch { margin-left: auto; }
  .menu-btn {
    display: inline-grid; place-items: center;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    width: 38px; height: 38px; border-radius: 999px; font-size: 1.1rem; cursor: pointer;
    position: relative; flex: none;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
  /* LEGO „nopky" — jemný vzor, mizí směrem dolů */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at center, var(--brand-soft) 0 9px, transparent 10px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-ink); background: var(--brand-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36rem; margin: 20px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-size: .98rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; }
.stat b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: .9rem; }

.hero-stack { position: relative; height: 380px; }
.hero-stack .tile {
  position: absolute; width: 58%; aspect-ratio: 1; border-radius: 24px;
  background: var(--surface); box-shadow: var(--shadow-lift); padding: 18px;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.hero-stack .tile img { max-height: 100%; object-fit: contain; mix-blend-mode: var(--img-blend); }
.hero-stack .t1 { left: 0; top: 30px; transform: rotate(-6deg); background: var(--tint-0); }
.hero-stack .t2 { right: 0; top: 0; transform: rotate(5deg); background: var(--tint-1); }
.hero-stack .t3 { left: 22%; bottom: 0; transform: rotate(-1deg); background: var(--tint-2); z-index: 2; }

@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-stack { height: 260px; max-width: 420px; }
  .stats { gap: 20px; }
  .stat b { font-size: 1.6rem; }
}

/* ---------- sekce ---------- */
section.block { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 40rem; }
.link-more { font-weight: 600; text-decoration: none; color: var(--brand-ink); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------- karty setů ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card .media {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--tint, var(--surface-2));
}
/* absolutně: fotka na výšku jinak natáhne kartu přes poměr 4:3 */
.card .media img {
  position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px);
  object-fit: contain; mix-blend-mode: var(--img-blend);
}
.card .media.photo img { inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
/* šipky ‹ › na kartě s více fotkami (nad odkazem přes celou kartu) */
.card .ph-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; background: rgba(0, 0, 0, .42); color: #fff;
  opacity: .8; transition: opacity .15s, background .15s;
}
.card .ph-nav svg { width: 16px; height: 16px; }
.card .ph-nav.prev { left: 8px; }
.card .ph-nav.prev svg { transform: scaleX(-1); }
.card .ph-nav.next { right: 8px; }
.card .ph-nav:hover, .card .ph-nav:focus-visible { opacity: 1; background: rgba(0, 0, 0, .65); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }   /* celá karta klikací */
/* popisek lotu z BrickLinku: max 3 řádky, celý text v title */
.card .desc {
  margin: 0; font-size: .82rem; line-height: 1.4; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .row { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.price small { font-family: "Inter", sans-serif; font-weight: 500; font-size: .75rem; color: var(--muted); display: block; letter-spacing: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip.new { background: var(--brand-soft); color: var(--brand-ink); }
.chip.used { background: var(--violet-soft); color: var(--violet); }
.chip.retired { background: var(--ink); color: var(--bg); }
.chip.ending { background: var(--pink-soft); color: var(--pink); }
.chip.up { background: var(--teal-soft); color: var(--teal); }
.chip.down { background: var(--pink-soft); color: var(--pink); }
.badge-corner { position: absolute; top: 12px; left: 12px; z-index: 1; }
/* štítek přes obrázek: plná barva, ať je čitelný na každém pastelu */
.chip.ending.badge-corner { background: #d2457d; color: #fff; }

img.img-failed { visibility: hidden; }   /* nenačtený obrázek: bez rozbité ikony, zůstane podklad (site.js rescue) */
.channels { display: flex; gap: 6px; position: relative; z-index: 2; }
.ch {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-size: .72rem; font-weight: 800; text-decoration: none; color: #fff;
}
.ch.bricklink { background: #0b62b6; }
.ch.vinted { background: #0a8b8b; }
.ch.bazos { background: #e06a00; }
.ch.facebook { background: #1877f2; }

/* hodnocení „signálu" jako kostičky */
.bricks { display: inline-flex; gap: 3px; vertical-align: middle; }
.bricks i {
  width: 14px; height: 9px; border-radius: 2px; background: var(--line); position: relative;
}
.bricks i::before {
  content: ""; position: absolute; left: 3px; top: -3px; width: 8px; height: 3px;
  border-radius: 2px 2px 0 0; background: inherit;
}
.bricks i.on { background: var(--brand); }
.signal { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 500; }

/* ---------- filtry ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px; margin-bottom: 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.toolbar input[type=search], .toolbar select {
  font: inherit; font-size: .92rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; min-width: 0;
}
.toolbar input[type=search] { flex: 1 1 220px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button {
  font: inherit; font-size: .88rem; font-weight: 600; border: 0; background: transparent; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.count { margin-left: auto; color: var(--muted); font-size: .88rem; }
.reset {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--red); background: var(--red-soft); border: 1px solid transparent; border-radius: 999px;
  padding: 7px 13px 7px 9px; cursor: pointer;
}
.reset[hidden] { display: none; }
.reset svg { width: 18px; height: 18px; flex: none; }
.reset:hover { border-color: var(--red); }
.reset:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0 0; }
.more .note { font-size: .85rem; color: var(--muted); }
section.block.home-channels { padding: 40px 0 8px; }

/* ---------- tabulka ---------- */
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th {
  position: sticky; top: 0; background: var(--surface-2); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-weight: 600; cursor: pointer; user-select: none;
}
table.data th[aria-sort="ascending"]::after { content: " ↑"; }
table.data th[aria-sort="descending"]::after { content: " ↓"; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.name { white-space: normal; min-width: 220px; }
table.data td.name a { font-weight: 600; text-decoration: none; }
table.data td.name a:hover { text-decoration: underline; }
/* bez mix-blend-mode: obrázek s vlastním podkladem by se násobil s tmavým řádkem
   tabulky a v tmavém režimu zčernal; rendery mají bílé pozadí → bílý podklad */
table.data .thumb { width: 78px; height: 60px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
table.data .thumb-empty { display: inline-block; background: var(--tint-0); opacity: .5; }
/* Úzký displej: tabulka „Končí v prodeji“ měla 960 px a bylo vidět jen název. Zůstává
   Set, Signál a Trh; konec prodeje se přesune pod název (.narrow-only), náhled,
   trend a prodeje se skryjí — jsou na detailu setu. */
.narrow-only { display: none; }
@media (max-width: 700px) {
  #ret-table th:nth-child(1), #ret-table td:nth-child(1),
  #ret-table th:nth-child(3), #ret-table td:nth-child(3),
  #ret-table th:nth-child(n+6), #ret-table td:nth-child(n+6) { display: none; }
  table.data th, table.data td { padding: 10px 8px; }
  table.data td.name { min-width: 0; }
  table.data td.num, table.data th.num { white-space: normal; }
  .narrow-only { display: inline; }
}

/* ---------- detail setu ---------- */
/* zelená šipka zpět na detailu setu: fixed, takže jede s obrazovkou dolů.
   Na širokém displeji v levém okraji svisle uprostřed, jinak plovoucí vlevo dole. */
.back-fab {
  position: fixed; z-index: 15; left: 16px; bottom: 20px;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px;
  background: var(--brand); color: var(--bg); box-shadow: var(--shadow);
  transition: transform .15s ease, filter .15s ease;
}
.back-fab svg { width: 28px; height: 28px; }
.back-fab:hover { transform: translateX(-3px); filter: brightness(1.08); }
.back-fab:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 3px; }
@media (min-width: 1380px) {
  .back-fab { left: calc((100vw - 1200px) / 2 - 84px); top: 50%; bottom: auto; width: 60px; height: 60px;
              transform: translateY(-50%); }
  .back-fab:hover { transform: translate(-3px, -50%); }
}
.crumbs { font-size: .88rem; color: var(--muted); padding: 24px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px 0 16px; align-items: start; }
.detail .gallery {
  position: relative; overflow: hidden; background: var(--tint, var(--surface-2));
  border-radius: 24px; aspect-ratio: 4 / 3; border: 1px solid var(--line);
}
.detail .gallery img {
  position: absolute; inset: 28px; width: calc(100% - 56px); height: calc(100% - 56px);
  object-fit: contain; mix-blend-mode: var(--img-blend);
}
.detail .gallery.photo img { inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
/* ---------- galerie fotek + lightbox ---------- */
.gallery-wrap { display: grid; gap: 10px; }
.credit { margin: 0; font-size: .78rem; color: var(--muted); }
.credit a { color: inherit; }
.detail .gallery[data-zoom] { display: block; cursor: zoom-in; }
.photo-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: .78rem; font-weight: 600;
}
.zoom-hint {
  position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.1rem;
  opacity: .85; transition: opacity .15s;
}
.gallery[data-zoom]:hover .zoom-hint { opacity: 1; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs .thumb-btn.catalog { background: #fff; }
.thumbs .thumb-btn.catalog img { object-fit: contain; padding: 4px; }
.thumb-btn {
  flex: none; width: 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--surface-2); opacity: .7; transition: opacity .15s, border-color .15s;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn:hover { opacity: 1; }
.thumb-btn[aria-current] { border-color: var(--brand); opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 8, 10, .94); color: #fff; }
.lb-stage { position: absolute; inset: 0 0 52px; display: grid; place-items: center; overflow: hidden; }
.lb-stage img { max-width: calc(100vw - 32px); max-height: calc(100vh - 84px); object-fit: contain; cursor: zoom-in; user-select: none; }
.lb-stage.zoomed { overflow: auto; place-items: start; }
.lb-stage.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-btn {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: 14px; right: 14px; font-size: 1.2rem; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px; display: flex; align-items: center; gap: 16px;
  padding: 0 16px; font-size: .85rem; color: rgba(255, 255, 255, .8);
}
.lb-hint { flex: 1; }
.lb-orig { color: #fff; }
@media (max-width: 760px) { .lb-hint { display: none; } .lb-bar { justify-content: space-between; } }
.card .media .photo-count { right: 10px; bottom: 10px; }
.detail h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 10px 0 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 20px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.fact b { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.fact small { display: block; margin-top: 2px; font-size: .75rem; color: var(--muted); }
/* orientační přepočet na eura pod cenou v Kč */
.buy-row b { text-align: right; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel h2 { font-size: 1.25rem; margin-bottom: 12px; }
.buy { border: 2px solid var(--brand); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); }
.buy-list { display: grid; gap: 8px; margin-top: 12px; }
.buy-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.buy-row:hover { border-color: var(--brand); }
.buy-row .grow { flex: 1; }
.buy-row .lot-desc { display: block; margin-top: 4px; font-size: .82rem; line-height: 1.45; color: var(--ink-2); }
.buy-row b { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.1rem; }
.reasons { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.reasons li { display: flex; gap: 10px; align-items: baseline; }
.reasons li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); transform: translateY(-1px); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.chart .legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.note { font-size: .82rem; color: var(--muted); }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- kanály (kde nakoupit) ---------- */
.channel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.channel-card {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.channel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
/* color: jinak by písmeno přebarvilo obecné `.channel-card span` níž (šedá na barevném čtverečku) */
.channel-card .ch { width: 42px; height: 42px; border-radius: 12px; font-size: .9rem; color: #fff; }
.channel-card b { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.2rem; }
.channel-card span { color: var(--muted); font-size: .9rem; }

/* ---------- text (Jak počítáme, O mně) ---------- */
.prose { max-width: 46rem; padding: 32px 0 48px; }
.prose h1 { margin-bottom: 18px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.callout { background: var(--amber-soft); border-radius: 14px; padding: 14px 18px; color: var(--ink-2); }

/* ---------- patička ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding: 40px 0; }
.site-footer h4 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.site-footer p, .site-footer li { font-size: .9rem; color: var(--ink-2); margin: 0 0 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: .78rem; color: var(--muted); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 20px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .menu-btn span { animation: none !important; }
}

/* ---------- moje položka bez vlastní fotky ---------- */
.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background-color: var(--tint, var(--surface-2));
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, .55) 0 7px, transparent 8px);
  background-size: 26px 26px;
  color: #1b1a22;
}
.placeholder .ph-no {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1;
  background: rgba(255, 255, 255, .7); padding: 6px 14px; border-radius: 12px;
}
.placeholder .ph-note { font-size: .78rem; font-weight: 600; opacity: .65; text-transform: uppercase; letter-spacing: .08em; }
.detail .gallery.placeholder .ph-no { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero-stack .tile.photo { padding: 0; overflow: hidden; }
.hero-stack .tile.photo img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }

/* ---------- odkaz na BrickLink obchod (úvodní stránka, nahoře) ---------- */
.store-banner {
  background: linear-gradient(90deg, var(--brand-soft), var(--teal-soft));
  border-bottom: 1px solid var(--line);
}
.store-banner .wrap { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.store-banner .ch { width: 40px; height: 40px; border-radius: 12px; font-size: .9rem; flex: none; }
.store-banner p { margin: 0; flex: 1; color: var(--ink-2); font-size: .98rem; }
.store-banner p b { color: var(--ink); }
.store-banner .btn { white-space: nowrap; padding: 10px 18px; }
@media (max-width: 760px) {
  .store-banner .wrap { flex-wrap: wrap; gap: 10px; }
  .store-banner p { flex-basis: calc(100% - 56px); font-size: .92rem; }
  .store-banner .btn { width: 100%; }
}

/* ---------- výkup: formulář „Chci prodat / vyměnit LEGO“ (assets/sell.js) ---------- */
.sell { padding: 40px 0 56px; }
.sell-head { max-width: 44rem; margin-bottom: 28px; }
.sell-head .eyebrow { margin-bottom: 14px; }
.sell-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 14px; }
.sell-head .lead { font-size: 1.1rem; color: var(--ink-2); margin: 0; }
/* podmínky jsou v HTML první (na mobilu nad formulářem), na desktopu vpravo */
.sell-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sell-terms { grid-column: 2; grid-row: 1; position: sticky; top: 92px; margin: 0; }
.sell-terms .reasons { gap: 12px; }
.sell-terms .note { margin: 14px 0 0; }
.sell-form, .sell-done { grid-column: 1; grid-row: 1; margin: 0; }
.sell-form { display: grid; gap: 22px; padding: 24px; }
.sell-done { padding: 32px 24px; }
.sell-done p { color: var(--ink-2); margin: 0 0 18px; }
@media (max-width: 900px) {
  .sell-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sell-terms, .sell-form, .sell-done { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 560px) {
  .sell { padding: 28px 0 40px; }
  .sell-form { padding: 18px 16px; gap: 20px; }
}

.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 600; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;   /* 16px písmo: iOS nepřibližuje */
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--brand); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--pink); }
.field ::placeholder { color: var(--muted); opacity: .8; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hint { margin: 0; font-size: .82rem; color: var(--muted); }
.err { margin: 0; font-size: .86rem; font-weight: 600; color: var(--pink); }

/* přepínače = skutečné radio inputy pod popiskem (klávesnice i čtečky fungují) */
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.choice.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .choice.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice label { position: relative; display: block; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink-2); font-weight: 600; font-size: .92rem; line-height: 1.25;
}
.choice input:hover + span { border-color: var(--muted); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.photo-list li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.photo-list img { width: 100%; height: 100%; object-fit: cover; }
.photo-list button {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, .68); color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.photo-list li.photo-add { background: none; overflow: visible; }
.photo-add label {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; text-align: center; padding: 6px;
  border: 2px dashed var(--line); border-radius: 12px; background: var(--bg);
  color: var(--muted); font-size: .82rem; font-weight: 600; line-height: 1.25; cursor: pointer;
}
.photo-add label b { font-size: 1.5rem; line-height: 1; font-weight: 500; }
.photo-add label:hover { border-color: var(--brand); color: var(--brand-ink); }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-add label:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot proti robotům */
.sell-form .submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.sell-form .submit .btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.form-status { margin: 0; font-size: .92rem; color: var(--muted); flex: 1 1 220px; }
.form-status.bad { color: var(--pink); font-weight: 600; }
.sell-form .legal-note { margin: 0; font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) { .sell-form .submit .btn { width: 100%; } }

/* Stránka slevy ze záložky (diky-5iuyrn.html) */
.thanks { padding-bottom: 8px; }
.thanks-code { margin: 18px 0 28px; }
.thanks-code span {
  display: inline-block; padding: 14px 26px; border-radius: 14px;
  background: var(--violet-soft); color: var(--violet); border: 2px dashed var(--violet);
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: .08em; user-select: all;
}
