/* =========================================================================
   David Koutný — osobní básnická galerie
   Designový základ: minimalismus, velká typografie, zelený inkoust na papíře.
   ========================================================================= */

:root {
  /* Barvy — zelený inkoust na teplém papíře */
  --paper:        #f4f1e8;   /* teplý papírový podklad */
  --paper-deep:   #ece7d8;   /* jemný stín / sekce */
  --ink:          #1d4a3d;   /* hlavní zelený inkoust */
  --ink-soft:     #2e6b54;   /* světlejší tah pera */
  --ink-faint:    #6f8a7e;   /* meta text, popisky */
  --ink-ghost:    rgba(29, 74, 61, 0.14); /* linky, okraje */

  /* Typografie */
  --hand: "Caveat", "Segoe Script", cursive;
  --serif: "Spectral", Georgia, "Times New Roman", serif;

  /* Rytmus a šířky */
  --measure: 34rem;        /* optimální šířka pro čtení básně */
  --measure-wide: 52rem;
  --space: clamp(1.25rem, 4vw, 3rem);

  /* Pohyb */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- Reset / základ --------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  /* velmi jemná papírová textura */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.65;
  font-size: 18px;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

/* --- Layout ----------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--space);
}

main { flex: 1 0 auto; }

/* --- Hlavička / navigace ---------------------------------------------- */
.site-head {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
  padding-block: clamp(0.9rem, 2.6vw, 1.4rem);
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  /* plnobarevné pozadí lišty i mimo úzký střed (kryje širokou galerii) */
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

.brand {
  font-family: Georgia, "Times New Roman", serif; /* stejný styl jako favicon */
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  margin-right: auto;          /* odsune zbytek lišty doprava */
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  color: var(--ink-faint);
  padding-bottom: 0.2em;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

/* „Tetování" zatím skryto z menu (až bude sekce hotová, odeber display:none) */
.nav .muted { display: none; }
.nav .muted:hover { color: var(--ink-faint); border-color: transparent; }

/* --- Hamburger + mobilní menu ----------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg { display: block; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 1.8rem);
  padding: var(--space);
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(2.2rem, 11vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu a[aria-current="page"] { color: var(--ink-soft); }
.mm-close {
  position: absolute;
  top: var(--space);
  right: var(--space);
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .site-head .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* --- Hero / báseň dne (domovská) -------------------------------------- */
.hero {
  padding-block: clamp(2.5rem, 10vh, 6rem) clamp(2rem, 6vh, 4rem);
}

/* Hero nadpis stránky (např. Haiku) */
.page-title {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(3.4rem, 14vw, 8rem);
  line-height: 0.95;
  margin: 0;
  color: var(--ink);
}
.lead {
  max-width: 30rem;
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
}

.daily .title {
  display: inline-block;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 0.95;
  color: var(--ink);
  text-decoration: none;
  margin: 0.4rem 0 clamp(1.5rem, 4vw, 2.5rem);
  transition: color 0.3s var(--ease);
}
.daily .title:hover { color: var(--ink-soft); }

.daily .lines {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.9;
  color: var(--ink);
  max-width: 32rem;
}
.daily .line { display: block; }

.daily .more {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-ghost);
  padding-bottom: 0.35em;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.daily .more:hover {
  color: var(--ink);
  border-color: var(--ink);
  gap: 0.85em;
}

/* --- Vlnka / ruční předěl --------------------------------------------- */
.squiggle {
  width: 120px;
  height: 14px;
  margin: clamp(2.5rem, 7vw, 4.5rem) 0;
  background: no-repeat left center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' fill='none' stroke='%231d4a3d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 8 Q 15 1 28 8 T 54 8 T 80 8 T 106 8 T 118 6'/%3E%3C/svg%3E");
  opacity: 0.7;
}
.squiggle.center { margin-inline: auto; }

/* --- Seznam básní (galerie) ------------------------------------------- */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.poem-list { list-style: none; margin: 0; padding: 0; }

.poem-list li {
  border-top: 1px solid var(--ink-ghost);
}
.poem-list li:last-child { border-bottom: 1px solid var(--ink-ghost); }

.poem-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.1rem, 3vw, 1.8rem);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.4s var(--ease), color 0.3s var(--ease);
}

.poem-list a:hover { padding-left: 0.6rem; color: var(--ink-soft); }

.poem-list .t {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.poem-list .meta {
  font-family: var(--hand);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Haiku zeď (všechna haiku na jedné stránce) ----------------------- */
.haiku-grid {
  max-width: 36rem;          /* jeden sloupec v klidné čtecí šířce */
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(2.6rem, 7vw, 4.4rem);
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.haiku {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}
.haiku-text {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;        /* ve stylu podnadpisu */
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  line-height: 1.75;
  white-space: pre-line;     /* zachová tři verše pod sebou */
  color: var(--ink-soft);
}

/* decentní reakce pod haiku — drobné, zjemní se při najetí */
.haiku .react-row { justify-content: flex-start; gap: clamp(0.4rem, 1.2vw, 0.8rem); }
.haiku .react { opacity: 0.35; padding: 0.2em 0.3em; }
.haiku:hover .react { opacity: 0.8; }
.haiku .react:hover { opacity: 1; }
.haiku .react[aria-pressed="true"] { opacity: 1; }
.haiku .react .emoji { font-size: 1.4rem; }

/* na mobilu větší a vzdušnější — max ~2 haiku naráz */
@media (max-width: 640px) {
  .haiku-grid { gap: 6.5rem; }
  .haiku { gap: 1.3rem; }
  .haiku-text { font-size: 2rem; line-height: 2.05; }
  .haiku .react .emoji { font-size: 1.75rem; }
}

/* --- Stránka básně ---------------------------------------------------- */
.back {
  display: inline-block;
  font-family: var(--hand);
  font-size: 1.4rem;
  color: var(--ink-faint);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.back:hover { color: var(--ink); transform: translateX(-3px); }

.poem {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 9vh, 6rem) clamp(2rem, 6vh, 4rem);
}

.poem h1 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(2.8rem, 11vw, 5.5rem);
  line-height: 0.95;
  margin: 0 0 clamp(2rem, 6vw, 3.5rem);
  color: var(--ink);
}

.poem .body {
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  line-height: 2;
  white-space: pre-wrap;     /* zachová řádkování básně */
  color: var(--ink);
}

.poem .body .stanza { margin: 0 0 1.9em; }
.poem .body .stanza:last-child { margin-bottom: 0; }

.poem .signoff {
  font-family: var(--hand);
  font-size: 1.6rem;
  color: var(--ink-soft);
  margin-top: clamp(2.5rem, 7vw, 4rem);
}

.poem .notfound {
  font-family: var(--hand);
  font-size: 1.8rem;
  color: var(--ink-faint);
}

/* --- Reakce + sdílení ------------------------------------------------- */
.reactions {
  max-width: var(--measure);
  margin: clamp(3rem, 9vw, 5rem) auto 0;
  padding-top: clamp(2rem, 6vw, 3rem);
  border-top: 1px solid var(--ink-ghost);
  text-align: center;
}

.reactions .prompt {
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--ink-faint);
  margin-bottom: 1.4rem;
}

.react-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.6rem, 2.5vw, 1.7rem);
  align-items: center;
  justify-content: center;
}

.react {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0.25em 0.35em;
  cursor: pointer;
  opacity: 0.82;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.react:hover { opacity: 1; transform: translateY(-2px) scale(1.14); }
.react:active { transform: scale(0.92); }
.react[aria-pressed="true"] { opacity: 1; transform: scale(1.08); }

.react .emoji { font-size: 1.85rem; line-height: 1; }
.react .count {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.share {
  margin: clamp(1.4rem, 4vw, 2rem) auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5em 0;
  transition: color 0.25s var(--ease);
}
.share:hover { color: var(--ink); }
.share svg { width: 1.1em; height: 1.1em; }

/* --- O mně / text ----------------------------------------------------- */
.prose {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 9vh, 6rem) 3rem;
}
.prose h1 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 1;
  margin: 0 0 clamp(1.5rem, 5vw, 3rem);
}
.prose p {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  line-height: 1.95;
  margin: 0 0 1.5em;
}
.prose .placeholder { color: var(--ink-faint); font-style: italic; }

/* --- Předchozí / další báseň ------------------------------------------ */
.poem-nav {
  max-width: var(--measure);
  margin: clamp(2.5rem, 7vw, 4rem) auto 0;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--ink-ghost);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}
.pn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  max-width: 48%;
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.pn:hover { color: var(--ink); }
.pn-prev:hover { transform: translateX(-3px); }
.pn-next:hover { transform: translateX(3px); }
.pn-next { margin-left: auto; text-align: right; }
.pn-arr { flex-shrink: 0; }
.pn-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- O mně (poetický medailonek) -------------------------------------- */
.about {
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 9vh, 6rem) 3rem;
}
.about h1 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 1;
  margin: 0 0 clamp(2rem, 6vw, 3.5rem);
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.about-head {
  display: grid;
  grid-template-columns: minmax(0, 17rem) 1fr;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
}
.about-body { min-width: 0; }

/* Duotón je zapečený přímo do obrázku (assets/portret-duotone.jpg) —
   funguje stejně ve všech prohlížečích. Barevná verze leží pod ním
   a po najetí myší (nebo zaměření) se duotón prolne pryč. */
.portrait {
  position: relative;
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--ink-ghost);
  background: var(--paper-deep);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
}
.portrait .p-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait .p-duo {
  position: relative;
  transition: opacity 0.6s var(--ease);
}
.portrait:hover .p-duo,
.portrait:focus-within .p-duo { opacity: 0; }

@media (max-width: 640px) {
  .about-head { grid-template-columns: 1fr; }
  .portrait { max-width: 16rem; }
}

.about-block { margin: 0; }
.about-h {
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--ink-soft);
  margin: 0 0 clamp(1rem, 3vw, 1.6rem);
}
.about-lines {
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  line-height: 1.95;
  color: var(--ink);
}
.about-lines .line { display: block; }
.about .squiggle { margin-block: clamp(2.2rem, 6vw, 3.5rem); }

/* --- Galerie fotek (organická koláž) ---------------------------------- */
/* Masonry přes CSS sloupce — zachovává původní poměr stran každé fotky.
   Pořadí i jemné natočení dlaždic řeší JS (náhodně). */
.photo-grid {
  /* galerie se rozšiřuje ven z úzké čtecí šířky (vycentrovaná na viewport) */
  width: min(82rem, 92vw);
  margin-left: 50%;
  transform: translateX(-50%);
  column-width: 15.5rem;
  column-gap: clamp(0.7rem, 1.4vw, 1.1rem);
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(0.7rem, 1.6vw, 1.2rem);
  padding: 0;
  border: none;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper-deep);
  box-shadow: 0 1px 0 var(--ink-ghost);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -webkit-tap-highlight-color: transparent;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.photo .p-duo {
  position: relative;        /* určuje výšku dlaždice = původní poměr */
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.5s var(--ease);
}
.photo .p-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* po najetí (i fokusu) se dlaždice srovná, povyskočí a ukáže plnou barvu */
.photo:hover,
.photo:focus-visible {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 14px 34px rgba(20, 33, 28, 0.22);
  z-index: 2;
}
.photo:hover .p-duo,
.photo:focus-visible .p-duo { opacity: 0; }
.photo:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 33, 28, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; }
.lb-img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.97);
  transition: transform 0.35s var(--ease);
}
.lightbox.open .lb-img { transform: scale(1); }
.lb-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(244, 241, 232, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lb-close:hover { background: rgba(244, 241, 232, 0.12); border-color: var(--paper); }

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  color: var(--paper);
  background: rgba(20, 33, 28, 0.35);
  border: 1px solid rgba(244, 241, 232, 0.3);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.lb-prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lb-next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lb-prev:hover, .lb-next:hover { background: rgba(20, 33, 28, 0.6); }

/* --- Patička ---------------------------------------------------------- */
.site-foot {
  flex-shrink: 0;
  margin-top: clamp(4rem, 12vw, 8rem);
  padding-block: clamp(2rem, 6vw, 3.5rem);
  border-top: 1px solid var(--ink-ghost);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
}
/* poznámka „…brzy" v patičce zatím skryta */
.site-foot .soon { display: none; }
.site-foot a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot a:hover { color: var(--ink); border-color: var(--ink-ghost); }

/* --- Toast (po sdílení) ----------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 1.5rem);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--hand);
  font-size: 1.3rem;
  padding: 0.6em 1.4em;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Vstupní animace -------------------------------------------------- */
.fade-up { opacity: 0; transform: translateY(14px); }
.fade-up.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
}

/* --- Inverzní (tmavě zelená) varianta --------------------------------- */
:root[data-theme="dark"] {
  --paper:      #173f33;   /* tmavě zelené pozadí */
  --paper-deep: #123329;
  --ink:        #f1eee2;   /* krémové písmo */
  --ink-soft:   #cdddd2;
  --ink-faint:  #8fa89b;
  --ink-ghost:  rgba(241, 238, 226, 0.18);
}
/* plynulý přechod při přepnutí */
body { transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }

/* ruční vlnka v tmavém režimu (krémový tah místo zeleného) */
:root[data-theme="dark"] .squiggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' fill='none' stroke='%23f1eee2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 8 Q 15 1 28 8 T 54 8 T 80 8 T 106 8 T 118 6'/%3E%3C/svg%3E");
}

/* --- Přepínač režimu (vkládá app.js do nav) --------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { display: block; }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
