/* ENG-003 · project60.ru · прототип портала (STD-002 palette) */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --ink: #3d3a36;
  --ink-soft: #6b6560;
  --gold: #8a7a62;
  --gold-light: #a89478;
  --gold-pale: #f0ebe3;
  --cream: #f7f5f2;
  --paper: #ffffff;
  --forest: #4a5d52;
  --forest-deep: #3a4a42;
  --line-solid: #e5e0d8;
  --shadow: rgba(61, 58, 54, 0.08);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

/* ── Prototype banner ── */
.proto-banner {
  background: var(--gold-pale);
  color: var(--forest-deep);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--gold-light);
}

/* ── Header ── */
.portal-header {
  background: var(--paper);
  color: var(--ink);
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line-solid);
}

.portal-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--forest-deep);
  letter-spacing: 0.02em;
}
.portal-brand:hover { color: var(--forest); text-decoration: none; }
.portal-brand span { color: var(--ink-soft); font-weight: 400; font-size: 0.85em; }

.portal-header--minimal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(26, 47, 40, 0.72) 0%, rgba(26, 47, 40, 0.25) 55%, transparent 100%);
  border-bottom: none;
  color: #fff;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  z-index: 400;
  flex-wrap: nowrap;
  align-items: center;
}

.portal-header--minimal .portal-header-start {
  flex: 1;
  min-width: 0;
}

.portal-header--minimal .portal-header-end {
  position: relative;
  z-index: 360;
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(26, 47, 40, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem;
}

/* Встроенные страницы: хроника, летопись, оригиналы документов */
.portal-header--reader {
  position: sticky;
  top: 0;
  z-index: 150;
}

.nav-toggle--reader {
  background: var(--cream);
  border: 1px solid var(--line-solid);
  color: var(--forest-deep);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle--reader:hover {
  background: var(--gold-pale);
  border-color: var(--gold-light);
}

.portal-header--reader .portal-drawer a.is-active {
  color: var(--forest-deep);
  font-weight: 700;
}

.portal-header-start {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.portal-header-end,
.portal-header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.portal-locale {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-locale__link {
  color: inherit;
  text-decoration: none !important;
  opacity: 0.85;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  min-width: 1.75rem;
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.portal-locale__link:hover {
  opacity: 1;
}

.portal-locale__link.is-active {
  opacity: 1;
  text-decoration: none !important;
  text-underline-offset: 0.2em;
  cursor: default;
}

.portal-header--minimal .portal-locale__link {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  opacity: 0.9;
}

.portal-header--minimal .portal-locale__link.is-active {
  background: rgba(255, 255, 255, 0.22);
  opacity: 1;
  text-decoration: none !important;
  font-weight: 700;
}

.portal-brand--compact {
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.portal-dayline {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nav-toggle {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(250, 248, 244, 0.1);
}

.portal-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(16rem, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--paper);
  border-left: 1px solid var(--line-solid);
  box-shadow: -8px 0 32px var(--shadow);
  padding: 4rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 350;
}

.portal-drawer[hidden] {
  display: none !important;
}

.portal-drawer a {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-deep);
  text-decoration: none;
}

.portal-drawer a:hover {
  color: var(--forest);
}

body.drawer-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(58, 74, 66, 0.35);
  z-index: 340;
  pointer-events: auto;
  cursor: pointer;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.portal-nav a:hover,
.portal-nav a.is-active {
  color: var(--forest-deep);
  border-bottom-color: var(--forest);
  text-decoration: none;
}

/* ── Main ── */
.portal-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 1.5rem) 3rem;
  width: 100%;
  flex: 1;
}

.portal-main--wide { max-width: 56rem; }

.portal-main--landing {
  max-width: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* ── Home: hero ── */
.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background-color: #3a4a42;
  background-size: cover;
  background-position: center;
  text-align: center;
  color: #fff;
}

.home-hero--fallback {
  background-color: #4a5d52;
  background-image: none;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(20, 36, 30, 0.62) 0%,
    rgba(58, 74, 66, 0.22) 42%,
    rgba(58, 74, 66, 0.45) 100%
  );
}

.home-hero-update {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  max-width: calc(100% - 0.75rem);
  pointer-events: none;
}

.home-hero-update__fab {
  pointer-events: auto;
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  margin: 0;
  padding: 0.45rem 0.95rem 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-left: none;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(
    145deg,
    #fff8e8 0%,
    #f0d88a 42%,
    #e4c05a 100%
  );
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(228, 192, 90, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    padding 0.3s ease;
  animation: home-update-fab-nudge 3.5s ease-in-out infinite;
}

.home-hero-update__fab-bg {
  position: absolute;
  inset: -0.35rem -0.5rem -0.35rem 0;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(
    90deg,
    rgba(255, 236, 160, 0.95) 0%,
    rgba(240, 216, 138, 0.55) 100%
  );
  z-index: -1;
  filter: blur(0);
}

@media (hover: hover) and (pointer: fine) {
  .home-hero-update__fab:hover {
    transform: translateX(2px);
    box-shadow:
      0 10px 32px rgba(0, 0, 0, 0.34),
      0 0 18px rgba(255, 220, 120, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

.home-hero-update.is-open .home-hero-update__fab {
  animation: none;
  padding-right: 0.65rem;
}

.home-hero-update.is-open .home-hero-update__fab-hint {
  max-width: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
}

.home-hero-update__fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-hero-update__fab-hint {
  max-width: 12rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #1a2f28;
  white-space: nowrap;
  transition: max-width 0.3s ease, opacity 0.25s ease;
}

.home-hero-update__dot {
  display: block;
  flex-shrink: 0;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: #c0392b;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.55);
  animation: home-update-pulse 2s ease-in-out infinite;
}

.home-hero-update__panel {
  pointer-events: auto;
  position: relative;
  width: min(19rem, calc(100vw - 4.5rem));
  margin-left: 0;
  padding: 1.05rem 1.2rem 1.1rem 1.1rem;
  background: linear-gradient(
    145deg,
    #fff8e8 0%,
    #f0d88a 38%,
    #e4c05a 100%
  );
  color: var(--forest-deep);
  border-radius: 0 18px 18px 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-left: 5px solid #fff;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-0.75rem);
  transition:
    max-width 0.35s ease,
    opacity 0.28s ease,
    transform 0.35s ease,
    margin-left 0.35s ease;
}

.home-hero-update.is-open .home-hero-update__panel {
  max-width: min(19rem, calc(100vw - 4.5rem));
  opacity: 1;
  margin-left: 0.35rem;
  transform: translateX(0);
}

.home-hero-update__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(45, 74, 62, 0.12);
  color: var(--forest-deep);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.home-hero-update__close:focus-visible {
  outline: 2px solid var(--forest-deep);
  outline-offset: 2px;
}

.home-hero-update__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 74, 62, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

.home-hero-update__badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #c0392b;
}

.home-hero-update__text {
  margin: 0 0 0.85rem;
  padding-right: 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-weight: 600;
  line-height: 1.45;
  color: #1a2f28;
}

.home-hero-update__link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--forest-deep);
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(26, 46, 36, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .home-hero-update__link:hover {
    background: var(--forest);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26, 46, 36, 0.34);
    text-decoration: none !important;
  }
}

@keyframes home-update-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(192, 57, 43, 0);
    transform: scale(1.12);
  }
}

@keyframes home-update-fab-nudge {
  0%,
  78%,
  100% {
    transform: translateX(0);
  }
  84% {
    transform: translateX(4px);
  }
  90% {
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .home-hero-update {
    top: auto;
    bottom: 7.5rem;
    transform: none;
  }

  .home-hero-update__text {
    font-size: 0.92rem;
    margin-bottom: 0.7rem;
  }
}

@media (max-width: 640px) {
  .home-hero-update {
    top: max(5.25rem, calc(env(safe-area-inset-top) + 4.25rem));
    bottom: auto;
    transform: none;
  }

  .home-hero-update__fab-hint {
    max-width: 7.5rem;
    white-space: normal;
    font-size: 0.66rem;
  }

  .home-hero-update__panel,
  .home-hero-update.is-open .home-hero-update__panel {
    width: min(17rem, calc(100vw - 3.75rem));
    max-width: min(17rem, calc(100vw - 3.75rem));
  }

  .home-hero-update__text {
    font-size: 0.88rem;
    margin-bottom: 0.55rem;
  }
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 38rem;
  width: 100%;
  margin: 0 auto;
  padding: 5.5rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
}

.home-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 0.35rem;
  color: #fff;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

.home-hero-brand {
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
}

.home-hero-manifest {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3.2vw, 1.4rem);
  line-height: 1.5;
  margin-bottom: 1.1rem;
  color: #fff;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.32);
  max-width: 26rem;
}

.home-hero-closing {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.96);
  margin-bottom: 1rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.28);
  max-width: 26rem;
}

.home-hero-tagline {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.home-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  max-width: 20rem;
}

.home-hero .portal-cta--book {
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest-deep) !important;
  border: 1px solid transparent;
}

.home-hero .portal-cta--outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #fff !important;
}

.home-hero .portal-cta--outline-light:hover {
  background: rgba(250, 248, 244, 0.1);
}

.home-hero-scroll {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  animation: hero-pulse-scroll 2.5s ease-in-out infinite;
}

.home-hero-scroll:hover { color: rgba(255, 255, 255, 0.95); }

@keyframes hero-pulse-scroll {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 0.95; transform: translateY(3px); }
}

/* Пульс — низ первого экрана */
.home-hero-pulse {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.1rem clamp(1rem, 4vw, 2rem) max(1.35rem, env(safe-area-inset-bottom));
  background: linear-gradient(
    to top,
    rgba(26, 47, 40, 0.82) 0%,
    rgba(26, 47, 40, 0.48) 55%,
    transparent 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-hero-pulse__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.55rem;
}

.home-hero-pulse__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 4.5rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: color 0.15s, transform 0.15s;
}

.home-hero-pulse__item:hover {
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.home-hero-pulse__num {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-hero-pulse__label {
  font-size: clamp(0.68rem, 1.8vw, 0.78rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.78;
}

.home-hero-pulse__sep {
  display: none;
}

.home-hero-pulse .home-hero-scroll {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

@media (max-width: 520px) {
  .home-hero-pulse__row {
    gap: 0.45rem 1rem;
  }
  .home-hero-pulse__item {
    min-width: 3.75rem;
  }
}

@media (max-width: 640px) {
  /* На главной h1 дублирует бренд — оставляем только строку «N-й день» слева */
  body.page-home .portal-header--minimal .portal-brand--compact {
    display: none;
  }

  .portal-header--minimal .portal-dayline {
    font-size: 0.65rem;
    line-height: 1.35;
  }

  .home-hero-inner {
    padding-top: max(11rem, calc(env(safe-area-inset-top) + 9rem));
    justify-content: center;
  }

  .home-hero-title {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }
}

/* ── Home: screens §5–8 ── */
.home-screen {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1rem, 4vw, 1.5rem);
}

.home-screen-title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 4vw, 2rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.home-screen-lead {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

/* ── Home: «Последнее в проекте» ── */
.home-poslednee,
.home-seychas {
  background: var(--paper);
  border-bottom: 1px solid var(--line-solid);
  max-width: none;
}

.home-poslednee .home-screen-title,
.home-poslednee-feature,
.home-poslednee-date,
.home-poslednee-event-title,
.home-poslednee-lede,
.home-poslednee-cta,
.home-poslednee-empty,
.home-seychas .home-screen-title,
.home-seychas-feature,
.home-seychas-date,
.home-seychas-event-title,
.home-seychas-lede,
.home-seychas-cta,
.home-seychas-empty {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.home-poslednee-feature,
.home-seychas-feature {
  margin: 0 auto 1rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(45, 74, 62, 0.12);
}

.home-poslednee-feature a,
.home-seychas-feature a {
  display: block;
  line-height: 0;
}

.home-poslednee-feature img,
.home-seychas-feature img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.home-poslednee-date,
.home-seychas-date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.35rem;
}

.home-poslednee-event-title,
.home-seychas-event-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  color: var(--ink);
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.home-poslednee-lede,
.home-seychas-lede {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.home-poslednee-empty,
.home-seychas-empty {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.home-watch {
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line-solid);
  max-width: none;
}

.home-watch .home-screen-title,
.home-watch .home-screen-lead,
.home-watch .watch-shell,
.home-watch .home-photos-empty {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.home-watch .home-screen-title,
.home-watch .home-screen-lead {
  max-width: 42rem;
}

/* ── Home: «Смотреть» — лента событий ── */
.watch-shell {
  --watch-slide-w: min(72vw, 17rem);
  --watch-gap: 0.75rem;
  margin-top: 0.5rem;
}

.watch-events-scroller {
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc((100% - var(--watch-slide-w)) / 2);
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.watch-events-scroller.is-dragging .watch-slide {
  pointer-events: none;
}

.watch-slide:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

@media (max-width: 719px) {
  .watch-shell {
    --watch-slide-w: min(86vw, 22rem);
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .watch-events-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin-left: calc(-1 * clamp(1rem, 4vw, 1.5rem));
    margin-right: calc(-1 * clamp(1rem, 4vw, 1.5rem));
    width: calc(100% + 2 * clamp(1rem, 4vw, 1.5rem));
    max-width: 100vw;
  }

  .watch-nav {
    display: none;
  }

  .watch-slide {
    transform: none;
    opacity: 0.65;
  }

  .watch-slide.is-active {
    transform: none;
    opacity: 1;
  }

  .watch-slide-figure {
    background: var(--cream);
  }

  .watch-slide-figure img {
    aspect-ratio: auto;
    height: auto;
    max-height: min(58vw, 20rem);
    object-fit: contain;
    object-position: center center;
  }

  .watch-slide-date {
    font-size: 0.88rem;
  }

  .watch-slide.is-active .watch-slide-date {
    font-size: 1.12rem;
  }

  .watch-year-nav {
    max-width: 100%;
    overflow: hidden;
  }

  .watch-year-nav__years {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
}

.watch-events-scroller::-webkit-scrollbar {
  display: none;
}

.watch-events-track {
  display: flex;
  align-items: stretch;
  gap: var(--watch-gap);
  padding: 0 calc((100% - var(--watch-slide-w)) / 2);
  min-width: min-content;
}

.watch-events-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.watch-nav {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-solid);
  background: var(--paper);
  color: var(--forest);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.watch-nav:hover:not(:disabled) {
  background: var(--cream);
  border-color: var(--forest);
}

.watch-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.watch-slide {
  flex: 0 0 var(--watch-slide-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(45, 74, 62, 0.08);
  opacity: 0.52;
  transform: scale(0.9);
  transform-origin: center bottom;
  transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
  cursor: pointer;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.watch-slide.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 10px 32px rgba(45, 74, 62, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .watch-slide:not(.is-active):hover {
    opacity: 0.78;
    transform: scale(0.95);
    box-shadow: 0 6px 22px rgba(45, 74, 62, 0.14);
  }

  .watch-slide.is-active:hover {
    transform: scale(1.04);
    box-shadow: 0 14px 38px rgba(45, 74, 62, 0.22);
  }

  .watch-slide:hover .watch-slide-figure img {
    transform: scale(1.06);
  }
}

.watch-slide-figure {
  margin: 0;
  line-height: 0;
  overflow: hidden;
}

.watch-slide-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease;
}

.watch-slide--no-photo .watch-slide-figure {
  background: var(--gold-pale);
  border: 1px dashed var(--line-solid);
}

.watch-slide-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
}

.watch-slide-date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
  opacity: 0.55;
  padding: 0.7rem 0.85rem 0.2rem;
  margin: 0;
  transition: font-size 0.28s ease, color 0.28s ease, opacity 0.28s ease;
}

.watch-slide.is-active .watch-slide-date {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--forest-deep);
  opacity: 1;
  letter-spacing: 0.05em;
}

.watch-slide-title {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: center;
  color: var(--ink-soft);
  padding: 0.15rem 0.85rem 0.85rem;
  margin: 0;
  transition: color 0.28s ease, opacity 0.28s ease;
}

.watch-slide.is-active .watch-slide-title {
  color: var(--ink);
  font-size: 0.98rem;
}

@media (min-width: 720px) {
  .watch-shell {
    --watch-slide-w: min(28vw, 18rem);
  }

  .watch-events-bar {
    gap: 0.65rem;
  }

  .watch-nav {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.watch-year-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-top: 1.1rem;
  padding: 0 0.25rem;
}

.watch-year-edge {
  flex-shrink: 0;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.watch-year-edge:hover:not(:disabled) {
  background: rgba(45, 74, 62, 0.06);
  color: var(--forest-deep);
}

.watch-year-edge:disabled {
  opacity: 0.35;
  cursor: default;
}

.watch-year-nav__years {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.35rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0;
}

.watch-year-nav__years::-webkit-scrollbar {
  display: none;
}

.watch-year-sep {
  color: var(--ink-soft);
  opacity: 0.45;
  font-size: 0.82rem;
  user-select: none;
  padding: 0 0.05rem;
}

.watch-year-btn {
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0.55;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.watch-year-btn:hover:not(:disabled):not(.watch-year-btn--empty) {
  color: var(--forest);
  opacity: 1;
}

.watch-year-btn.is-active {
  color: var(--forest-deep);
  opacity: 1;
  font-size: 0.92rem;
  font-weight: 700;
}

.watch-year-btn--empty,
.watch-year-btn:disabled {
  opacity: 0.22;
  cursor: default;
}

@media (max-width: 719px) {
  .watch-year-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .watch-year-nav__years {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
  }

  .watch-year-edge {
    font-size: 0.82rem;
  }
}

.home-photos-heading {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.75rem;
}

.home-photos-empty {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

.home-photos-more {
  display: inline-block;
  margin-top: 0.75rem;
}

.photo-grid--home {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .photo-grid--home {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .photo-grid--home .photo-grid-item {
    aspect-ratio: 1;
    border-radius: 10px;
  }
}

.home-latest {
  background: var(--paper);
  border-bottom: 1px solid var(--line-solid);
  max-width: none;
}

.home-latest .home-screen-title,
.home-latest .home-screen-lead,
.home-latest .latest-cards {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.home-pulse {
  background: var(--paper);
  border-bottom: 1px solid var(--line-solid);
  max-width: none;
}

.home-pulse .home-screen-title,
.home-pulse .home-screen-lead,
.home-pulse .pulse-list {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.pulse-list {
  list-style: none;
  font-size: 1.05rem;
  line-height: 1.85;
}

.pulse-list a {
  color: var(--ink);
  text-decoration: none;
}

.pulse-list a:hover {
  color: var(--forest);
  text-decoration: underline;
}

.pulse-dot {
  color: var(--forest);
  font-size: 0.65rem;
  vertical-align: middle;
}

.pulse-update {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.today-heading {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--forest-deep);
  margin-bottom: 1.25rem;
}

.today-timeline {
  list-style: none;
}

.today-entry {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-solid);
  align-items: baseline;
}

.today-year {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.today-event {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.today-event:hover {
  color: var(--forest);
}

.latest-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.85rem;
}

.latest-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1.15rem 1.1rem;
  text-decoration: none !important;
  color: inherit;
  transition: box-shadow 0.15s;
}

.latest-card:hover {
  box-shadow: 0 4px 16px var(--shadow);
}

.latest-icon {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.latest-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.latest-date {
  display: block;
  font-size: 0.78rem;
  color: var(--forest);
  margin-bottom: 0.25rem;
}

.latest-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--forest-deep);
  line-height: 1.35;
}

.today-empty {
  font-style: italic;
  color: var(--ink-soft);
}

.home-about-text {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.home-about {
  border-top: 1px solid var(--line-solid);
}

.home-about-quote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--forest-deep);
  border-left: 3px solid var(--forest);
  margin: 1.25rem 0 1.5rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
}

/* ── Home: три основы ── */
.home-pillars {
  border-top: 1px solid var(--line-solid);
  max-width: none;
  background: var(--cream);
}

.home-pillars .home-screen-title,
.home-pillars .home-screen-lead,
.home-pillars .pillars-grid {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 960px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

.pillar-card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  padding: 1.35rem 1.25rem;
  text-align: left;
}

.pillar-card--accent {
  border-color: var(--forest);
  box-shadow: 0 4px 20px var(--shadow);
}

.pillar-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.65rem;
}

.pillar-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  margin-bottom: 0.5rem;
}

.pillar-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.pillar-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}

.pillar-link:hover { text-decoration: underline; }

/* ── Home: человек + AI ── */
.home-ai {
  border-top: 1px solid var(--line-solid);
  padding-bottom: 4rem;
}

.home-ai-lead {
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.home-ai-list {
  margin: 0.5rem 0 1.25rem 1.25rem;
  line-height: 1.85;
  color: var(--ink);
}

.home-ai-quote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--forest-deep);
  border-left: 3px solid var(--gold);
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
}

.home-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Team & AI pages ── */
.portal-list {
  margin: 0 0 0 1.25rem;
  line-height: 1.85;
}

.team-section-label {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 600;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  padding: 1.35rem 1.25rem;
}

.team-card--human {
  border-left: 3px solid var(--gold);
  max-width: 28rem;
}

.team-card--ai {
  border-left: 3px solid var(--forest);
}

.team-card--lead {
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--paper) 0%, var(--cream) 100%);
  box-shadow: 0 4px 24px var(--shadow);
}

.ai-team-intro {
  background: var(--cream);
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  padding: 1.35rem 1.5rem;
}

.ai-team-roles {
  margin-top: 0.75rem;
}

.ai-team-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  margin-bottom: 0;
}

.team-future-list li {
  list-style: none;
  margin-left: -1.25rem;
  padding-left: 0;
}

.team-future-icon {
  display: inline-block;
  width: 1.5rem;
}

.team-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-deep);
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.team-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

.team-future-list {
  columns: 2;
  margin: 0.75rem 0 0 1.25rem;
  line-height: 1.85;
}

@media (max-width: 520px) {
  .team-future-list { columns: 1; }
}

.team-future-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  font-style: italic;
}

/* ── Home: «Спросить» ── */
.home-ask {
  border-top: 1px solid var(--line-solid);
  max-width: none;
  background: linear-gradient(165deg, var(--forest-deep) 0%, #2d4a3e 100%);
  color: #fff;
  padding-bottom: clamp(3rem, 8vw, 4.5rem);
}

.home-ask-inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.home-ask-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.25);
}

.home-ask-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.5rem;
}

.home-ask-presets {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.home-ask-preset {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.home-ask-preset:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.home-ask-custom {
  margin-bottom: 0.35rem;
}

.home-ask-custom-hint {
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.15rem;
}

.home-ask-max {
  margin-bottom: 1.1rem;
}

.home-ask-max__lead {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 0.75rem;
}


.home-ask-note,
.home-ask-hint {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0.35rem 0 0;
}

.home-more {
  background: var(--cream);
  border-top: 1px solid var(--line-solid);
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.home-more-links {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

.home-more-links a {
  color: var(--forest);
  text-decoration: none;
}

.home-more-links a:hover {
  text-decoration: underline;
}

/* ── Chronicle event pages ── */
.chr-event-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-solid);
}

.chr-event-nav:last-of-type {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  border-top: 1px solid var(--line-solid);
  padding-top: 1.5rem;
}

.chr-event-nav__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}

.chr-event-nav__link:hover {
  color: var(--forest-deep);
  text-decoration: underline;
}

.chr-event-nav__prev { justify-self: start; }
.chr-event-nav__index { justify-self: center; font-weight: 500; color: var(--ink-soft); }
.chr-event-nav__next { justify-self: end; }

.chr-event-nav__link.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chr-event-header {
  margin-bottom: 1.25rem;
}

.chr-event-date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.35rem;
}

.chr-event-title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.2;
  color: var(--ink);
}

.chr-event-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.chr-event-body p + p {
  margin-top: 0.85rem;
}

.chr-event-quote {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--forest);
  background: rgba(245, 236, 215, 0.35);
  color: var(--ink);
}

.chr-event-quote--thought {
  border-left-color: var(--gold);
}

.chr-event-status h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.5rem;
}

.chr-event-status ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--ink-soft);
}

.chr-event-status li {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-bottom: 0.45rem;
  line-height: 1.45;
}

.chr-event-status li:last-child {
  margin-bottom: 0;
}

.chr-event-status-icon {
  flex-shrink: 0;
}

.chr-event-photos {
  margin-bottom: 1.5rem;
}

.chr-event-photos h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.75rem;
}

.chr-event-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .chr-event-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

.chr-event-photo {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 2px 12px rgba(45, 74, 62, 0.08);
}

.chr-event-photo-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chr-event-photo-btn {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(45, 74, 62, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  background: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .chr-event-photo-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 22px rgba(45, 74, 62, 0.18);
  }

  .chr-event-photo-btn:hover img {
    transform: scale(1.06);
  }
}

.chr-event-photo img,
.chr-event-photo-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.32s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

.photo-like {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.15rem 0.35rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.photo-like:hover {
  color: var(--forest);
  background: rgba(45, 74, 62, 0.06);
}

.photo-like.is-liked {
  color: #b85c5c;
}

.photo-like.is-liked .photo-like__text {
  color: #b85c5c;
}

.photo-like--lightbox {
  color: rgba(250, 248, 244, 0.82);
  font-size: 0.9rem;
}

.photo-like--lightbox:hover {
  color: #faf8f4;
  background: rgba(250, 248, 244, 0.1);
}

.photo-like--lightbox.is-liked {
  color: #f0c4c4;
}

.photo-lightbox__like-row {
  display: flex;
  justify-content: center;
  min-height: 1.5rem;
}

/* Photo lightbox (страница события) */
body.lightbox-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.photo-lightbox[hidden] { display: none !important; }

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox.is-open .photo-lightbox__inner {
  animation: lightbox-in 0.22s ease-out;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 22, 0.92);
}

.photo-lightbox__inner {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  touch-action: none;
}

@media (max-width: 640px) {
  .photo-lightbox {
    align-items: stretch;
    justify-content: stretch;
  }

  .photo-lightbox__backdrop {
    background: rgba(10, 16, 13, 0.98);
  }

  .photo-lightbox__inner {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 100dvh;
    padding:
      max(0.65rem, env(safe-area-inset-top))
      max(0.65rem, env(safe-area-inset-right))
      max(0.65rem, env(safe-area-inset-bottom))
      max(0.65rem, env(safe-area-inset-left));
    box-sizing: border-box;
  }

  .photo-lightbox__close {
    top: max(0.35rem, env(safe-area-inset-top));
    right: max(0.35rem, env(safe-area-inset-right));
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.65rem;
  }

  .photo-lightbox__head {
    padding-right: 3rem;
  }

  .photo-lightbox__nav {
    width: 2.85rem;
    height: 2.85rem;
  }

  .photo-lightbox__nav--prev { left: 0.15rem; }
  .photo-lightbox__nav--next { right: 0.15rem; }
}

.photo-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.12);
  color: #faf8f4;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox__close:hover { background: rgba(250, 248, 244, 0.22); }

.photo-lightbox__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-right: 2.5rem;
  color: #faf8f4;
}

.photo-lightbox__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f5ecd8;
}

.photo-lightbox__counter {
  font-size: 0.78rem;
  color: rgba(250, 248, 244, 0.65);
  flex-shrink: 0;
}

.photo-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  touch-action: none;
}

.photo-lightbox__viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  touch-action: none;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #1a2e24;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
}

.photo-lightbox__img.is-zoom-anim {
  transition: transform 0.18s ease-out;
}

@media (max-width: 640px) {
  .photo-lightbox__stage {
    min-height: 55dvh;
  }

  .photo-lightbox__img {
    max-height: calc(100dvh - 9.5rem);
    border-radius: 4px;
    box-shadow: none;
  }
}

.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.14);
  color: #faf8f4;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox__nav:hover:not(:disabled) { background: rgba(250, 248, 244, 0.28); }
.photo-lightbox__nav:disabled { opacity: 0.25; cursor: default; }
.photo-lightbox__nav--prev { left: -0.25rem; }
.photo-lightbox__nav--next { right: -0.25rem; }

.photo-lightbox__strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.15rem;
  scrollbar-width: thin;
  touch-action: pan-x;
}

.photo-lightbox__thumb {
  flex-shrink: 0;
  width: 4.5rem;
  height: 3.25rem;
  border: 2px solid transparent;
  border-radius: 5px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: rgba(250, 248, 244, 0.08);
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.photo-lightbox__thumb.is-active {
  opacity: 1;
  border-color: var(--gold, #c9a84c);
}

.photo-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.chr-event-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.chr-event-extra-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}

.chr-event-extra-link--muted {
  font-weight: 500;
  color: var(--ink-soft);
}

.chr-event-extra-link:hover {
  text-decoration: underline;
}

.chr-index-year {
  margin-bottom: 1.75rem;
}

.chr-index-year-label {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-deep);
  margin-bottom: 0.65rem;
}

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

.chr-index-item a {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-solid);
  text-decoration: none;
  color: inherit;
}

.chr-index-item a:hover .chr-index-title {
  color: var(--forest);
}

.chr-index-date {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.chr-index-title {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 520px) {
  .chr-index-item a {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .chr-event-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "index index"
      "prev next";
  }

  .chr-event-nav__index { grid-area: index; justify-self: center; margin-bottom: 0.35rem; }
  .chr-event-nav__prev { grid-area: prev; }
  .chr-event-nav__next { grid-area: next; }
}

.home-ask-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.home-ask-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  margin-bottom: 1rem;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.25);
}

.home-ask-text {
  line-height: 1.75;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.96);
}

.home-ask-tagline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.home-ask .portal-cta--book {
  background: rgba(255, 255, 255, 0.95);
  color: var(--forest-deep) !important;
  border-color: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.home-ask .portal-cta--book:hover {
  background: #fff;
  color: var(--forest-deep) !important;
  border-color: #fff;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.contact-card--form .portal-cta--book:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper) !important;
  box-shadow: 0 4px 16px rgba(45, 90, 74, 0.25);
  filter: brightness(1.1);
}

.home-ask .contact-card--form .portal-cta--book:hover {
  background: #fff;
  color: var(--forest-deep) !important;
  border-color: #fff;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  filter: none;
}

.portal-cta--max {
  background: linear-gradient(135deg, #471aff 0%, #6b00ff 52%, #9500ff 100%);
  color: #fff !important;
  border: 1px solid #471aff;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, filter 0.15s;
}

.portal-cta--max:hover,
.portal-cta.portal-cta--max:hover {
  background: linear-gradient(135deg, #5a30ff 0%, #7a10ff 52%, #a020ff 100%);
  border-color: #5a30ff;
  color: #fff !important;
  filter: none;
  text-decoration: none !important;
}

.home-ask .portal-cta--max {
  background: linear-gradient(135deg, #471aff 0%, #6b00ff 52%, #9500ff 100%);
  border-color: #471aff;
  color: #fff !important;
}

.home-ask .portal-cta--max:hover {
  background: linear-gradient(135deg, #5a30ff 0%, #7a10ff 52%, #a020ff 100%);
  border-color: #5a30ff;
  color: #fff !important;
}

.home-ask-soon {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ── Roadmap (AI page) ── */
.roadmap-section {
  background: var(--cream);
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  padding: 1.5rem;
}

.roadmap-section h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  margin: 1.5rem 0 0.75rem;
}

.roadmap-lead {
  font-size: 1.05rem;
  line-height: 1.65;
}

.roadmap-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  border-left: 3px solid var(--gold);
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
}

.roadmap-phases {
  margin: 0.75rem 0 0 1.25rem;
  line-height: 1.85;
}

.roadmap-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-style: italic;
}

/* ── Photo grid (home, dnevnik) ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

.photo-grid-item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line-solid);
  background: var(--line-solid);
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.photo-grid-item:hover img { transform: scale(1.03); }

.photo-caption {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ── Home hero (legacy) ── */
.hero-dark {
  background: linear-gradient(165deg, var(--forest-deep) 0%, #243d34 50%, var(--forest) 100%);
  color: #faf8f4;
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(212, 168, 83, 0.12), transparent);
  pointer-events: none;
}

.hero-dark .inner { position: relative; max-width: 36rem; margin: 0 auto; }

.hero-dark h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #faf8f4;
}

.hero-dark .lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(250, 248, 244, 0.88);
  margin-bottom: 1rem;
}

.hero-dark .motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold-light);
  margin: 1.5rem 0;
}

.hero-dark .portal-cta {
  margin-top: 0.5rem;
  background: var(--gold);
  color: var(--forest-deep) !important;
}
.hero-dark .portal-cta:hover {
  background: var(--gold-light);
}

.hero-dark .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.hero-dark .portal-cta--ghost {
  background: transparent;
  border: 1px solid rgba(250, 248, 244, 0.45);
  color: #faf8f4 !important;
}
.hero-dark .portal-cta--ghost:hover {
  background: rgba(250, 248, 244, 0.1);
  border-color: var(--gold-light);
}

/* ── Pulse strip (home) ── */
.pulse-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line-solid);
  margin: 0 calc(-1 * clamp(1rem, 4vw, 1.5rem));
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
}

@media (max-width: 640px) {
  .pulse-strip { grid-template-columns: repeat(2, 1fr); }
}

.pulse-strip .pulse-item {
  border: none;
  border-radius: 0;
  border-right: 1px solid var(--line-solid);
  padding: 1.15rem 0.75rem;
}
.pulse-strip .pulse-item:last-child { border-right: none; }

/* ── Home grid ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 18rem;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

@media (max-width: 820px) {
  .home-grid { grid-template-columns: 1fr; }
}

.home-aside .portal-section { margin-bottom: 1.5rem; }

/* ── Path cards ── */
.path-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.path-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
  color: inherit;
}

.path-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--gold-light);
}

.path-card .path-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.path-card .path-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--forest-deep);
  margin-bottom: 0.35rem;
}

.path-card .path-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ── Featured card ── */
.featured-card {
  background: var(--forest-deep);
  color: #faf8f4;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.featured-card .feed-date { color: var(--gold-light); }

.featured-card .feed-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #faf8f4;
  margin: 0.35rem 0 0.5rem;
}
.featured-card .feed-title a { color: inherit; text-decoration: none; }
.featured-card .feed-title a:hover { color: var(--gold-light); }

.featured-card .feed-lede { color: rgba(250, 248, 244, 0.82); font-size: 0.92rem; }

.featured-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
}

/* ── Page header (inner pages) ── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-solid);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  color: var(--forest-deep);
  margin-bottom: 0.5rem;
}

.page-header .page-intro {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

/* ── Sections ── */
.portal-section { margin-bottom: 2rem; }

.portal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--forest-deep);
  margin-bottom: 1rem;
}

.portal-section h3 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--forest);
  margin: 1.35rem 0 0.65rem;
}

.portal-section h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 1rem 0 0.5rem;
}

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ── Pulse (generic) ── */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
}

.pulse-item {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.pulse-item .num {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.pulse-item .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.pulse-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.65rem;
}

/* ── Feed ── */
.feed-list { list-style: none; }

.feed-item {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
  transition: box-shadow 0.15s;
}

.feed-item:hover { box-shadow: 0 4px 16px var(--shadow); }

.feed-item--build { border-left: 3px solid var(--forest); }

.feed-date {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.feed-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  margin-bottom: 0.35rem;
}

.feed-title a { color: inherit; text-decoration: none; }
.feed-title a:hover { color: var(--gold); }

/* О проекте · список документов — явные ссылки */
.about-doc-list .feed-title a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(45, 90, 61, 0.45);
  text-underline-offset: 0.18em;
}
.about-doc-list .feed-title a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.feed-lede { font-size: 0.88rem; color: var(--ink-soft); }

/* ── Dnevnik · year wheel ── */
.dnevnik-shell {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0;
  min-height: min(560px, calc(100vh - 12rem));
  margin-top: 1.25rem;
  border: 1px solid var(--line-solid);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}

.dnevnik-shell__years {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--cream);
  border-right: 1px solid var(--line-solid);
}

.dnevnik-shell__feed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dnevnik-panel-label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  text-align: center;
  padding: 0.85rem 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line-solid);
  background: var(--cream);
}

.dnevnik-shell .year-wheel {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: ns-resize;
  min-height: 0;
  --year-item-h: 56px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.dnevnik-shell .year-wheel__band {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  height: var(--year-item-h, 56px);
  pointer-events: none;
  border-top: 1px solid var(--line-solid);
  border-bottom: 1px solid var(--line-solid);
  background: rgba(245, 236, 215, 0.35);
  z-index: 0;
}

.dnevnik-shell .year-wheel__scroller {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dnevnik-shell .year-wheel__scroller::-webkit-scrollbar { display: none; }

.dnevnik-shell .year-wheel__list {
  list-style: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.dnevnik-shell .year-wheel__list > li {
  height: var(--year-item-h, 56px);
  margin: 0;
  padding: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.dnevnik-shell .year-wheel__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink-soft);
  opacity: 0.45;
  line-height: 1;
  transition: font-size 0.28s ease, opacity 0.28s ease, color 0.28s ease;
}

.dnevnik-shell .year-wheel__item.is-active {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--forest-deep);
  opacity: 1;
}

.dnevnik-shell .year-wheel__hint {
  flex-shrink: 0;
  font-size: 0.62rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 0.35rem 0.25rem 0.65rem;
  opacity: 0.7;
}

.dnevnik-feed-meta {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--forest-deep);
  padding: 0.85rem 1.15rem 0.5rem;
  border-bottom: 1px solid var(--line-solid);
  background: var(--cream);
}

.dnevnik-shell__feed .feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem 1rem;
  margin: 0;
}

.dnevnik-feed-empty {
  padding: 1.5rem 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
  list-style: none;
}

@media (max-width: 820px) {
  .dnevnik-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .dnevnik-shell__years {
    border-right: none;
    border-bottom: 1px solid var(--line-solid);
    max-height: 140px;
  }
  .dnevnik-shell .year-wheel {
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent) !important;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent) !important;
  }
  .dnevnik-shell .year-wheel__list {
    display: flex;
    flex-direction: row !important;
    height: auto !important;
    padding: 0 40vw !important;
  }
  .dnevnik-shell .year-wheel__list > li {
    width: 4.5rem;
    height: 3.5rem;
    flex-shrink: 0;
  }
  .dnevnik-shell__feed .feed-list {
    max-height: 420px;
  }
}

.feed-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold-pale);
  color: var(--forest);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ── Today ── */
.today-list {
  list-style: none;
  border-left: 2px solid var(--gold-pale);
  padding-left: 1.25rem;
}

.today-item {
  position: relative;
  margin-bottom: 1.1rem;
}

.today-item::before {
  content: '';
  position: absolute;
  left: -1.42rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.today-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.today-empty {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ── CTA ── */
.portal-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  background: var(--forest-deep);
  color: var(--paper) !important;
  border: 1px solid var(--forest-deep);
}

.portal-cta:hover {
  background: var(--forest);
  border-color: var(--forest);
}

.portal-cta--book {
  background: var(--forest-deep);
  color: var(--paper) !important;
  border: 1px solid var(--forest-deep);
}

.portal-cta--secondary {
  background: transparent;
  color: var(--forest-deep) !important;
  border: 1px solid var(--line-solid);
}

.portal-cta--secondary:hover {
  background: var(--cream);
}

/* ── Book promo (istoriya) ── */
.book-promo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 520px) {
  .book-promo { grid-template-columns: 1fr; text-align: center; }
}

.book-cover {
  width: 7rem;
  height: 9.5rem;
  background: linear-gradient(145deg, var(--forest-deep), var(--forest));
  border-radius: 4px 8px 8px 4px;
  box-shadow: 4px 4px 12px var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--gold-light);
  line-height: 1.3;
}

.book-promo h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-deep);
  margin-bottom: 0.5rem;
}

/* ── Article ── */
.portal-article h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--forest-deep);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.portal-article .article-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-solid);
}

.portal-article h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest);
  margin: 1.75rem 0 0.75rem;
}

.portal-article p { margin-bottom: 1rem; }

.portal-article blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  background: var(--gold-pale);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--forest-deep);
}

.portal-original {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px dashed var(--line-solid);
  border-radius: 8px;
  font-size: 0.88rem;
}

.portal-original a { font-weight: 600; }

.portal-next {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-solid);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* ── Chapters ── */
.chapter-list { list-style: none; }

.chapter-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-solid);
}

.chapter-list .ch-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
}

.chapter-list .ch-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
}

/* ── Footer ── */
.portal-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line-solid);
  background: var(--paper);
}

.portal-footer a { color: var(--forest); }

.embed-note {
  font-size: 0.85rem;
  background: var(--gold-pale);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ── Feedback form ── */
.feedback-note,
.feedback-channel {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

.contact-hub {
  max-width: 56rem;
  margin: 0 auto;
  text-align: left;
}

.contact-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 12px;
  padding: 1.25rem 1.15rem 1.35rem;
}

.contact-card__title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  margin: 0 0 0.6rem;
  color: var(--forest-deep);
}

.contact-card__lead {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.contact-card__qr {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.contact-card__cta {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.contact-card--form .feedback-form {
  max-width: none;
  margin: 0;
}

.contact-card--form .feedback-actions {
  flex-wrap: wrap;
}

.home-ask .contact-hub {
  max-width: none;
  margin-top: 0.75rem;
  text-align: left;
}

.home-ask .contact-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.home-ask .contact-card__title {
  color: #fff;
}

.home-ask .contact-card__lead,
.home-ask .contact-hub__lead,
.home-ask .feedback-label {
  color: rgba(255, 255, 255, 0.92);
}

.home-ask .feedback-field textarea,
.home-ask .feedback-field input[type="text"] {
  background: #fff;
  color: var(--ink);
}

.home-ask .feedback-actions {
  justify-content: stretch;
}

.home-ask .feedback-actions .portal-cta--book {
  flex: 1;
}

.contact-hub__lead {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  text-align: center;
}

.contact-hub__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.contact-hub__chip {
  border: 1px solid var(--line-solid);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.contact-hub__chip.is-active {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: #fff;
}

.home-ask .contact-hub {
  margin-top: 0.75rem;
}

.home-ask .contact-hub__lead,
.home-ask .feedback-label {
  color: rgba(255, 255, 255, 0.92);
}

.feedback-channel a {
  color: var(--forest-deep);
  font-weight: 600;
}

.feedback-max {
  max-width: 36rem;
  margin: 1.5rem auto 0;
  text-align: center;
}

.feedback-max__lead {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.feedback-or {
  max-width: 36rem;
  margin: 1.75rem auto 0.25rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.feedback-form {
  max-width: 36rem;
  margin: 0 auto;
}

.feedback-field {
  display: block;
  margin-bottom: 1.25rem;
}

.feedback-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-deep);
  margin-bottom: 0.45rem;
}

.feedback-field textarea,
.feedback-field input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

.feedback-field textarea:focus,
.feedback-field input[type="text"]:focus {
  outline: 2px solid rgba(45, 90, 74, 0.35);
  outline-offset: 1px;
}

.feedback-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.feedback-status {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.feedback-status--ok {
  color: var(--forest-deep);
}

.home-ask .feedback-status--ok {
  color: #d4f5e4;
}

.feedback-status--err {
  color: #8b3a3a;
}

.home-ask .feedback-status--err {
  color: #ffc9c9;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(26, 47, 40, 0.62);
  backdrop-filter: blur(2px);
}

.feedback-modal__panel {
  width: min(22rem, 100%);
  padding: 1.75rem 1.5rem 1.35rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(26, 47, 40, 0.28);
}

.feedback-modal__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--forest-deep);
}

.feedback-modal__close {
  min-width: 8rem;
}

body.feedback-modal-open {
  overflow: hidden;
}

/* ── Scroll to top (all pages) ── */
.portal-scroll-top {
  position: fixed;
  right: clamp(0.85rem, 3vw, 1.25rem);
  bottom: clamp(0.85rem, 3vw, 1.25rem);
  z-index: 90;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(58, 74, 66, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--forest-deep);
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(58, 74, 66, 0.14);
  opacity: 0;
  transform: translateY(0.45rem);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.portal-scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .portal-scroll-top:hover {
    background: var(--paper);
    color: var(--forest);
    box-shadow: 0 6px 22px rgba(58, 74, 66, 0.18);
  }
}

.portal-scroll-top:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .portal-scroll-top {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
  }
}
