/* Пътечка: the collection is the world itself at dusk, the stories are lanterns along one winding path.
   Every colour is a light-dark() pair: early evening in the light theme, night in the dark one.
   The theme only sets color-scheme: the saved choice first, else the system setting, else night. */

:root {
  color-scheme: dark;
  /* a faint warm paper grain on the ground of the map */
  --zrno: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .74 .07 0 0 0 -.015'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  --ui: "Comfortaa", "Avenir Next Rounded", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --tekst-f: "Rubik", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --zaglavie: "Kurale", Georgia, "Times New Roman", serif;
  --k: 92px;
  --zlato: #F2D27C;
  --mastilo: #2A1F18;
}
@media (prefers-color-scheme: light) { :root { color-scheme: light; } }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* the dino valley: dry meadow, ferns, a river and a hill */
.svyat--dino {
  --nebe-1: light-dark(#AEB3CC, #0D1428);
  --nebe-2: light-dark(#F3C7A0, #2A2F4E);
  --mesec: light-dark(#FBEBCB, #F4E3B5);
  --zvezdi: light-dark(transparent, #F6E9C6);
  --dalech: light-dark(#A9AE8C, #1E2A33);
  --blizo: light-dark(#879C6C, #18241F);
  --voda: light-dark(#9DB7BE, #22384A);
  --voda-svetla: light-dark(#E2ECE8, #4E6E80);
  --rast: light-dark(#7E9465, #263D2E);
  --rast-2: light-dark(#6C8457, #1E3226);
  --rast-zhilka: light-dark(#CFCB9F, #1B2219);
  --tsvete: light-dark(#B0574A, #7E3A33);
  --zemya-1: light-dark(#CFCB9F, #1B2219);
  --zemya-2: light-dark(#BDBD91, #161B13);
  --zemya-3: light-dark(#ADB38B, #10130D);
  --pat: light-dark(#ECE2C2, #33352A);
  --kamache: light-dark(#C7B88D, #435040);
  --tekst: light-dark(#2B2A1E, #F1E6CD);
  --tih: light-dark(#3F3D2B, #BDB498);
  --nomer: light-dark(#553708, #E2B65E);
  --gnezdo: light-dark(#8A6A3E, #3E2E1E);
  --gnezdo-vatre: light-dark(#ECE2C2, #33352A);
  --stapka: light-dark(#B3A276, #4C5A45);
}

/* the sea: islands in the water, a reef, shells, seaweed and a small lighthouse on the horizon */
.svyat--more {
  --nebe-1: light-dark(#B4B5D3, #0C1530);
  --nebe-2: light-dark(#F4C9AE, #24345A);
  --mesec: light-dark(#FCEBD2, #F2E6C2);
  --zvezdi: light-dark(transparent, #F3EAD0);
  --dalech: light-dark(#93B3C2, #13263A);
  --blizo: light-dark(#8FB8C6, #102033);
  --voda: light-dark(#86ADBE, #183149);
  --voda-svetla: light-dark(#EAF2F2, #4D7391);
  --rast: light-dark(#C39D7E, #34465A);
  --rast-2: light-dark(#AF8468, #2A3A4C);
  --rast-zhilka: light-dark(#EADBB9, #1A2533);
  --tsvete: light-dark(#B0574A, #7E3A33);
  --zemya-1: light-dark(#A6C9D3, #15283A);
  --zemya-2: light-dark(#97BECA, #112131);
  --zemya-3: light-dark(#88B2C0, #0D1A27);
  --pat: light-dark(#FBFDFC, #8FB3C8);
  --kamache: light-dark(#A88B62, #7A8A96);
  --tekst: light-dark(#1C272D, #EEE7D6);
  --tih: light-dark(#26333A, #B6B0A2);
  --pyasak: light-dark(#EEDDB8, #4B4A42);
  --pyana: light-dark(#F6FBFA, #4F7088);
  --rif: light-dark(#5E7A86, #2A3D50);
  --nomer: light-dark(#553708, #E2B65E);
  --gnezdo: light-dark(#E9C9B2, #6B5A6A);
  --gnezdo-vatre: light-dark(#F7EFDA, #2A3646);
}

/* the jungle: big leaves, a river, flowers */
.svyat--dzhungla {
  --nebe-1: light-dark(#C0B8CB, #0C1A1E);
  --nebe-2: light-dark(#F1CFA0, #1D3536);
  --mesec: light-dark(#FBEBCB, #F2E4B8);
  --zvezdi: light-dark(transparent, #EFE6C4);
  --dalech: light-dark(#8FA77B, #15302A);
  --blizo: light-dark(#73935F, #102620);
  --voda: light-dark(#8FB3AA, #1A3A3C);
  --voda-svetla: light-dark(#E0EEE5, #4A7470);
  --rast: light-dark(#5E8450, #1C4234);
  --rast-2: light-dark(#4C7342, #173629);
  --rast-zhilka: light-dark(#A9BC88, #15211A);
  --tsvete: light-dark(#C0675A, #8A4038);
  --zemya-1: light-dark(#C4CA9C, #15211A);
  --zemya-2: light-dark(#B1BB89, #111A14);
  --zemya-3: light-dark(#A6B286, #0C110D);
  --pat: light-dark(#E9E3BF, #2B3729);
  --kamache: light-dark(#BEB386, #3B5045);
  --tekst: light-dark(#23281C, #EDE7D2);
  --tih: light-dark(#363B27, #B2B59E);
  --nomer: light-dark(#553708, #E2B65E);
  --gnezdo: light-dark(#B98A57, #5A4630);
  --gnezdo-vatre: light-dark(#E9E3BF, #2B3729);
}

/* fairies and princesses: a castle garden at dusk, rose hedges, a lily pond with a little bridge */
.svyat--fei {
  --nebe-1: light-dark(#BDB2D3, #120F2A);
  --nebe-2: light-dark(#F2C6C4, #3A2747);
  --mesec: light-dark(#FCEBD6, #F5E4C0);
  --zvezdi: light-dark(transparent, #F7E8D8);
  --dalech: light-dark(#B7A9C8, #2A2140);
  --blizo: light-dark(#8FA27C, #1F2B28);
  --voda: light-dark(#A2B9D4, #2B3858);
  --voda-svetla: light-dark(#EEF3F8, #5D6F96);
  --rast: light-dark(#7F9670, #2D4136);
  --rast-2: light-dark(#6D8661, #24362D);
  --rast-zhilka: light-dark(#D9E2C2, #1A2621);
  --tsvete: light-dark(#C25F82, #94456A);
  --roza: light-dark(#CF6A8C, #B0587F);
  --venche: light-dark(#FBF3F1, #E9DCE4);
  --sreda: light-dark(#F0C860, #E2B65E);
  --zemya-1: light-dark(#D7CDDB, #291C2D);
  --zemya-2: light-dark(#CBBFD1, #201624);
  --zemya-3: light-dark(#BFB2C6, #170F1A);
  --pat: light-dark(#EDE6EE, #3D2E40);
  --kamache: light-dark(#D9919F, #8A5577);
  --tekst: light-dark(#2B1F2E, #F3E7EF);
  --tih: light-dark(#45374B, #C4B3C3);
  --nomer: light-dark(#553708, #E2B65E);
  --zamak: light-dark(#E8DFEC, #3E3452);
  --pokriv: light-dark(#9E7FB0, #5B4570);
  --prozorec: light-dark(#F3C46A, #FFD27A);
  --lopush: light-dark(#7F9A70, #35503F);
  --most: light-dark(#F3EBDD, #6E5E6E);
  --most-2: light-dark(#B59C82, #4A3E4C);
  --venets: light-dark(#8FA77E, #3E5A47);
  --gnezdo: light-dark(#CF6A8C, #B0587F);
  --gnezdo-vatre: light-dark(#A84D6E, #7E3A5A);
}

/* the cosmos: the night sky, small planets, a ring planet, the Milky Way and the Moon */
.svyat--kosmos {
  --nebe-1: light-dark(#A9AEDB, #060A1E);
  --nebe-2: light-dark(#D9C3E2, #1B1F48);
  --mesec: light-dark(#FFF1CC, #F6E7B8);
  --zvezdi: light-dark(#FFFFFF, #F4EBD2);
  --dalech: light-dark(rgba(255, 255, 255, .3), rgba(170, 160, 230, .12));
  --rast: light-dark(#8C83C4, #3E4385);
  --rast-2: light-dark(#C58FAE, #6A4A82);
  --rast-zhilka: light-dark(#B3ACDA, #2C3068);
  --zemya-1: light-dark(#C1BEE0, #1A1B40);
  --zemya-2: light-dark(#B1AFD6, #131436);
  --zemya-3: light-dark(#A2A1CB, #0D0D25);
  --pat: light-dark(#FFFDF5, #FFF0C8);
  --kamache: light-dark(#6F6AAE, #7275B4);
  --tekst: light-dark(#1B1C3A, #EEEAF6);
  --tih: light-dark(#2A2B50, #BCB8D6);
  --nomer: light-dark(#553708, #E2B65E);
  --planeta: light-dark(#E2B184, #C99662);
  --planeta-2: light-dark(#D98B7A, #A85C52);
  --orbita: light-dark(#FBF4E4, #D9CBA6);
  --zvezda-ukrasa: light-dark(#FFF7DE, #F6DE9A);
  --sleda: light-dark(#FFFFFF, #B9C3FF);
  --iskra: light-dark(#FFFBEB, #FFE7A8);
  --mlechen: light-dark(rgba(255, 255, 255, .23), rgba(190, 180, 255, .13));
  --pat-kant: light-dark(rgba(72, 66, 140, .5), transparent);
  --mlechen-2: light-dark(rgba(255, 255, 255, .4), rgba(220, 210, 255, .14));
  --prah: light-dark(#FFFFFF, #E9E2FF);
  --planeta-tamna: light-dark(#ABA8D3, #1E2352);
  --planeta-tamna-2: light-dark(#9C98C8, #161A44);
  --raketa: light-dark(#F7F2EA, #EDE6DA);
  --raketa-2: #C4574E;
  --prozorche: #8FC3E6;
  --plamache: #FFB648;
  --gnezdo: light-dark(#FCEBC0, #F6E3AE);
}

/* the lanterns are the same warm light in every world */
.svyat {
  --ramka: light-dark(#F8EFD8, #F4DFAE);
  --ramka-2: light-dark(#C2913A, #D9A84C);
  --svetlina: light-dark(rgba(255, 214, 140, .5), rgba(255, 190, 100, .42));
  --svetlina-pod: light-dark(rgba(255, 236, 190, .55), rgba(255, 190, 105, .22));
  --ramka-halo: light-dark(rgba(194, 145, 58, .2), rgba(217, 168, 76, .2));
  --senka: light-dark(rgba(80, 56, 20, .18), rgba(0, 0, 0, .35));
  --kamak-tamen: light-dark(rgba(255, 255, 255, .28), rgba(255, 255, 255, .04));
  --dyska: light-dark(#7A5A2E, #4A3622);
  --dyska-2: light-dark(#6B4E26, #3E2D1C);
  --dyska-tekst: #F6EBD3;
  --fokus: light-dark(#2A2236, #F6D788);
  --stablo: light-dark(#7A5A3A, #2E2418);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--zemya-3);
  color: var(--tekst);
  font: 400 1rem/1.5 var(--tekst-f);
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--fokus); outline-offset: 4px; border-radius: 8px; }

.skrito {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- the sky: header, the world's name and its landscape ---------- */

.nebe {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--nebe-1), var(--nebe-2) 78%);
}
/* the landscape melts into the ground, no hard edge where the map begins */
.nebe::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(36px, 10vw, 96px);
  background: var(--zrno), var(--zemya-1);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 92%);
  mask-image: linear-gradient(180deg, transparent, #000 92%);
  pointer-events: none;
}

.gornica {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6px 16px 0;
}

.znak {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 700 1.375rem/1 var(--ui);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--tekst);
  text-decoration: none;
}

.oko {
  position: relative;
  display: inline-block;
  width: .56em;
  height: .56em;
  margin-left: .04em;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(.14em);
}
.oko::after {
  content: "";
  position: absolute;
  top: 16%;
  right: 16%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: var(--nebe-1);
}

/* the lamp: a small path lantern, the secret day and night switch; no label, no hover */
.lampa {
  position: relative;
  width: 44px;
  height: 52px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.lampa > span { position: absolute; left: 50%; display: block; }
.lampa-halka {
  top: 3px; width: 12px; height: 10px; margin-left: -6px;
  border: 2px solid var(--ramka-2); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.lampa-kapak {
  top: 12px; width: 26px; height: 8px; margin-left: -13px;
  border-radius: 13px 13px 3px 3px; background: var(--ramka-2);
}
.lampa-staklo {
  top: 19px; width: 20px; height: 22px; margin-left: -10px;
  border-radius: 6px;
  background: light-dark(rgba(255, 250, 235, .55), rgba(255, 226, 160, .22));
  box-shadow: inset 0 0 0 1.5px var(--ramka-2), 0 0 22px 6px light-dark(rgba(255, 214, 140, .25), rgba(255, 190, 100, .45));
}
.lampa-plamak {
  position: absolute; left: 50%; top: 6px; width: 7px; height: 12px; margin-left: -3.5px;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(circle at 50% 72%, #FFFBEA, #FFD36B 45%, #F08A2A);
  transform-origin: 50% 100%;
}
.lampa-duno {
  top: 40px; width: 24px; height: 5px; margin-left: -12px;
  border-radius: 2px 2px 6px 6px; background: var(--ramka-2);
}
/* light-dark() takes colours only, so the flame size follows the scheme here */
:root[data-theme="light"] .lampa-plamak { transform: scale(.8); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .lampa-plamak { transform: scale(.8); } }
:root[data-theme="dark"] .lampa-plamak { transform: none; }

.nebe-tekst {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* back to the shelf: a small soft pill in the header, beside the lamp */
.nazad {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px 0 8px;
  border-radius: 22px;
  font-size: .875rem;
  white-space: nowrap;
  color: var(--tekst);
  text-decoration: none;
  background: light-dark(rgba(255, 252, 240, .34), rgba(255, 236, 200, .07));
  box-shadow: inset 0 0 0 1px light-dark(rgba(60, 40, 20, .1), rgba(255, 236, 200, .12));
}
.nazad svg { width: 18px; height: 18px; }

h1 {
  margin: 0;
  font: 400 clamp(2.25rem, 10vw, 3.75rem)/1.05 var(--zaglavie);
  letter-spacing: .005em;
  color: var(--tekst);
}

.uvod {
  max-width: 38ch;
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--tekst);
}

.scena {
  display: block;
  width: 100%;
  height: clamp(110px, 32vw, 230px);
}

.s-zvezda { fill: var(--zvezdi); }
.s-mesec { fill: var(--mesec); }
.s-dalech { fill: var(--dalech); }
.s-blizo { fill: var(--blizo); }
.s-voda { fill: var(--voda); }
.s-voda-svetla { fill: none; stroke: var(--voda-svetla); }
.s-rast { color: var(--rast); fill: var(--rast); }
.s-rast-2 { color: var(--rast-2); fill: var(--rast-2); }
.s-tsvete { color: var(--tsvete); }
.s-zemya { fill: var(--zemya-1); }
.s-mayak { fill: var(--ramka); }
.s-mayak-ivitsa { fill: var(--tsvete); }
.s-svetlina { fill: var(--svetlina); }
.s-gnezdo { fill: var(--gnezdo); }
.s-gnezdo-vatre { fill: var(--gnezdo-vatre); }
.s-gnezdo-klonka { stroke: var(--rast-2); }
.s-stablo { fill: var(--stablo); }
.s-krai-pyasak { fill: var(--pyasak); }
/* the castle garden */
.s-zamak { fill: var(--zamak); }
.s-pokriv { fill: var(--pokriv); }
.s-zname { stroke: var(--pokriv); }
.s-roza, .s-roza-p { fill: var(--roza); }
.s-prozorec { fill: var(--prozorec); }
.s-vrata { fill: var(--pokriv); }
.s-lale-stablo { stroke: var(--rast-2); }
/* the night sky */
.s-iskra { color: var(--zvezda-ukrasa); }
.s-orbita { stroke: var(--orbita); }
.s-planeta { fill: var(--planeta); }
.s-planeta-ivitsa { stroke: var(--planeta-2); opacity: .45; }
.s-planeta-2 { fill: var(--planeta-2); }
.s-krater { fill: var(--planeta); opacity: .6; }
.s-kometa { fill: var(--zvezda-ukrasa); }
.s-kometa-opashka { fill: var(--zvezda-ukrasa); opacity: .45; }
/* far hills, the far sea and the sky haze fade softly instead of one flat band */
.scena .s-dalech { fill: url(#mgla); }
.mgla-0 { stop-color: var(--dalech); stop-opacity: .55; }
.mgla-1 { stop-color: var(--dalech); stop-opacity: .85; }
.mgla-2 { stop-color: var(--dalech); }
.svyat--more .mgla-0 { stop-color: var(--nebe-2); stop-opacity: 1; }
.svyat--more .mgla-1 { stop-opacity: 1; }
.svyat--kosmos .mgla-0 { stop-opacity: 0; }
.svyat--kosmos .mgla-1 { stop-opacity: .5; }
.scena .s-blizo { fill: url(#mgla-b); }
.mglab-0 { stop-color: var(--blizo); stop-opacity: .6; }
.mglab-1 { stop-color: var(--blizo); }
.scena .s-zemya { fill: url(#mgla-z); }
.mglaz-0 { stop-color: var(--zemya-1); stop-opacity: 0; }
.mglaz-1 { stop-color: var(--zemya-1); }
/* small cozy things at the sleep places: eggs in the nest, a pearl in the shell, a cloud pillow */
.s-yaytse { fill: light-dark(#EFE2C4, #D9C9A4); stroke: var(--gnezdo); stroke-width: 1.5; }
.s-yaytse--pred { fill: var(--ramka); }
.s-perla { fill: light-dark(#FCF6EC, #F4E8D8); }
.s-perla-blyasak { fill: #FFFFFF; opacity: .8; }
.s-oblache { fill: light-dark(#FFFFFF, #E4DEFA); opacity: .92; }

/* ---------- the signpost at the start of the path ---------- */

main { display: block; }

.tabela {
  position: relative;
  z-index: 2;
  display: flow-root;
  padding: 0 16px 8px;
  background: var(--zemya-1);
}

.tabela-dyska {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: -30px auto 0;
  padding: 12px 14px 12px;
  border-radius: 16px 20px 14px 18px;
  color: var(--dyska-tekst);
  background:
    repeating-linear-gradient(176deg, rgba(255, 255, 255, .035) 0 3px, transparent 3px 11px),
    linear-gradient(180deg, var(--dyska), var(--dyska-2));
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .12), 0 10px 26px light-dark(rgba(60, 40, 10, .2), rgba(0, 0, 0, .42));
}

.tabela h2 {
  margin: 0 0 4px;
  font: 400 1.3125rem/1.2 var(--zaglavie);
}

/* the label stands first in its row of pebbles */
.tabela-red { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; column-gap: 6px; margin-top: 6px; }

.tabela-etiket {
  padding-top: 12px;
  font-size: .875rem;
  line-height: 1.4;
  color: rgba(246, 235, 211, .78);
}

.kamachta { display: flex; flex-wrap: wrap; gap: 6px; }
/* on the narrowest phones the label goes above, so the pebbles get the whole width */
@media (max-width: 369px) {
  .tabela-red { display: block; }
  .tabela-etiket { display: block; padding: 0 0 4px; }
}

/* every choice is a smooth pebble you can press */
.kamache {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 13px;
  border: 1.5px solid rgba(246, 235, 211, .34);
  border-radius: 48% 52% 46% 54% / 56% 46% 54% 44%;
  font: 500 .9375rem/1.1 var(--tekst-f);
  color: var(--dyska-tekst);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kamache:nth-child(2n) { border-radius: 54% 46% 52% 48% / 46% 56% 44% 54%; }
.kamache svg { width: 16px; height: 16px; }
.kamache[aria-pressed="true"] {
  color: var(--mastilo);
  border-color: var(--zlato);
  background: var(--zlato);
  box-shadow: 0 0 16px rgba(242, 210, 124, .45);
}

.tabela-dolu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(246, 235, 211, .28);
}

.tabela-broi { margin: 0; font-size: .9375rem; }
.tabela-butoni { display: flex; gap: 8px; }

.tabela-buton {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  font: 500 .9375rem/1 var(--tekst-f);
  color: var(--mastilo);
  background: var(--zlato);
  cursor: pointer;
}
.tabela-buton--tih {
  color: var(--dyska-tekst);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(246, 235, 211, .4);
}
.tabela-buton[hidden] { display: none; }

.posledna {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 12px 0 0;
  font-size: .9375rem;
}
.posledna[hidden] { display: none; }
.posledna b { font-weight: 500; color: var(--zlato); }

.tabela-stalb {
  position: relative;
  display: block;
  width: 14px;
  height: 18px;
  margin: 0 auto;
  border-radius: 0 0 3px 3px;
  background: var(--dyska-2);
}

/* ---------- the path ---------- */

.pateka {
  position: relative;
  padding: 4px 0 0;
  background:
    var(--zrno),
    linear-gradient(180deg, var(--zemya-1), var(--zemya-2) 55%, var(--zemya-3));
  overflow: hidden;
}

.pateka-linia {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.p-pat { fill: none; stroke: var(--pat); stroke-linecap: round; stroke-linejoin: round; }
/* a soft verge, so the path has no hard edge */
.p-pat-kray { fill: none; stroke: var(--pat); stroke-linecap: round; stroke-linejoin: round; opacity: .3; }
.p-pat-kray.p-tamna { opacity: .16; }
.p-kamachta { fill: none; stroke: var(--kamache); stroke-linecap: round; }
.p-tamna { opacity: .5; }
.p-reka { fill: none; stroke: var(--voda); stroke-linecap: round; }
/* soft banks and a lighter middle, the water is never one flat band */
.p-reka-kray { fill: none; stroke: var(--voda); stroke-linecap: round; opacity: .38; }
.p-reka-sreda { fill: none; stroke: var(--voda-svetla); stroke-linecap: round; opacity: .16; }
.p-reka-svetla { fill: none; stroke: var(--voda-svetla); stroke-linecap: round; stroke-dasharray: 26 38; }
.p-ukrasa { color: var(--rast); }
.p-ukrasa-2 { color: var(--rast-2); }
/* the dino track: footprints, and stepping stones over the river */
.p-stapki { color: var(--stapka); }
.p-brod { fill: var(--kamache); stroke: var(--stapka); stroke-width: 1.5; }
/* the sea route: a dashed line of foam over a faint wake, through a reef */
.p-brazda { fill: none; stroke: var(--pyana); stroke-linecap: round; opacity: .22; }
.svyat--more .p-pat { stroke-dasharray: 9 11; }
.p-rif { fill: var(--rif); }
.p-rif-pyana { fill: none; stroke: var(--pyana); stroke-linecap: round; }
/* the garden: flower stepping stones, a lily pond with pads, a little wooden bridge */
.p-tsvetche { color: var(--kamache); }
.p-ezero { fill: var(--voda); }
.p-ezero-kray { fill: var(--voda); opacity: .35; }
.p-ezero-bryag { fill: none; stroke: var(--voda-svetla); stroke-dasharray: 18 26; stroke-linecap: round; opacity: .7; }
.p-lopush { fill: var(--lopush); }
.p-lopush-tsvete { fill: var(--roza); }
.p-most { fill: none; stroke: var(--most); }
.p-most-dyski { fill: none; stroke: var(--most-2); }
.p-most-parapet { fill: none; stroke: var(--most-2); stroke-linecap: round; }
.p-most-stalb { fill: var(--most-2); }
/* the sky: a rocket trail with stardust, over the Milky Way */
.p-sleda { fill: none; stroke: var(--sleda); stroke-linecap: round; stroke-linejoin: round; opacity: .22; }
.p-sleda.p-tamna { opacity: .16; }
.p-kant { fill: none; stroke: var(--pat-kant); stroke-linecap: round; stroke-linejoin: round; }
.p-iskra { color: var(--iskra); }
.p-mlechen { fill: none; stroke: var(--mlechen); stroke-linecap: round; }
.p-mlechen-2 { fill: none; stroke: var(--mlechen-2); stroke-linecap: round; }
.p-mlechen-3 { fill: none; stroke: var(--mlechen); stroke-linecap: round; opacity: .45; }
.p-prah { fill: var(--prah); opacity: .8; }
/* in a world where no lantern is lit yet the whole path is unlit, so it dims less */
.svyat--fei .p-pat.p-tamna, .svyat--kosmos .p-pat.p-tamna, .svyat--kosmos .p-kant.p-tamna { opacity: .75; }
.p-tamna-ukrasa { opacity: .8; }

.nachalo {
  position: relative;
  z-index: 1;
  display: block;
  width: 22px;
  height: 14px;
  /* on the phone the path starts right above the first stone */
  margin: 0 0 14px calc(16px + var(--k) / 2 - 11px);
  border-radius: 50%;
  background: var(--kamache);
}

.spirki {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 0 16px;
  list-style: none;
}

.spirka { position: relative; margin: 0 0 40px; }
.spirka.pred-reka { margin-bottom: 104px; }
.spirka.s-belezhka { margin-top: 100px; }

.spirka-vrazka {
  display: grid;
  grid-template-columns: var(--k) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
a.spirka-vrazka { cursor: pointer; }

/* the zigzag: every other stop crosses to the right, and the path wanders a little */
.spirka:nth-child(even) .spirka-vrazka { grid-template-columns: minmax(0, 1fr) var(--k); }
.spirka:nth-child(even) .kamak { order: 2; }
.spirka:nth-child(even) .nadpis { text-align: right; align-items: flex-end; }
.spirka:nth-child(4n+3) .spirka-vrazka { padding-left: 14px; }
.spirka:nth-child(4n) .spirka-vrazka { padding-right: 10px; }

/* the lantern stone: the cover in a round frame, glowing softly */
.kamak {
  position: relative;
  display: block;
  width: var(--k);
  height: var(--k);
  padding: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 30%, light-dark(#FFFCF2, #FFF3D6), var(--ramka) 62%);
  box-shadow: 0 0 0 1.5px var(--ramka-2), 0 0 0 5px var(--ramka-halo), 0 4px 10px var(--senka), 0 0 40px 12px var(--svetlina);
  transition: opacity .5s ease, box-shadow .5s ease;
}
.kamak::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -60%;
  right: -60%;
  bottom: -46%;
  height: 84%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--svetlina-pod), transparent);
}
.kamak img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  background: var(--zemya-2);
  box-shadow: inset 0 0 0 1px rgba(90, 60, 20, .18);
  transition: filter .5s ease;
}

.nadpis {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-shadow: 0 0 6px var(--zemya-1), 0 0 14px var(--zemya-1);
}

.nomer {
  font: 400 1rem/1.2 var(--zaglavie);
  color: var(--nomer);
}

.ime {
  margin-top: 2px;
  font: 400 1.1875rem/1.2 var(--zaglavie);
  color: var(--tekst);
  overflow-wrap: break-word;
  hyphens: manual;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 4px;
  font-size: .875rem;
  color: var(--tih);
}
.spirka:nth-child(even) .meta { justify-content: flex-end; }

.izbor { display: inline-flex; align-items: center; gap: 4px; color: var(--nomer); }
.izbor svg { width: 14px; height: 14px; }

a.spirka-vrazka:hover .ime { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* the dino lanterns stand in a ring of pebbles */
.svyat--dino .kamak::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12px;
  border: 5px dotted var(--kamache);
  border-radius: 50%;
  opacity: .85;
}
/* the sea lanterns are small islands: a ring of sand edged with foam */
.svyat--more .kamak::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -13px;
  border-radius: 47% 53% 44% 56% / 55% 45% 55% 45%;
  background: radial-gradient(closest-side, var(--pyasak) 82%, color-mix(in srgb, var(--pyasak) 70%, var(--voda)));
  box-shadow: 0 0 0 2.5px var(--pyana), 0 0 14px 3px color-mix(in srgb, var(--pyana) 30%, transparent);
}
.svyat--more .spirka:nth-child(even) .kamak::before { inset: -11px -14px -14px -12px; border-radius: 55% 45% 52% 48% / 44% 56% 46% 54%; }
.svyat--dino .spirka-vrazka, .svyat--more .spirka-vrazka { gap: 22px; }
/* the garden lanterns stand in a wreath of roses and leaves */
.svyat--fei .kamak::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 6deg, var(--roza) 0 8deg, var(--venets) 8deg 22deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  mask: radial-gradient(closest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
}
/* the sky lanterns are small planets, each with a ring */
.svyat--kosmos .kamak::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 36%;
  bottom: 36%;
  left: -19%;
  right: -19%;
  border: 3px solid var(--orbita);
  border-radius: 50%;
  transform: rotate(-14deg);
  opacity: .85;
}
.svyat--kosmos .spirka:nth-child(even) .kamak::before { transform: rotate(14deg); }
.svyat--fei .spirka-vrazka { gap: 24px; }
.svyat--kosmos .spirka-vrazka { gap: 30px; }

/* where each path starts: a pebble in the jungle, an egg in the valley, a little boat at sea */
.svyat--dino .nachalo { width: 18px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--ramka); box-shadow: 0 0 0 2px var(--kamache); }
.svyat--more .nachalo { width: 34px; height: 14px; border-radius: 3px 3px 16px 16px; background: var(--ramka-2); }
/* a little garden gate in the castle garden, a rocket in the sky */
.svyat--fei .nachalo {
  width: 30px;
  height: 28px;
  border-radius: 15px 15px 2px 2px;
  background: repeating-linear-gradient(90deg, var(--most-2) 0 3px, transparent 3px 8px);
  box-shadow: inset 0 0 0 3px var(--most-2);
}
.svyat--kosmos .nachalo { width: 26px; height: 42px; border-radius: 0; background: none; }
.nachalo svg { display: block; width: 100%; height: 100%; }
@media (max-width: 699px) {
  .svyat--fei .nachalo { margin-left: calc(16px + var(--k) / 2 - 15px); margin-bottom: 22px; }
  .svyat--kosmos .nachalo { margin-left: calc(16px + var(--k) / 2 - 13px); }
}
/* on the narrowest phones the planet rings need a little room from the screen edge */
@media (max-width: 359px) {
  .svyat--kosmos .spirki { padding: 0 24px; }
  .svyat--kosmos .nachalo { margin-left: calc(24px + var(--k) / 2 - 13px); }
}

/* a story not on the site yet: an unlit stone with the world's sign, no link */
.spirka--tamna .kamak {
  display: grid;
  place-items: center;
  color: var(--kamache);
  background: var(--kamak-tamen);
  box-shadow: inset 0 0 0 1.5px var(--kamache), inset 0 3px 10px var(--senka), 0 0 0 4px color-mix(in srgb, var(--kamache) 18%, transparent);
}
.spirka--tamna .kamak::after { content: none; }
/* an unlit planet is still a planet: solid, so its ring passes behind it */
.svyat--kosmos .spirka--tamna .kamak { background: radial-gradient(circle at 36% 30%, var(--planeta-tamna), var(--planeta-tamna-2)); }
/* an unlit garden lantern is a closed bud on a round patch of lawn, the flower stones stay outside it */
.svyat--fei .spirka--tamna .kamak { background: radial-gradient(circle at 50% 40%, var(--zemya-1), var(--zemya-2)); }
/* the soft light round the sleep place */
.sjai-0 { stop-color: var(--ramka); stop-opacity: .38; }
.sjai-1 { stop-color: var(--ramka); stop-opacity: 0; }
.spirka--tamna .kamak svg { width: 46%; height: 46%; }
.spirka--tamna .ime { color: var(--tih); }

/* a note on the path, above the stop where something changes; on the phone it stands over the title,
   beside the straight run of the path into the stone, never across it */
.belezhka {
  margin: 0 0 10px;
  font: 400 1rem/1.35 var(--zaglavie);
  color: var(--tih);
  text-shadow: 0 0 6px var(--zemya-1), 0 0 14px var(--zemya-1);
}
@media (max-width: 699px) {
  .spirka.s-belezhka { display: grid; grid-template-columns: var(--k) minmax(0, 1fr); column-gap: 14px; }
  .svyat--dino .spirka.s-belezhka, .svyat--more .spirka.s-belezhka { column-gap: 22px; }
  .s-belezhka .belezhka { grid-column: 2; }
  .s-belezhka .spirka-vrazka { grid-column: 1 / -1; }
  .spirka.s-belezhka:nth-child(even) { grid-template-columns: minmax(0, 1fr) var(--k); }
  .s-belezhka:nth-child(even) .belezhka { grid-column: 1; text-align: right; }
  .s-belezhka:nth-child(4n+3) .belezhka { margin-left: 14px; }
  .s-belezhka:nth-child(4n) .belezhka { margin-right: 10px; }
  /* where the path parts in two it needs more ground between the stones */
  .spirka[data-izbor] { margin-bottom: 64px; }
}
.belezhka svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -2px; color: var(--nomer); }

/* the finder dims the stones it does not mean; they stay where they are and still open */
.spirka.zagasnala .kamak { opacity: .4; box-shadow: 0 0 0 2px var(--kamache); }
.spirka.zagasnala .kamak::after { opacity: 0; }
.spirka.zagasnala .kamak img { filter: grayscale(.7) brightness(.85); }
.spirka.zagasnala .nadpis { opacity: .45; }
.nadpis { transition: opacity .5s ease; }

/* where you stopped last time */
.spirka.posledna-spirka .kamak { box-shadow: 0 0 0 1.5px var(--ramka-2), 0 0 0 7px var(--zlato), 0 0 44px 14px var(--svetlina); }
.tuk {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .8125rem;
  color: var(--mastilo);
  background: var(--zlato);
  text-shadow: none;
}

/* ---------- the end of the path: a quiet place to sleep ---------- */

.krai {
  position: relative;
  z-index: 1;
  padding: 24px 16px 56px;
  text-align: center;
}

.krai-scena {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
/* the sleep place: a warm pool of light round it */
.krai-scena::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--svetlina-pod), transparent);
  pointer-events: none;
}
.krai-risunka { position: relative; }
.krai-risunka { display: block; width: 100%; height: auto; }
.leglo { position: absolute; left: 50%; top: 66%; width: 1px; height: 1px; }

.krai h2 {
  margin: 8px 0 0;
  font: 400 clamp(2rem, 9vw, 3rem)/1.1 var(--zaglavie);
}
.krai > p { max-width: 30ch; margin: 8px auto 0; font-size: 1.0625rem; }

.krai-vrazki { margin-top: 28px; }

.krai-gore,
.drugi-svyat {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: .9375rem;
  text-underline-offset: 3px;
}
.drugi { margin: 8px 0 0; font-size: .9375rem; }
.drugi-svyat { color: var(--tekst); font-family: var(--zaglavie); font-size: 1.125rem; }

/* ---------- footer ---------- */

.podval {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  font-size: .875rem;
  color: var(--tih);
  border-top: 1px solid light-dark(rgba(43, 42, 30, .14), rgba(241, 230, 205, .1));
}
.podval p { flex: 1 1 220px; margin: 0; }
.znak--malak { font-size: 1.125rem; min-height: 0; color: var(--tekst); }
.znak--malak .oko::after { background: var(--zemya-3); }
.podval-vrazka { display: inline-flex; align-items: center; min-height: 44px; color: var(--tekst); text-underline-offset: 3px; }

/* ---------- 390 and up: bigger stones ---------- */

@media (min-width: 370px) {
  :root { --k: 104px; }
  .ime { font-size: 1.25rem; }
}

/* ---------- 700 and up: the path winds across, three stones a row ---------- */

@media (min-width: 700px) {
  :root { --k: 120px; }

  .gornica, .nebe-tekst { padding-left: 32px; padding-right: 32px; }
  .znak { font-size: 1.5rem; }
  .nazad { font-size: .9375rem; }
  .uvod { font-size: 1.0625rem; }

  .spirki {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row dense;
    column-gap: 24px;
    row-gap: 76px;
    max-width: 1100px;
    padding: 64px clamp(96px, 13vw, 150px) 0;
  }

  .spirka,
  .spirka.pred-reka,
  .spirka.s-belezhka { margin: 0; }
  .spirka.pred-reka { margin-bottom: 64px; }

  .spirka-vrazka,
  .spirka:nth-child(even) .spirka-vrazka {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0;
  }
  .spirka:nth-child(n) .spirka-vrazka { padding: 0; }
  .svyat--dino .spirka-vrazka, .svyat--more .spirka-vrazka,
  .svyat--dino .spirka:nth-child(even) .spirka-vrazka, .svyat--more .spirka:nth-child(even) .spirka-vrazka { gap: 22px; }
  .svyat--fei .spirka-vrazka, .svyat--fei .spirka:nth-child(even) .spirka-vrazka { gap: 22px; }
  .svyat--kosmos .spirka-vrazka, .svyat--kosmos .spirka:nth-child(even) .spirka-vrazka { gap: 24px; }
  .spirka:nth-child(even) .kamak { order: 0; }
  .nadpis,
  .spirka:nth-child(even) .nadpis { align-items: center; text-align: center; max-width: 230px; }
  .meta,
  .spirka:nth-child(even) .meta { justify-content: center; }

  /* the snake: rows run left to right, then right to left, so the next stone is always beside the last */
  .spirka:nth-child(6n+1) { grid-column: 1; }
  .spirka:nth-child(6n+2) { grid-column: 2; }
  .spirka:nth-child(6n+3) { grid-column: 3; }
  .spirka:nth-child(6n+4) { grid-column: 3; }
  .spirka:nth-child(6n+5) { grid-column: 2; }
  .spirka:nth-child(6n) { grid-column: 1; }

  /* a gentle wave along each row */
  .spirka:nth-child(3n+2) .spirka-vrazka { padding-top: 26px; }

  .nachalo { margin: 0 auto 14px; }

  .belezhka { position: absolute; left: 50%; width: 320px; margin: 0 0 0 -60px; bottom: calc(100% + 16px); }
  /* the note on the first row stands right of where the path comes in, clear of it */
  .spirka.s-belezhka:nth-child(2) { position: static; }
  .spirka.s-belezhka:nth-child(2) .belezhka { top: 14px; bottom: auto; left: calc(50% + 44px); right: 16px; width: auto; max-width: 320px; margin: 0; }
}

/* ---------- 1100 and up: a wide landscape, four stones a row ---------- */

@media (min-width: 1100px) {
  :root { --k: 128px; }

  .nebe-tekst { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; padding-left: 48px; padding-right: 48px; }
  h1, .uvod { grid-column: 1; }
  .gornica { padding-left: 48px; padding-right: 48px; }
  /* the sky of the landscape rises behind the words, so the map starts sooner */
  .scena { height: 300px; margin-top: -110px; }

  .tabela { padding: 0 max(48px, calc((100vw - 1280px) / 2 + 48px)) 8px; }
  .tabela-dyska { max-width: 540px; margin: -236px 0 0 auto; }
  .tabela-stalb { height: 20px; margin: 0 263px 0 auto; }

  .spirki {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1440px;
    row-gap: 84px;
    padding: 72px clamp(150px, 13vw, 200px) 0;
  }

  .spirka:nth-child(8n+1) { grid-column: 1; }
  .spirka:nth-child(8n+2) { grid-column: 2; }
  .spirka:nth-child(8n+3) { grid-column: 3; }
  .spirka:nth-child(8n+4) { grid-column: 4; }
  .spirka:nth-child(8n+5) { grid-column: 4; }
  .spirka:nth-child(8n+6) { grid-column: 3; }
  .spirka:nth-child(8n+7) { grid-column: 2; }
  .spirka:nth-child(8n) { grid-column: 1; }

  .spirka:nth-child(3n+2) .spirka-vrazka { padding-top: 0; }
  .spirka:nth-child(4n+2) .spirka-vrazka,
  .spirka:nth-child(4n+3) .spirka-vrazka { padding-top: 30px; }

  /* each world walks its own line: the dino track goes up and down like hills,
     the sea islands lie scattered, the jungle trail keeps its gentle wave */
  .svyat--dino .spirka:nth-child(n) .spirka-vrazka { padding-top: 0; }
  .svyat--dino .spirka:nth-child(even) .spirka-vrazka { padding-top: 48px; }
  .svyat--more .spirka:nth-child(n) .spirka-vrazka { padding-top: 0; }
  .svyat--more .spirka:nth-child(4n+1) .spirka-vrazka { padding-top: 44px; }
  .svyat--more .spirka:nth-child(4n+3) .spirka-vrazka { padding-top: 64px; }
  .svyat--more .spirka:nth-child(4n) .spirka-vrazka { padding-top: 16px; }
  /* the way down from the boat passes over the second island, so that one sits a little lower */
  .svyat--more .spirka:nth-child(2) .spirka-vrazka { padding-top: 30px; }
  /* the garden path hangs like a garland, the sky route jumps like a constellation */
  .svyat--fei .spirka:nth-child(n) .spirka-vrazka { padding-top: 0; }
  .svyat--fei .spirka:nth-child(4n+1) .spirka-vrazka,
  .svyat--fei .spirka:nth-child(4n) .spirka-vrazka { padding-top: 40px; }
  .svyat--kosmos .spirka:nth-child(n) .spirka-vrazka { padding-top: 0; }
  .svyat--kosmos .spirka:nth-child(4n+2) .spirka-vrazka { padding-top: 52px; }
  .svyat--kosmos .spirka:nth-child(4n+3) .spirka-vrazka { padding-top: 14px; }
  .svyat--kosmos .spirka:nth-child(4n) .spirka-vrazka { padding-top: 38px; }

  .ime { font-size: 1.3125rem; }
  .krai { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kamak, .kamak img, .nadpis { transition: none; }
}
