/* PIKOMAT – společný styl webu.
   Layout: black-and-white π brand with oversized type ("π-KOMAT" wordmark), a floating pill nav,
   bento tiles for the current year, one inverted ink band per page and a running band of π digits.
   Forest green is Pikomat's own colour (bands, tiles, small accents); the year's theme (assets/tema.js) adds one more. */
:root {
  --bg: #f3f4ef;
  --surface: #ffffff;
  --ink: #121316;
  --muted: #646a66;
  --line: #e0e3da;
  --line-strong: #c4c9bd;
  --forest: #1f3b2b;          /* barva Pikomatu: les */
  --on-forest: #eef3ea;
  --leaf: #2e7a4b;            /* svěží zelená na drobnosti */
  --moss: #e2ebdc;            /* jemný zelený podklad */
  --warm: #f2b33d;            /* táborák a hvězdy */
  --water: #5f9cc4;
  --fire: #d9772b;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --accent: #121316;          /* tema.js přepíše barvou ročníku */
  --ok: #2f7a4c;
  --warn: #9a5a17;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(18, 19, 22, .04), 0 8px 24px -12px rgba(18, 19, 22, .12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f0e; --surface: #161a17; --ink: #ecede7; --muted: #9ba39d; --line: #252a26; --line-strong: #39403a;
    --forest: #1a3324; --on-forest: #e6efe3; --leaf: #7cc795; --moss: #1b261e; --warm: #f2b947; --fire: #e8853a; --water: #5a92b8;
    --accent: #ecece8; --ok: #6fc391; --warn: #e3a062; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f0e; --surface: #161a17; --ink: #ecede7; --muted: #9ba39d; --line: #252a26; --line-strong: #39403a;
  --forest: #1a3324; --on-forest: #e6efe3; --leaf: #7cc795; --moss: #1b261e; --warm: #f2b947; --fire: #e8853a; --water: #5a92b8;
  --accent: #ecece8; --ok: #6fc391; --warn: #e3a062; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.sel { user-select: all; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Brand ---------- */
.pi { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font: italic 600 19px/1 var(--serif); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--sans); letter-spacing: .1em; padding: 4px 8px 4px 4px; }

/* ---------- Floating nav ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding-top: 12px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 9px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav a.cta { color: var(--bg); background: var(--ink); margin-left: 4px; }
.mode { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.mode:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.mode svg { width: 18px; height: 18px; }
@media (max-width: 620px) {
  .bar { border-radius: 24px; }
  .nav { width: 100%; justify-content: space-between; order: 3; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 18px; font: 500 13px/1.4 var(--mono); color: var(--leaf); letter-spacing: .02em; }
.display { margin: 0; font: 650 clamp(48px, 9vw, 120px)/.9 var(--sans); letter-spacing: -.055em; }
.h2 { margin: 0; font: 650 clamp(32px, 5vw, 56px)/1 var(--sans); letter-spacing: -.045em; }
.h3 { margin: 0; font: 600 19px/1.3 var(--sans); letter-spacing: -.015em; }
.lede { margin: 22px 0 0; max-width: 34em; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; color: var(--muted); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 44em; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border: 0; cursor: pointer; border-radius: 999px; padding: 15px 26px; font: 600 16px/1 var(--sans); background: var(--ink); color: var(--bg); transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.btn .arr { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Reveal on scroll (only where supported; content is visible without it) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: .001; transform: translateY(36px) scale(.98); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 56px); }
.mega { margin: 0; display: flex; align-items: center; gap: .02em; font: 750 clamp(64px, 17vw, 196px)/.82 var(--sans); letter-spacing: -.065em; white-space: nowrap; }
.mega .pi-big { position: relative; display: inline-grid; place-items: center; width: .82em; height: .82em; margin-right: .06em; border-radius: 50%; background: var(--ink); color: var(--bg); font: italic 600 .62em/1 var(--serif); letter-spacing: 0; flex: none; }
.mega .pi-big span { transform: translateY(-.02em); }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-top: clamp(28px, 4vw, 48px); }
@media (max-width: 760px) { .hero-row { grid-template-columns: minmax(0, 1fr); } }
.hero .lede { margin: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stickers { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; max-width: 380px; }
@media (max-width: 760px) { .stickers { justify-content: flex-start; } }
.sticker { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); font: 500 14px/1 var(--mono); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sticker:nth-child(1) { transform: rotate(-4deg); }
.sticker:nth-child(2) { transform: rotate(3deg); background: var(--forest); color: var(--on-forest); box-shadow: none; }
.sticker:nth-child(3) { transform: rotate(-2deg); background: var(--moss); box-shadow: inset 0 0 0 1.5px var(--leaf); color: var(--ink); }
.sticker:nth-child(4) { transform: rotate(5deg); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.sticker:hover { transform: rotate(0) scale(1.06); }

/* ---------- π digits band ---------- */
.digits { overflow: hidden; background: var(--forest); color: var(--on-forest); padding-block: 14px; font: 500 15px/1 var(--mono); letter-spacing: .12em; white-space: nowrap; }
.digits .track { display: inline-flex; animation: marquee 90s linear infinite; }
.digits .track span { padding-right: 2.4em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .digits .track { animation: none; } }

/* ---------- Bento (current year) ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 14px; }
.tile { position: relative; display: grid; gap: 8px; align-content: space-between; padding: 22px; background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; overflow: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.tile b { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.tile .big { font: 650 clamp(24px, 2.6vw, 32px)/1.05 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); font-size: 14px; }
.tile-moss { background: var(--moss); box-shadow: none; }
.tile-moss b { color: var(--leaf); }
.tile-theme { grid-column: span 2; grid-row: span 2; align-content: start; gap: 14px; padding: clamp(24px, 3vw, 36px); }
.tile-theme .label { margin: 0; font: 500 14px/1.3 var(--sans); color: var(--accent); }
.tile-theme h2 { margin: 0; font: 650 clamp(38px, 5vw, 64px)/.95 var(--sans); letter-spacing: -.05em; }
.tile-theme p { margin: 0; color: var(--muted); max-width: 28em; }
.tile-theme .art { margin-top: auto; justify-self: end; width: min(100%, 360px); }
.tile-theme .art svg { display: block; width: 100%; height: auto; }
.tile-cta { background: var(--ink); color: var(--bg); text-decoration: none; box-shadow: none; }
.tile-cta b, .tile-cta small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.tile-cta .big { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-cta .circle { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 22px; flex: none; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.tile-cta:hover { transform: translateY(-3px); }
.tile-cta:hover .circle { transform: rotate(-45deg); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile-theme { grid-column: auto; grid-row: auto; } }

/* ---------- Inverted band ---------- */
.ink { background: var(--forest); color: var(--on-forest); border-radius: 32px; margin-inline: max(8px, env(safe-area-inset-left, 0px)); }
.ink .eyebrow { color: color-mix(in srgb, var(--leaf) 55%, var(--on-forest)); }
.ink .section-head p { color: color-mix(in srgb, var(--on-forest) 65%, transparent); }
.ink a { color: var(--on-forest); }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: var(--radius); background: color-mix(in srgb, var(--on-forest) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-forest) 12%, transparent); transition: background .3s; }
.feature:hover { background: color-mix(in srgb, var(--on-forest) 11%, transparent); }
.feature .num { font: 650 48px/1 var(--sans); letter-spacing: -.05em; color: color-mix(in srgb, var(--leaf) 70%, var(--on-forest)); }
.feature p { margin: 0; color: color-mix(in srgb, var(--on-forest) 72%, transparent); }

/* ---------- Panels ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.list { margin: 0; padding: 0; list-style: none; display: grid; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr); }
.list li:last-child { border-bottom: 0; }
.list li::before { content: "→"; color: var(--leaf); font-family: var(--mono); font-size: 13px; padding-top: 2px; }

/* ---------- Page header (subpages) ---------- */
.page-head .wrap { padding-block: clamp(48px, 7vw, 96px) clamp(32px, 4vw, 56px); }

/* ---------- History ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 40px; max-width: 820px; }
@media (max-width: 560px) { .stats { grid-template-columns: minmax(0, 1fr); } }
.stats div { display: grid; gap: 6px; padding: 20px 22px; background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.stats div:first-child { background: var(--moss); box-shadow: none; }
.stats b { font: 650 clamp(40px, 5vw, 60px)/1 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stats span { font: 400 13px/1.3 var(--mono); color: var(--muted); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge { aspect-ratio: 1; max-width: 100%; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px;
  background: color-mix(in srgb, var(--on-forest) 7%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--on-forest) 22%, transparent);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s; }
.badge:nth-child(odd) { transform: rotate(-3deg); }
.badge:nth-child(even) { transform: rotate(3deg); }
.badge:hover { transform: rotate(0) scale(1.05); background: color-mix(in srgb, var(--on-forest) 13%, transparent); }
.badge .n { font: 650 44px/1 var(--sans); letter-spacing: -.05em; }
.badge .name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.badge .ys { font: 400 11px/1.3 var(--mono); color: color-mix(in srgb, var(--on-forest) 62%, transparent); }

.timeline { display: grid; gap: 56px; }
.decade { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
@media (max-width: 720px) { .decade { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.decade h2 { margin: 0; font: 650 clamp(28px, 3.4vw, 44px)/1 var(--sans); letter-spacing: -.05em; color: color-mix(in srgb, var(--leaf) 45%, var(--line-strong)); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); align-self: start; }
@media (max-width: 720px) { .decade h2 { position: static; } }
.years { margin: 0; padding: 0; list-style: none; }
.years li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 14px; margin-inline: -14px; border-top: 1px solid var(--line); transition: background .2s; }
.years li:first-child { border-top: 0; }
.years li:hover { background: var(--surface); }
.years .y { font: 500 16px/1.4 var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.years .t { font: 550 clamp(18px, 2vw, 22px)/1.3 var(--sans); letter-spacing: -.02em; min-width: 0; }
.years .tag { font: 400 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.years li.gap .t { color: var(--muted); font-weight: 400; font-style: italic; font-size: 17px; }
.years li.next .y, .years li.next .t { color: var(--accent); }
.years li.next .tag { border-color: var(--accent); color: var(--accent); }
@media (max-width: 520px) { .years li { grid-template-columns: 56px minmax(0, 1fr); } .years .tag { grid-column: 2; justify-self: start; } }

/* ---------- People ---------- */
.lead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; background: var(--forest); color: var(--on-forest); border-radius: 28px; padding: clamp(24px, 4vw, 44px); }
@media (max-width: 560px) { .lead { grid-template-columns: minmax(0, 1fr); } }
.avatar { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--on-forest); color: var(--forest); font: 650 34px/1 var(--sans); letter-spacing: -.03em; }
.lead .role { margin: 0 0 6px; font: 400 13px var(--mono); color: color-mix(in srgb, var(--leaf) 55%, var(--on-forest)); }
.lead h2 { margin: 0; font: 650 clamp(30px, 4.4vw, 48px)/1 var(--sans); letter-spacing: -.045em; }
.lead .chips span { background: color-mix(in srgb, var(--on-forest) 12%, transparent); color: var(--on-forest); }
.lead .contact { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 22px; font: 400 15px var(--mono); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.person { background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 20px; display: grid; gap: 14px; align-content: start; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.person:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); }
.person .top { display: flex; align-items: center; gap: 12px; }
.person .ini { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--moss); color: var(--leaf); font: 600 14px/1 var(--sans); }
.person h3 { margin: 0; font: 600 17px/1.25 var(--sans); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 5px 11px; }

/* ---------- Footer ---------- */
.site-foot { margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; overflow: hidden; }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding-block: 44px 8px; }
.site-foot strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--ink); }
.wordmark { display: block; font: 750 clamp(64px, 19vw, 260px)/.8 var(--sans); letter-spacing: -.065em; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--leaf) 40%, var(--line-strong)); white-space: nowrap; margin: 24px 0 -.12em; user-select: none; }

/* ---------- Dětské prvky: kresbičky, ručně psané poznámky ---------- */
.hand { font-family: var(--hand); font-weight: 600; color: var(--leaf); }
.hero-wrap { position: relative; }
.doodle-hero { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: 4px; width: 290px; height: auto; }
@media (max-width: 1180px) { .doodle-hero { position: static; display: block; width: min(260px, 70%); margin: 0 0 8px auto; } }
.doodle-hero .flame { transform-origin: 0 0; animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, .94) rotate(-3deg); } 60% { transform: scale(.95, 1.07) rotate(2deg); } }
.doodle-hero .twinkle path { animation: twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.doodle-hero .twinkle path:nth-child(2) { animation-delay: -1s; }
.doodle-hero .twinkle path:nth-child(3) { animation-delay: -2s; }
@keyframes twinkle { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .doodle-hero .flame, .doodle-hero .twinkle path { animation: none; } }

.mega .pi-big { transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.mega:hover .pi-big { transform: rotate(-14deg) scale(1.04); }

.scribble { position: relative; white-space: nowrap; color: var(--ink); }
.scribble::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -6px; height: 10px; background: var(--leaf);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7C30 2 60 9 88 4s26 1 30 0' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7C30 2 60 9 88 4s26 1 30 0' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.note { display: flex; align-items: flex-end; gap: 6px; margin: 10px 0 0 120px; font-size: 26px; line-height: 1; transform: rotate(-3deg); }
.note svg { width: 48px; height: 32px; flex: none; }
@media (max-width: 560px) { .note { margin-left: 40px; } }

/* les nad zeleným pásem */
.ink.trees { position: relative; margin-top: 60px; border-top-left-radius: 0; border-top-right-radius: 0; }
.ink.trees::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 56px; background: var(--forest);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 56'%3E%3Cpath d='M0 56V44 L4 44 L12 20 L20 44 L19 44 L30 6 L41 44 L41 44 L50 24 L59 44 L56 44 L66 12 L76 44 L78 44 L86 28 L94 44 L92 44 L104 4 L116 44 L114 44 L124 18 L134 44 L133 44 L142 10 L151 44 L152 44 L160 26 L168 44 L167 44 L178 8 L189 44 L189 44 L198 22 L207 44 L206 44 L216 14 L226 44 L227 44 L234 24 L241 44 L240 44V56Z'/%3E%3C/svg%3E") 0 100% / 240px 56px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 56'%3E%3Cpath d='M0 56V44 L4 44 L12 20 L20 44 L19 44 L30 6 L41 44 L41 44 L50 24 L59 44 L56 44 L66 12 L76 44 L78 44 L86 28 L94 44 L92 44 L104 4 L116 44 L114 44 L124 18 L134 44 L133 44 L142 10 L151 44 L152 44 L160 26 L168 44 L167 44 L178 8 L189 44 L189 44 L198 22 L207 44 L206 44 L216 14 L226 44 L227 44 L234 24 L241 44 L240 44V56Z'/%3E%3C/svg%3E") 0 100% / 240px 56px repeat-x; }

.fhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feature .ico { width: 44px; height: 44px; color: var(--on-forest); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.feature:hover .ico { transform: rotate(-8deg) scale(1.1); }

/* fotky vedoucích */
.avatar, .person .ini { overflow: hidden; }
.avatar img, .person .ini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .ini:has(img) { width: 64px; height: 64px; }
.person .prole { margin: 2px 0 0; font: 400 12px var(--mono); color: var(--leaf); }

/* ---------- Mapa ---------- */
.maps { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "big plan" "big info"; gap: 14px; }
.map-big { grid-area: big; }
@media (max-width: 900px) { .maps { grid-template-columns: minmax(0, 1fr); grid-template-areas: "big" "plan" "info"; } }
.map-card { margin: 0; display: grid; gap: 10px; align-content: start; padding: clamp(14px, 2vw, 22px); background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--leaf) 18%, transparent) 1px, transparent 0); background-size: 22px 22px; }
.map-svg { display: block; width: 100%; height: auto; }
.map-card figcaption { font: 400 12px/1.4 var(--mono); color: var(--muted); }

/* ---------- Fotky ---------- */
.gallery { columns: 3 260px; column-gap: 14px; }
.g-item { position: relative; display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; break-inside: avoid; background: var(--moss); }
.g-item img { display: block; width: 100%; height: auto; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.g-item:hover img { transform: scale(1.04); }
.g-item span { position: absolute; left: 10px; bottom: 10px; right: 10px; text-align: left; font: 600 22px/1.1 var(--hand); color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 14, 11, .88); }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 14px; }
.lightbox figcaption { font: 600 26px var(--hand); color: #eef3ea; text-align: center; }
.lb-count { font: 400 12px var(--mono); color: rgba(238,243,234,.6); }
.lightbox button { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.26); }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 16px); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); top: 50%; }
.lb-next { right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; }

.g-item .yr { position: absolute; top: 10px; left: 10px; font: 500 12px/1 var(--mono); color: #fff; background: rgba(15, 25, 18, .55); padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(6px); }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.ph-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px; background: var(--moss); color: var(--forest); font: 500 12px/1 var(--mono); cursor: pointer; white-space: nowrap; transition: transform .2s; }
.ph-chip:hover { transform: scale(1.05); }
.ph-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.years li { grid-template-columns: 76px minmax(0, 1fr) auto auto; }
@media (max-width: 520px) { .years li { grid-template-columns: 56px minmax(0, 1fr); } .years .ph-chip { grid-column: 2; justify-self: start; } }
