/* Category pages, one world each, in home variant 6: grandmother's painted Bulgarian cupboard. The page is one
   compartment of that cupboard opened up: the same umber wall and lamp, the same sun faded blue paint, folk red, ochre
   and leaf green, the crest with the world's name on the plaque, one shelf with the world's book standing face out,
   the doors, the plinth and the черга. Tokens are copied from the home page unchanged. Kurale for the plaque and the
   cover label, Rubik for the rest, Comfortaa only for the mark. Night first, day under a light system setting, and
   the painted plate switch overrides either way (key prikazko-tema). Shared by kategorii/dinozavri and kategorii/more. */
:root {
  --stena: #2A2019;
  --varovo: rgba(255, 214, 160, .035);
  --bukvi: #F3E6CF;
  --boya: #1F365C;
  --boya-svetla: #2B4A78;
  --boya-tamna: #142640;
  --cherveno: #A6372C;
  --ohra: #C2913A;
  --zeleno: #567F42;
  --krem: #E6D3AE;
  --plocha: #EEDDB9;
  --plocha-tekst: #1E3156;
  --vatre: #2C1F16;
  --vatre-2: #3A291C;
  --vatre-shev: rgba(0, 0, 0, .28);
  --vatre-senka: rgba(0, 0, 0, .5);
  --dyska: #7A5A26;
  --dyska-svetla: #8F6B30;
  --dyska-tamna: #5A4119;
  --dantela: #D6C29C;
  --sunce: 0;
  --noshtna-lampa: 1;
  --toplo: rgba(255, 176, 88, .34);
  --toplo-boya: rgba(255, 184, 100, .2);
  --plamak: 1;
  --glina: #8A4A2C;
  --glina-svetla: #A65D38;
  --tenekia: #8E7A5E;
  --tenekia-svetla: #C9AE84;
  --shevitsa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' shape-rendering='crispEdges'%3E%3Crect width='100%25' height='100%25' fill='%23B98C3A'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='4' y='2' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='2' y='4' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='6' y='4' width='2' height='2' fill='%23E6D3AE'/%3E%3Crect x='8' y='4' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='10' y='4' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='0' y='6' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='2' y='6' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='4' y='6' width='2' height='2' fill='%23E6D3AE'/%3E%3Crect x='6' y='6' width='2' height='2' fill='%232B4A78'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23E6D3AE'/%3E%3Crect x='10' y='6' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='12' y='6' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='2' y='8' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='4' y='8' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23E6D3AE'/%3E%3Crect x='8' y='8' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='10' y='8' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='6' y='10' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='8' y='10' width='2' height='2' fill='%23A6372C'/%3E%3Crect x='6' y='12' width='2' height='2' fill='%23A6372C'/%3E%3C/svg%3E");
  --hartiya: #EFE3C8;
  --hartiya-rub: #BFAF8F;
  --mastilo: #2A1F18;
  --folio: #F2D27C;
  --plat-dino: #3D6A4B;
  --plat-more: #2C5B7C;
  --plat-dzhungla: #2D6A62;
  --gr-1: #6E2D2A;
  --gr-2: #2E4A6E;
  --gr-3: #6E5428;
  --gr-4: #3F5E3A;
  --syanka: rgba(0, 0, 0, .55);
  --cherga: brightness(.6) saturate(.85) sepia(.12);
  --pod: #3A2A1E;
  --pod-tamno: #2A1E15;
  --podval-fon: #1A130E;
  --podval-bukvi: #F3E6CF;
  --podval-tih: #C8B79B;
  --podval-linia: #3A2D22;
  --fokus: #F6D788;
  --chiniya-centar: #F3E3C2;
  --chiniya-ikona: #1E3156;
  --chiniya-rab: #1F365C;
  --cherga-sharka: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='18' shape-rendering='crispEdges'%3E%3Crect width='100%25' height='100%25' fill='%23B8332A'/%3E%3Crect x='8' y='0' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='10' y='2' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='8' y='4' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='12' y='4' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='2' y='6' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='6' y='6' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23244A80'/%3E%3Crect x='10' y='6' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='14' y='6' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='24' y='6' width='2' height='2' fill='%233F7A3A'/%3E%3Crect x='0' y='8' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='4' y='8' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23244A80'/%3E%3Crect x='8' y='8' width='2' height='2' fill='%23244A80'/%3E%3Crect x='10' y='8' width='2' height='2' fill='%23244A80'/%3E%3Crect x='12' y='8' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='16' y='8' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='22' y='8' width='2' height='2' fill='%233F7A3A'/%3E%3Crect x='24' y='8' width='2' height='2' fill='%233F7A3A'/%3E%3Crect x='26' y='8' width='2' height='2' fill='%233F7A3A'/%3E%3Crect x='2' y='10' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='6' y='10' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='8' y='10' width='2' height='2' fill='%23244A80'/%3E%3Crect x='10' y='10' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='14' y='10' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='24' y='10' width='2' height='2' fill='%233F7A3A'/%3E%3Crect x='4' y='12' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='8' y='12' width='2' height='2' fill='%23E0A93E'/%3E%3Crect x='12' y='12' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='6' y='14' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='10' y='14' width='2' height='2' fill='%23F6E7C8'/%3E%3Crect x='8' y='16' width='2' height='2' fill='%23F6E7C8'/%3E%3C/svg%3E");
  --chetka: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='60'%3E%3Cfilter id='c' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.4 .02' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .5 0 0 0 -.2'/%3E%3C/filter%3E%3Crect width='200' height='60' filter='url(%23c)'/%3E%3C/svg%3E");
  --ui: "Comfortaa", "Avenir Next Rounded", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --tekst: "Rubik", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --zaglavie: "Kurale", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

/* the day look: the saved choice first, else a light system setting, else night, as on the home page */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --stena: #E6DAC4;
    --varovo: rgba(255, 238, 205, .45);
    --bukvi: #352A20;
    --boya: #6B85A0;
    --boya-svetla: #8199B0;
    --boya-tamna: #56708C;
    --cherveno: #B0574A;
    --ohra: #CFA45E;
    --zeleno: #6F8C57;
    --krem: #F2E7D0;
    --plocha: #F2E7D0;
    --vatre: #EAD5B0;
    --vatre-2: #DEC69C;
    --vatre-shev: rgba(120, 85, 40, .1);
    --vatre-senka: rgba(100, 70, 30, .18);
    --dyska: #C8A064;
    --dyska-svetla: #DAB67E;
    --dyska-tamna: #A98148;
    --dantela: #F8F0E0;
    --sunce: .7;
    --noshtna-lampa: .25;
    --toplo: rgba(255, 206, 140, .14);
    --toplo-boya: rgba(255, 240, 210, .12);
    --plamak: .7;
    --glina: #A9694C;
    --glina-svetla: #C4876A;
    --tenekia: #A39B8E;
    --tenekia-svetla: #E2DBCD;
    --shevitsa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' shape-rendering='crispEdges'%3E%3Crect width='100%25' height='100%25' fill='%23CFA45E'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='4' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='8' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='10' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='0' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='6' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='6' y='6' width='2' height='2' fill='%2356708C'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='10' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='12' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='8' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='10' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='8' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='12' width='2' height='2' fill='%23B0574A'/%3E%3C/svg%3E");
    --gr-1: #7C3E36;
    --gr-3: #7A6035;
    --syanka: rgba(80, 56, 30, .3);
    --cherga: saturate(.6) sepia(.2) brightness(.98);
    --pod: #A88A68;
    --pod-tamno: #8C6F52;
    --podval-fon: #3A4A60;
    --podval-bukvi: #F2EADB;
    --podval-tih: #D0C9BC;
    --podval-linia: #52637A;
    --fokus: #2A2236;
    --chiniya-centar: #F2E7D0;
    --chiniya-rab: #56708C;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --stena: #E6DAC4;
  --varovo: rgba(255, 238, 205, .45);
  --bukvi: #352A20;
  --boya: #6B85A0;
  --boya-svetla: #8199B0;
  --boya-tamna: #56708C;
  --cherveno: #B0574A;
  --ohra: #CFA45E;
  --zeleno: #6F8C57;
  --krem: #F2E7D0;
  --plocha: #F2E7D0;
  --vatre: #EAD5B0;
  --vatre-2: #DEC69C;
  --vatre-shev: rgba(120, 85, 40, .1);
  --vatre-senka: rgba(100, 70, 30, .18);
  --dyska: #C8A064;
  --dyska-svetla: #DAB67E;
  --dyska-tamna: #A98148;
  --dantela: #F8F0E0;
  --sunce: .7;
  --noshtna-lampa: .25;
  --toplo: rgba(255, 206, 140, .14);
  --toplo-boya: rgba(255, 240, 210, .12);
  --plamak: .7;
  --glina: #A9694C;
  --glina-svetla: #C4876A;
  --tenekia: #A39B8E;
  --tenekia-svetla: #E2DBCD;
  --shevitsa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' shape-rendering='crispEdges'%3E%3Crect width='100%25' height='100%25' fill='%23CFA45E'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='4' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='8' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='10' y='4' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='0' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='6' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='6' y='6' width='2' height='2' fill='%2356708C'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='10' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='12' y='6' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='2' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23F2E7D0'/%3E%3Crect x='8' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='10' y='8' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='8' y='10' width='2' height='2' fill='%23B0574A'/%3E%3Crect x='6' y='12' width='2' height='2' fill='%23B0574A'/%3E%3C/svg%3E");
  --gr-1: #7C3E36;
  --gr-3: #7A6035;
  --syanka: rgba(80, 56, 30, .3);
  --cherga: saturate(.6) sepia(.2) brightness(.98);
  --pod: #A88A68;
  --pod-tamno: #8C6F52;
  --podval-fon: #3A4A60;
  --podval-bukvi: #F2EADB;
  --podval-tih: #D0C9BC;
  --podval-linia: #52637A;
  --fokus: #2A2236;
  --chiniya-centar: #F2E7D0;
  --chiniya-rab: #56708C;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--varovo), transparent 70%), var(--stena);
  color: var(--bukvi);
  font-family: var(--tekst);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

/* one calm column, as wide as the cupboard */
.ram {
  width: 100%;
  max-width: calc(560px + 2 * 16px);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* the room: the wall, the cupboard and the floor; the lamp light stays inside it */
.staya {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* the top of the wall: the mark home on the left, the painted plate switch on the right, as on the story page */
.gornica {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-bottom: 4px;
}

/* the brand mark: the last о is the dinosaur eye */
.znak {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--bukvi);
  text-decoration: none;
  border-radius: 6px;
}

.oko {
  display: inline-block;
  width: .56em;
  height: .56em;
  margin-left: .04em;
  border-radius: 50%;
  background: currentColor;
  position: relative;
  transform: translateY(.14em);
}

.oko::after {
  content: "";
  position: absolute;
  width: 32%;
  height: 32%;
  top: 16%;
  right: 16%;
  border-radius: 50%;
  background: var(--oko-zenitsa, var(--stena));
}

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

/* the day and night switch: a small painted plate, cream in the middle, ochre and blue rings */
.tema {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--chiniya-ikona);
  background:
    radial-gradient(circle, var(--chiniya-centar) 0 13.5px, var(--boya-svetla) 14px 15.5px, var(--ohra) 16px 19.5px, var(--cherveno) 20px 21px, var(--ohra) 21.5px 22.5px, var(--chiniya-rab) 23px);
  box-shadow: 0 2px 4px var(--syanka);
  -webkit-tap-highlight-color: transparent;
}

.tema[hidden] { display: none; }
.tema:hover { filter: brightness(1.06); }
.tema svg { display: block; width: 20px; height: 20px; }
.tema .sunce { display: none; }
.tema[aria-pressed="true"] .sunce { display: inline; }
.tema[aria-pressed="true"] .mesec { display: none; }

/* the way back to the whole cupboard */
.nazad {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0 0 6px -4px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--bukvi);
  text-decoration: none;
}

.nazad svg { flex: none; width: 20px; height: 20px; }
.nazad:hover { text-decoration: underline; text-underline-offset: 4px; }

/* one compartment of the home cupboard, opened: the crest with the world's plaque, one shelf, the doors below */
.dolap {
  position: relative;
  z-index: 1;
}

.vrah {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 2.4fr) 1fr;
  align-items: end;
}

/* a clay pot of red geraniums standing on the cupboard top, left */
.saksiya {
  position: relative;
  justify-self: center;
  width: 5.6em;
  max-width: 100%;
  height: 6.6em;
  font-size: 9px;
}

.saksiya::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.3em;
  width: 4.4em;
  height: .8em;
  margin-left: -2.2em;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--syanka), transparent);
}

.sakcia {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3.4em;
  height: 2.7em;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .16) 40%, rgba(0, 0, 0, .22)), var(--glina);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
}

.sakcia::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 22%;
  background: var(--glina-svetla);
}

.muskato {
  position: absolute;
  left: 50%;
  bottom: 2.3em;
  width: 5.4em;
  height: 3.9em;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 28%, var(--cherveno) 0 11%, transparent 12%),
    radial-gradient(circle at 22% 40%, var(--cherveno) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 22%, var(--cherveno) 0 12%, transparent 13%),
    radial-gradient(circle at 74% 36%, var(--cherveno) 0 9%, transparent 10%),
    radial-gradient(circle at 48% 36%, var(--cherveno) 0 8%, transparent 9%),
    radial-gradient(circle at 20% 76%, var(--zeleno) 0 20%, transparent 21%),
    radial-gradient(circle at 50% 70%, var(--zeleno) 0 24%, transparent 25%),
    radial-gradient(circle at 80% 78%, var(--zeleno) 0 20%, transparent 21%);
}

/* the crest: an arched painted board with a garland and the world's plaque */
.greben {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 8px 10px;
  border-radius: 50% 50% 0 0 / 42px 42px 0 0;
  background: var(--chetka), radial-gradient(120% 100% at 90% 0, var(--toplo-boya), transparent 70%), var(--boya);
  box-shadow: inset 0 0 0 3px var(--boya-tamna), inset 0 0 0 5px var(--ohra);
}

.greben svg { display: block; width: 66%; max-width: 200px; height: auto; }

.plocha {
  display: grid;
  justify-items: center;
  max-width: 100%;
  padding: 6px 18px 8px;
  border-radius: 999px;
  background: var(--plocha);
  color: var(--plocha-tekst);
  box-shadow: inset 0 0 0 2px var(--plocha), inset 0 0 0 3.5px var(--cherveno), 0 2px 3px rgba(0, 0, 0, .3);
  text-align: center;
}

.plocha h1 {
  margin: 0;
  font-family: var(--zaglavie);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
  white-space: nowrap;
}

.plocha p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.25;
}

/* the tin oil lamp on its nail, with a round tin mirror behind the glass */
.lampa {
  position: relative;
  justify-self: center;
  width: 5.4em;
  height: 9.6em;
  margin-bottom: 8px;
  font-size: 9px;
  pointer-events: none;
}

/* the warm light of the lamp on the room; behind the cupboard, never over a tap */
.lampa::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 3.6em;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  background: radial-gradient(closest-side, var(--toplo), transparent);
}

.lampa > span { position: absolute; display: block; left: 50%; }

.ogledalo {
  top: .8em;
  width: 5.2em;
  height: 5.2em;
  margin-left: -2.6em;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--tenekia-svetla) 0 .35em, var(--tenekia) .35em .5em);
  box-shadow: 0 2px 4px var(--syanka);
}

.ogledalo::before {
  content: "";
  position: absolute;
  top: -.8em;
  left: 50%;
  width: .4em;
  height: .4em;
  margin-left: -.2em;
  border-radius: 50%;
  background: var(--tenekia);
}

.balon {
  top: 2.2em;
  width: 2.4em;
  height: 3em;
  margin-left: -1.2em;
  border-radius: 40% 40% 50% 50% / 30% 30% 60% 60%;
  background: radial-gradient(circle at 50% 62%, rgba(255, 240, 200, calc(.55 * var(--noshtna-lampa))), rgba(255, 255, 255, .14) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.balon::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 1.3em;
  height: 1.6em;
  margin-left: -.65em;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.plamak {
  top: 3.4em;
  width: .7em;
  height: 1.3em;
  margin-left: -.35em;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(circle at 50% 72%, #FFFBEA, #FFD36B 45%, #F08A2A);
  box-shadow: 0 0 calc(14px * var(--noshtna-lampa)) calc(5px * var(--noshtna-lampa)) rgba(255, 196, 96, .7);
  transform: scale(var(--plamak));
  transform-origin: 50% 100%;
}

.yaka {
  top: 5.1em;
  width: 2em;
  height: .55em;
  margin-left: -1em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--tenekia-svetla), var(--ohra));
}

.rezervoar {
  top: 5.55em;
  width: 3.2em;
  height: 1.9em;
  margin-left: -1.6em;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, .45), transparent 40%), var(--zeleno);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
}

.konzola {
  top: 7.4em;
  width: 3.8em;
  height: .5em;
  margin-left: -1.9em;
  border-radius: 1px;
  background: var(--tenekia);
  box-shadow: 0 2px 3px var(--syanka);
}

.konzola::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: .5em;
  height: 1.6em;
  margin-left: -.25em;
  background: var(--tenekia);
}

/* the cornice under the crest */
.korniz {
  position: relative;
  height: 12px;
  margin-inline: -6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--ohra) 0 3px, var(--boya-svetla) 3px 8px, var(--boya-tamna) 8px);
  box-shadow: 0 6px 10px -6px var(--syanka);
}

/* the painted body; its stiles carry a cross stitch band round the open shelf */
.telo {
  position: relative;
  padding: 8px;
  background: var(--chetka), radial-gradient(120% 70% at 100% 0, var(--toplo-boya), transparent 70%), var(--boya);
  box-shadow: inset 2px 0 0 var(--boya-svetla), inset -2px 0 0 var(--boya-tamna);
}

.lenta {
  padding: 10px;
  background: var(--shevitsa) 0 0 / 14px 14px round;
  box-shadow: 0 0 0 1.5px var(--krem);
}

.vatre {
  /* the size of one book; every prop on the shelf is measured from it */
  --w: clamp(120px, 38vw, 150px);
  --h: calc(var(--w) * 4 / 3);
  --t: calc(var(--w) * .17);
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 58px, var(--vatre-shev) 58px 60px),
    linear-gradient(180deg, var(--vatre-2), var(--vatre) 40%, var(--vatre-2));
  box-shadow: 0 0 0 1.5px var(--krem), inset 0 12px 22px var(--vatre-senka), inset 0 0 0 1px var(--boya-tamna);
}

/* day: soft sunlight from the top left; off at night */
.vatre::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--sunce);
  background:
    radial-gradient(70% 46% at 0 0, rgba(255, 248, 220, .75), transparent 72%),
    linear-gradient(122deg, transparent 0 4%, rgba(255, 248, 222, .5) 4% 12%, transparent 12% 18%, rgba(255, 248, 222, .36) 18% 24%, transparent 24%);
  -webkit-mask-image: linear-gradient(150deg, #000 15%, transparent 72%);
  mask-image: linear-gradient(150deg, #000 15%, transparent 72%);
  filter: blur(5px);
}

/* night: the lamp light falls in from the top right */
.vatre::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--noshtna-lampa);
  background: radial-gradient(90% 60% at 100% 0, rgba(255, 180, 96, .26), transparent 75%);
}

/* the shelf: the world's books, props at the left. Every book stays in view: what does not fit on a plank wraps onto
   the next plank down, as on the home cupboard with one plank per row. */
.red {
  --pervi: 28px; /* the .red top padding plus the .niz top padding: where the first row of books starts */
  --mezhdu: 84px; /* from one row's foot to the next row's top: the plank, the hanging shelf tag and some air */
  --rad: calc(var(--h) + var(--mezhdu)); /* one row of books and the gap under it */
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 12px 8px 0;
  pointer-events: none;
}

/* the planks between rows, painted on the shelf band once per row pitch, as .dyska and its crochet edging are drawn.
   The last row stands on .dyska itself; its pitch falls just outside this box, so a one row shelf gets no extra plank.
   Only on a shelf of two books or more. */
.red:has(.knigi > li + li) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px),
    linear-gradient(180deg, var(--dyska-svetla) 0 8px, transparent 8px),
    linear-gradient(180deg, var(--dyska) 8px, var(--dyska-tamna) 30px, transparent 30px),
    radial-gradient(circle at 6px 32px, transparent 0 1.6px, var(--dantela) 2px 5px, transparent 5.5px),
    linear-gradient(180deg, transparent 30px, var(--dantela) 30px 32px, transparent 32px),
    radial-gradient(circle at 6px 33px, transparent 0 1.6px, rgba(0, 0, 0, .25) 2px 5px, transparent 5.5px),
    linear-gradient(180deg, transparent 31px, rgba(0, 0, 0, .25) 31px 33px, transparent 33px),
    linear-gradient(180deg, transparent 22px, var(--syanka) 22px, transparent 44px);
  background-size:
    100% var(--rad), 100% var(--rad), 100% var(--rad), 100% var(--rad),
    12px var(--rad), 100% var(--rad), 12px var(--rad), 100% var(--rad), 100% var(--rad);
  background-position: 0 calc(var(--pervi) + var(--h));
  background-repeat: repeat;
}

/* the row of books wraps instead of scrolling sideways; the props stand at the left of the first row */
.niz {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  align-content: flex-start;
  gap: var(--mezhdu) 12px;
  padding: 16px 12px 0;
  pointer-events: auto;
}

/* the list's books join the props in the one wrapping row */
.knigi {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.knigi li { flex: none; }

/* the painted plank, with grandmother's crochet edging hanging from its front */
.dyska {
  position: relative;
  z-index: 1;
  height: 30px;
  background:
    linear-gradient(180deg, var(--dyska-svetla) 0 8px, transparent 8px),
    linear-gradient(180deg, var(--dyska) 8px, var(--dyska-tamna));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 8px 0 -7px rgba(0, 0, 0, .25), 0 10px 14px -8px var(--syanka);
}

.dyska::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  background:
    radial-gradient(circle at 6px 2px, transparent 0 1.6px, var(--dantela) 2px 5px, transparent 5.5px) 0 0 / 12px 8px repeat-x,
    linear-gradient(180deg, var(--dantela) 0 2px, transparent 2px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
}

/* room under the plank for the hanging tag and the edging */
.dolu { height: 48px; }

/* a book that stands face out: front, spine, page block, back and top, in 3D */
.kniga {
  position: relative;
  display: block;
  perspective: 1100px;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

.kniga::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: calc(var(--w) * 1.08);
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
}

a.kniga:focus-visible { outline-offset: 8px; }

.tom {
  position: relative;
  display: block;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  transform: rotateY(var(--ugal));
}

.kniga--gramb { --ugal: 26deg; }
.kniga--strani { --ugal: -26deg; }

.tom > span { position: absolute; display: block; }

.lice {
  inset: 0;
  overflow: hidden;
  border-radius: 2px 5px 5px 2px;
  background: var(--plat);
  transform: translateZ(calc(var(--t) / 2));
}

.lice img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the hinge groove next to the spine, the cloth edge and a soft sheen */
.lice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 11%;
  background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(255, 255, 255, .14) 50%, rgba(0, 0, 0, .22) 72%, transparent);
}

.lice::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), inset 0 0 14px rgba(0, 0, 0, .25);
  background: linear-gradient(110deg, rgba(255, 255, 255, .16), transparent 38%);
}

/* the title on a paper label stuck to the cover */
.ime {
  position: absolute;
  z-index: 1;
  top: 6%;
  left: 15%;
  right: 7%;
  padding: .4em .5em .45em;
  border-radius: 2px;
  background: var(--hartiya);
  color: var(--mastilo);
  font-family: var(--zaglavie);
  font-weight: 400;
  font-size: calc(var(--w) * .1);
  line-height: 1.12;
  text-align: center;
  text-wrap: balance;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(43, 33, 24, .18);
}

.gramb {
  top: 0;
  left: calc(50% - var(--t) / 2);
  width: var(--t);
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 3px;
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background:
    linear-gradient(180deg, transparent 0 7%, var(--folio) 7% 8%, transparent 8% 10.5%, var(--folio) 10.5% 11.5%, transparent 11.5% 88.5%, var(--folio) 88.5% 89.5%, transparent 89.5% 92%, var(--folio) 92% 93%, transparent 93%),
    linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(255, 255, 255, .12) 45%, rgba(0, 0, 0, .3)),
    var(--plat);
}

.gramb b {
  writing-mode: vertical-rl;
  font-family: var(--zaglavie);
  font-weight: 400;
  font-size: calc(var(--t) * .42);
  white-space: nowrap;
  color: var(--folio);
  max-height: 72%;
  overflow: hidden;
}

/* the page block at the fore edge, framed by the cover boards */
.strani {
  top: 0;
  left: calc(50% - var(--t) / 2);
  width: var(--t);
  height: 100%;
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 1px));
  border: solid var(--plat);
  border-width: 3px 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 30%, transparent 70%, rgba(0, 0, 0, .25)),
    repeating-linear-gradient(90deg, var(--hartiya) 0 1.3px, var(--hartiya-rub) 1.3px 2px);
  box-shadow: inset 0 4px 5px -2px rgba(0, 0, 0, .45), inset 0 -3px 4px -2px rgba(0, 0, 0, .35);
}

.gore {
  top: calc(50% - var(--t) / 2);
  left: 0;
  width: 100%;
  height: var(--t);
  transform: rotateX(90deg) translateZ(calc(var(--h) / 2));
  border: solid var(--plat);
  border-width: 3px 3px 3px 0;
  background: repeating-linear-gradient(180deg, var(--hartiya) 0 1.3px, var(--hartiya-rub) 1.3px 2px);
}

.garb {
  inset: 0;
  border-radius: 5px 2px 2px 5px;
  background: var(--plat);
  transform: rotateY(180deg) translateZ(calc(var(--t) / 2));
}

/* the shelf tag under the book, with a red cross stitch at its top: the world, then the minutes */
.etiket {
  position: absolute;
  top: calc(100% + 13px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  min-width: 96px;
  padding: 8px 12px 7px;
  border-radius: 2px 2px 6px 6px;
  background: var(--hartiya);
  color: var(--mastilo);
  font-size: .8125rem;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 3px 6px -2px rgba(0, 0, 0, .45);
}

.etiket::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  background:
    repeating-linear-gradient(45deg, transparent 0 1.6px, var(--cherveno) 1.6px 2.8px, transparent 2.8px 4px),
    repeating-linear-gradient(-45deg, transparent 0 1.6px, var(--cherveno) 1.6px 2.8px, transparent 2.8px 4px);
}

.etiket b { font-weight: 700; }

/* the one moment: on hover, focus or tap the book tips out of the shelf */
@media (prefers-reduced-motion: no-preference) {
  .tom { transition: transform .55s cubic-bezier(.2, .75, .2, 1); }
  .kniga::before { transition: opacity .55s; }
}

a.kniga:hover .tom,
a.kniga:focus-visible .tom {
  transform: translateY(-6px) translateZ(22px) rotateX(-7deg) rotateY(calc(var(--ugal) * .45));
}

a.kniga:hover::before,
a.kniga:focus-visible::before { opacity: .55; }

/* props: plain untitled cloth spines held by a painted bookend, keeping the places of stories still to come */
.gramboye {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  flex: none;
}

.gramboye span {
  display: block;
  width: calc(var(--w) * var(--s, .11));
  height: calc(var(--h) * var(--v, .8));
  border-radius: 2px 2px 1px 1px;
  background:
    linear-gradient(180deg, transparent 0 9%, rgba(242, 210, 124, .7) 9% 10.5%, transparent 10.5% 88%, rgba(242, 210, 124, .7) 88% 89.5%, transparent 89.5%),
    linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(255, 255, 255, .1) 45%, rgba(0, 0, 0, .3)),
    var(--c);
}

.gramboye span:nth-child(1) { --c: var(--gr-1); --v: .8; --s: .12; }
.gramboye span:nth-child(2) { --c: var(--gr-2); --v: .9; --s: .1; }
.gramboye span:nth-child(3) { --c: var(--gr-3); --v: .74; --s: .13; }
.gramboye span:nth-child(4) { --c: var(--gr-4); --v: .84; --s: .1; }

.dyrzhach {
  position: relative;
  width: 9px;
  height: calc(var(--h) * .56);
  margin-left: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, transparent 0 12%, var(--ohra) 12% 18%, transparent 18%), var(--cherveno);
  box-shadow: 4px 0 8px -3px var(--syanka);
}

/* props: two cloth books lying down, a little Troyan cup on top */
.kup {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
}

.legnala {
  display: block;
  height: calc(var(--t) * .62);
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(242, 210, 124, .65) 7% 8.5%, transparent 8.5% 91.5%, rgba(242, 210, 124, .65) 91.5% 93%, transparent 93%),
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .3)),
    var(--c);
}

.legnala--1 { --c: var(--gr-2); width: calc(var(--w) * .46); }
.legnala--2 { --c: var(--gr-1); width: calc(var(--w) * .54); }

.chashka {
  position: relative;
  width: calc(var(--w) * .22);
  height: calc(var(--w) * .21);
  margin-right: calc(var(--w) * .06);
  border-radius: 2px 2px 40% 40% / 2px 2px 26% 26%;
  background:
    radial-gradient(40% 46% at 22% 0, var(--ohra) 0 70%, transparent 72%),
    radial-gradient(40% 52% at 58% 0, var(--zeleno) 0 70%, transparent 72%),
    radial-gradient(34% 40% at 90% 0, var(--krem) 0 70%, transparent 72%),
    linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(255, 255, 255, .14) 40%, rgba(0, 0, 0, .22)),
    #6E3A20;
}

.chashka::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 92%;
  width: 36%;
  height: 52%;
  border: 3px solid #6E3A20;
  border-left: 0;
  border-radius: 0 50% 50% 0;
}

/* the lower doors, each with a painted bouquet, and the plinth on its feet */
.vrata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.vrata > span {
  position: relative;
  display: grid;
  place-items: center;
  height: 84px;
  border-radius: 3px;
  background: var(--chetka), var(--boya-svetla);
  box-shadow: inset 0 0 0 3px var(--boya), inset 0 0 0 5px var(--ohra), inset 0 0 0 7px var(--boya-svetla), inset 0 2px 8px 6px rgba(0, 0, 0, .18);
}

.vrata svg { display: block; width: auto; height: 60px; }

.vrata > span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--krem), var(--ohra) 60%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.vrata > span:first-child::after { right: 12px; }
.vrata > span:last-child::after { left: 12px; }

.tsokal {
  position: relative;
  z-index: 1;
  height: 12px;
  margin-inline: -4px;
  background: linear-gradient(180deg, var(--ohra) 0 2px, var(--boya-tamna) 2px);
}

.tsokal::before,
.tsokal::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 26px;
  height: 10px;
  border-radius: 0 0 8px 8px;
  background: var(--boya-tamna);
}

.tsokal::before { left: 12px; }
.tsokal::after { right: 12px; }

/* the floor and the woven черга in front of the cupboard */
.pod {
  position: relative;
  margin-top: -2px;
  padding: 18px 0 12px;
  background: linear-gradient(180deg, var(--pod-tamno), var(--pod) 30%, var(--pod-tamno));
}

.cherga {
  height: 42px;
  filter: var(--cherga);
  background:
    var(--cherga-sharka) 0 12px / 32px 18px repeat-x,
    linear-gradient(180deg, #2B2230 0 4px, #E0A93E 4px 7px, #B8332A 7px 10px, #F6E7C8 10px 12px, transparent 12px 30px, #F6E7C8 30px 32px, #B8332A 32px 35px, #E0A93E 35px 38px, #2B2230 38px);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .2), 0 4px 6px -3px rgba(0, 0, 0, .4);
}

/* the footer, as on the home page, right under the floor */
.podval {
  background: var(--podval-fon);
  color: var(--podval-bukvi);
}

.podval .ram { padding-block: 44px calc(28px + env(safe-area-inset-bottom, 0px)); }
.podval p { margin: 0; }
.podval .znak { font-size: 1.75rem; color: var(--podval-bukvi); --oko-zenitsa: var(--podval-fon); }
.podval-za { display: grid; gap: 10px; max-width: 26em; }
.podval-za p { color: var(--podval-tih); font-size: .9375rem; line-height: 1.55; }

.podval-dolu {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--podval-linia);
  color: var(--podval-tih);
  font-size: .8125rem;
}

/* the flame breathes a little, only where motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .plamak { animation: plamak 3.2s ease-in-out infinite alternate; }
  @keyframes plamak {
    from { transform: scale(var(--plamak)); }
    to { transform: scale(calc(var(--plamak) * .93), calc(var(--plamak) * 1.05)); }
  }
}

/* desktop: the same column, a bigger book, the home cupboard's wider measures */
@media (min-width: 640px) {
  .gornica { padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
  .znak { font-size: 1.75rem; }
  .nazad { margin-bottom: 10px; }
  .greben { padding: 10px 16px 10px; border-radius: 50% 50% 0 0 / 56px 56px 0 0; }
  .plocha { padding: 7px 26px 9px; }
  .plocha h1 { font-size: 2.125rem; }
  .plocha p { font-size: .9375rem; }
  .lampa,
  .saksiya { font-size: 11px; }
  .telo { padding: 14px; }
  .lenta { padding: 12px; background-size: 16px 16px; }
  .vatre { --w: 176px; }
  .red { --pervi: 34px; padding: 18px 12px 0; }
  .niz { column-gap: 16px; }
  .etiket { font-size: .875rem; }
  .vrata { gap: 16px; margin-top: 16px; }
  .vrata > span { height: 104px; }
  .vrata svg { height: 76px; }
  .tsokal::before { left: 22px; }
  .tsokal::after { right: 22px; }
  .pod { padding: 22px 0 16px; }
}

/* the dino world's long shelf (six books or more): two books a plank on a phone from 320 px, and from 900 px the
   cupboard takes the width, five to six books a plank. The sea and jungle shelves keep the calm column. */
@media (max-width: 639.98px) {
  body:has(.knigi > li:nth-child(6)) .vatre { --w: clamp(110px, 50vw - 50px, 150px); }
  body:has(.knigi > li:nth-child(6)) .red { padding-left: 4px; padding-right: 4px; }
  body:has(.knigi > li:nth-child(6)) .niz { padding-left: 4px; padding-right: 4px; }
}

@media (min-width: 900px) {
  /* six books of 176 px and five gaps of 16 px, plus the frame round them: 1136 + 132, and a little air */
  body:has(.knigi > li:nth-child(6)) .ram { max-width: 1272px; }
  body:has(.knigi > li:nth-child(6)) .vrah { grid-template-columns: 1fr minmax(190px, 320px) 1fr; }
}

/* the footer link to За Приказко, next to the (c); a full tap target, the same rule as the home page's dom.css */
.podval-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 16px;
  color: var(--podval-bukvi);
  text-underline-offset: 3px;
}
.podval-link:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
