:root {
  color-scheme: light;
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI Semibold", "Arial Black", "Noto Sans", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --border: #e2e8f0;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --text-shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.18);
  --text-shadow-strong: 0 3px 12px rgba(15, 23, 42, 0.2);
  --radius: 18px;
  --topbar-height: 72px;
  --fon-1: url("/assets/images/fon/fon-1.png");
  --fon-2: url("/assets/images/fon/fon-2.png");
  --fon-3: url("/assets/images/fon/fon-3.jpg");
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --text-shadow-soft: 0 1px 6px rgba(0, 0, 0, 0.55);
  --text-shadow-strong: 0 4px 16px rgba(0, 0, 0, 0.6);
  --bg: #0b1120;
  --bg-card: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --border: #1f2937;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

html,
body {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
}
body {
  overflow-x: hidden;
}
.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp,
.material-icons {
  font-family: "Material Symbols Outlined", "Material Symbols Rounded", "Material Symbols Sharp", "Material Icons", sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: currentColor;
}

.reels-overlay,
.calendar-ui {
  font-family: inherit;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  transform-origin: top center;
  will-change: transform;
}

:root[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.9);
}

.topbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  min-width: 0;
}

.logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .topbar__logo {
    flex: 1;
    justify-content: center;
  }

  .logo-text {
    width: 100%;
    white-space: normal;
    text-align: center;
    font-family: "Segoe Script", "Segoe Print", "Brush Script MT", "Times New Roman", cursive;
    font-weight: 700;
    font-size: clamp(1.05rem, 4.8vw, 1.6rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  }
}

.topbar__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  max-width: 360px;
}

.search input {
  border: none;
  background: transparent;
  flex: 1;
  color: inherit;
}

.topbar__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.topbar__actions .btn,
.topbar__actions button {
  touch-action: manipulation;
}

.topbar--compact {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px) scale(0.98);
}

.topbar--compact .search,
.topbar--compact #theme-toggle,
.topbar--compact #open-review,
.topbar--compact .topbar__cta {
  display: none;
}

.topbar--compact .topbar__call {
  display: inline-flex;
}

#menu-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

#menu-toggle.is-open {
  background: rgba(15, 23, 42, 0.08);
}

#menu-toggle .icon {
  font-size: 1.1rem;
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn--outline {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text);
  box-shadow: none;
}

.btn__icon {
  margin-right: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 4vw, 40px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

section {
  padding: 24px 0;
}

#hero,
#reviews,
#faq {
  position: relative;
}

#hero::before,
#reviews::before,
#faq::before {
  content: "";
  position: absolute;
  left: var(--bg-left, 0);
  right: var(--bg-right, auto);
  top: var(--bg-top, 0);
  bottom: var(--bg-bottom, auto);
  width: var(--bg-w, 240px);
  height: var(--bg-h, auto);
  aspect-ratio: var(--bg-ratio, auto);
  background-image: var(--bg-image, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: var(--bg-opacity, 0.9);
  pointer-events: none;
  z-index: 0;
  display: var(--bg-display, block);
}

#hero > *,
#reviews > *,
#faq > * {
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  padding: 32px 0 10px;
}
.hero__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: center;
}

.hero__content h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}
.hero__title {
  position: relative;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  --hero-horse-size: 1.1em;
  --hero-horse-offset: 0.08em;
}
.hero__title-text {
  display: inline;
  white-space: normal;
}
.hero__title-char {
  opacity: 0;
  transition: opacity 0.18s ease;
  will-change: opacity;
}
.hero__title-char.is-visible {
  opacity: 1;
}
.hero__title-horse {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  width: var(--hero-horse-size);
  height: var(--hero-horse-size);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.hero__title.is-animating .hero__title-horse {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero__title-char {
    transition: none;
  }
  .hero__title-horse {
    transition: none;
  }
}

.hero__eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero__lead {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero__meta-sep {
  opacity: 0.6;
}

.hero__media {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(34, 211, 238, 0.2));
  box-shadow: var(--shadow);
}

.hero__picture {
  display: block;
}

.hero__picture img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__picture {
  transition: opacity 0.3s ease;
}

.hero__media--news .hero__picture {
  opacity: 0;
}

.hero-news-widget[hidden] {
  display: none;
}

.hero-news-widget {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.hero__media--news .hero-news-widget {
  opacity: 1;
}

.hero-news-widget__media {
  position: absolute;
  inset: 0;
  background: #0b1120;
}

.hero-news-widget__media img,
.hero-news-widget__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-news-widget__card {
  position: relative;
  margin: 18px;
  padding: 14px 16px;
  max-width: min(320px, 80%);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: #fff;
  text-shadow: var(--text-shadow-strong);
  pointer-events: auto;
}

.hero-news-widget__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.hero-news-widget__title {
  margin: 6px 0 6px;
  font-size: 1.05rem;
}

.hero-news-widget__text {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-news-widget__action {
  border-radius: 999px;
}

.hero__hotspots {
  position: absolute;
  inset: 0;
}

.hero__hotspot {
  position: absolute;
  top: var(--dy);
  left: var(--dx);
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hero__dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.2);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero__dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 2px solid rgba(34, 211, 238, 0.45);
  opacity: 0.7;
  animation: heroPulse 2.4s ease-in-out infinite;
}

.hero__hotspot:hover .hero__dot,
.hero__hotspot:focus-visible .hero__dot,
.hero__hotspot.is-active .hero__dot {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.22);
}

.hero__tooltip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%) scale(0.98);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.3;
  width: max-content;
  max-width: 200px;
  pointer-events: none;
  text-align: left;
}

.hero__tooltip strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.hero__hotspot:hover .hero__tooltip,
.hero__hotspot:focus-visible .hero__tooltip,
.hero__hotspot.is-active .hero__tooltip {
  opacity: 1;
  transform: translate(-50%, -130%) scale(1);
}

@keyframes heroPulse {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

@media (max-width: 960px) {
  .hero__container {
    grid-template-columns: 1fr;
  }

  .hero__media {
    order: -1;
  }

  .hero__content h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
  }
}

@media (max-width: 640px) {
  .hero__meta {
    flex-wrap: wrap;
  }

  .hero__tooltip {
    max-width: 160px;
  }
}

@media (max-width: 768px) {
  .hero__hotspot {
    top: var(--my);
    left: var(--mx);
  }
}

.hero-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  z-index: 45;
}

.hero-overlay.is-open {
  display: flex;
}

.hero-overlay__card {
  background: var(--bg-card);
  color: var(--text);
  border-radius: 18px;
  padding: 20px;
  width: min(92vw, 420px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.hero-overlay__title {
  margin: 0;
  font-size: 1.2rem;
}

.hero-overlay__text {
  margin: 0;
  color: var(--muted);
}

.hero-overlay__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero__hotspot--news .hero__dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
  background: rgba(255, 255, 255, 0.9);
  background-image: var(--news-thumb);
  background-size: cover;
  background-position: center;
}

.hero__hotspot--news .hero__dot::after {
  display: none;
}

.hero-news-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  z-index: 46;
}

.hero-news-overlay.is-open {
  display: flex;
}

.hero-news-overlay__panel {
  width: min(92vw, 860px);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.hero-news-overlay__media {
  position: relative;
  background: #0b1120;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.hero-news-overlay__media img,
.hero-news-overlay__media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-news-overlay__content {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
}

.hero-news-overlay__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  text-shadow: var(--text-shadow-strong);
}

.hero-news-overlay__text {
  margin: 0;
  color: var(--muted);
  text-shadow: var(--text-shadow-soft);
}

.hero-news-overlay__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-news-overlay__controls button {
  border-radius: 999px;
}

@media (max-width: 900px) {
  .hero-news-overlay__panel {
    grid-template-columns: 1fr;
  }
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.warning {
  background: rgba(248, 113, 113, 0.12);
  padding: 12px;
  border-radius: 12px;
}

.stories {
  width: 100%;
}

.stories__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.stories__head,
.stories__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stories__viewport {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  padding: 12px 0 24px;
  perspective: 900px;
  contain: layout paint;
  touch-action: pan-y;
}

.stories__list {
  display: flex;
  gap: 12px;
  overflow: hidden;
  max-width: 100%;
  padding: 8px 0;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  will-change: transform;
}

.stories__list::-webkit-scrollbar {
  display: none;
}

.stories__list--fallback {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

.stories__list--fallback .stories__item {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.stories__list.slick-initialized {
  display: block;
  overflow: hidden;
  scroll-snap-type: none;
}

.stories__list.slick-initialized .slick-track {
  margin-left: auto;
  margin-right: auto;
}

.stories__viewport .slick-list {
  overflow: hidden;
}

.stories__arrow {
  position: absolute;
  top: 58%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.stories__arrow--prev {
  left: 8px;
}

.stories__arrow--next {
  right: 8px;
}

.stories__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 768px) {
  .stories__arrow {
    display: none;
  }
}

.stories__list .slick-track {
  display: flex;
  align-items: center;
}

.stories__list .slick-slide {
  padding: 0 6px;
}

.stories__list .slick-slide .story-card {
  opacity: 0.35;
  transform: scale(0.82) translateZ(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.stories__list .is-prev .story-card,
.stories__list .is-next .story-card {
  opacity: 0.6;
  transform: scale(0.9) translateZ(0);
}

.stories__list .is-prev .story-card {
  transform: scale(0.9) translateZ(0) rotateY(6deg) translateX(-6px);
}

.stories__list .is-next .story-card {
  transform: scale(0.9) translateZ(0) rotateY(-6deg) translateX(6px);
}

.stories__list .is-center .story-card,
.stories__list .slick-center .story-card {
  opacity: 1;
  transform: scale(1) translateZ(0);
}

.story-card {
  flex: 0 0 auto;
  width: 260px;
  text-align: left;
  cursor: pointer;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.story-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.2));
  background-size: cover;
  background-position: center;
}

.story-card__media--frame video {
  opacity: 0;
}

.story-card__media img,
.story-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 6px 12px rgba(15, 23, 42, 0.4);
  pointer-events: none;
}

.story-card__caption {
  font-weight: 600;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 0.95rem;
  line-height: 1.3;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(34, 211, 238, 0.12));
  padding: 4px 8px;
  border-radius: 12px;
  text-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card__meta {
  font-size: 0.8rem;
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  line-height: 1.3;
  background: rgba(15, 23, 42, 0.04);
  padding: 3px 8px;
  border-radius: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .story-card {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .stories__container {
    padding: 0 16px;
  }

  .story-card {
    width: min(80vw, 360px);
  }
}.feed__controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 40px) 0;
}

.input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.input input,
.input select,
.input textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.input--full {
  grid-column: 1 / -1;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.feed__grid {
  display: grid;
  gap: 16px;  padding: 16px clamp(16px, 4vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.review-grid {
  display: grid;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  grid-template-columns: 1fr;
}

.review-grid--fallback {
  display: flex;
  gap: 16px;  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px clamp(16px, 4vw, 40px);
}

.review-grid--fallback .post-card {
  flex: 0 0 min(320px, 80vw);
  scroll-snap-align: center;
}

.review-grid.slick-initialized {
  display: block;
}

.review-grid .slick-list {
  overflow: visible;
}

.review-grid .slick-slide {
  opacity: 0.5;
  transform: scale(0.92);
  transition: transform 0.25s ease, opacity 0.25s ease;
  padding: 0 8px;
}

.review-grid .slick-center {
  opacity: 1;
  transform: scale(1);
}


.review-cta {
  margin: 16px clamp(16px, 4vw, 40px);
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reviews-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.reviews-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.35);
}

.rating-stars--summary {
  font-size: 1rem;
}

.star--filled {
  color: #f59e0b;
}

.rating-value {
  font-weight: 600;
  color: var(--text);
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media {
  height: 220px;
  min-height: 200px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(34, 211, 238, 0.25));
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  overflow: hidden;
}

.media-count {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.media.is-clickable {
  cursor: pointer;
}

.media.reel {
  height: 320px;
  min-height: 280px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(124, 58, 237, 0.35));
  color: #fff;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.6));
  animation: reelPulse 3s ease-in-out infinite;
  pointer-events: none;
}

.reel-label {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.media .play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

@keyframes reelPulse {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes reelsSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn.is-active {
  color: var(--accent);
}

.routes,
.calendar,
.funnel,
.reviews,
.faq,
.contacts {
  scroll-margin-top: 100px;
}



.price-spoiler {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 16px clamp(16px, 4vw, 40px);
  padding: 10px 16px;
  border: 1px solid var(--border);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

thead {
  background: rgba(124, 58, 237, 0.08);
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.slots,
.slot-grid {
  display: grid;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.calendar-ui {
  padding: 16px clamp(16px, 4vw, 40px);
  display: grid;
  gap: 12px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-header h3 {
  margin: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weeks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 8px;
}

.calendar-week {
  display: grid;
  grid-template-rows: repeat(7, minmax(96px, auto));
  grid-auto-rows: minmax(96px, auto);
  gap: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.calendar-cell {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  cursor: pointer;
}

.calendar-cell button {
  border: none;
  background: transparent;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.calendar-cell.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.calendar-cell.is-disabled button {
  cursor: not-allowed;
}

.calendar-cell.is-empty {
  background: transparent;
  border: none;
}

.calendar-cell__meta {
  font-size: 0.7rem;
  color: var(--muted);
}

.calendar-cell.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.calendar-day {
  padding: 0 clamp(16px, 4vw, 40px);
  display: grid;
  gap: 12px;
}

.calendar-day h3 {
  margin: 0;
}

.slot-group {
  display: grid;
  gap: 8px;
}

.slot-group__title {
  margin: 0;
  font-size: 0.95rem;
}

.slot-group .slot-grid {
  padding: 0;
}

.slot-card {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
}

.slot-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.slot-card.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.wizard {
  padding: 0 clamp(16px, 4vw, 40px);
}

.wizard__steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.step-indicator {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.step-indicator.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.route-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

.route-card {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
}

.route-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.wizard__nav {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

.field-error {
  color: #ef4444;
  min-height: 16px;
}

.alert {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
  padding: 12px;
  border-radius: 12px;
}

.contact-grid {
  display: grid;
  gap: 16px;  padding: 16px clamp(16px, 4vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-card {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.map-placeholder {
  width: 100%;
  height: 200px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.2) 10px, transparent 10px, transparent 20px);
}

.map-embed {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.map-embed a {
  color: #e2e8f0;
  font-size: 12px;
  position: absolute;
  left: 12px;
  z-index: 2;
}

.map-embed a:first-of-type {
  top: 6px;
}

.map-embed a:last-of-type {
  top: 22px;
}

.map-embed iframe {
  width: 100%;
  height: min(60vw, 360px);
  border: 0;
  display: block;
}

.footer {
  padding: 24px clamp(16px, 4vw, 40px) 80px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tabbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: none;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  justify-content: space-around;
  overflow-x: hidden;
  white-space: nowrap;
  max-width: 100%;
  left: 0;
  right: 0;
}

.tabbar a {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.mobile-menu {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  top: auto;
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 30;
  width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.mobile-menu.is-open {
  display: flex;
  transform: translateY(0);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.body--locked {
  overflow: hidden;
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu__title {
  font-weight: 700;
  font-size: 1.1rem;
}

.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  background: transparent;
}

.modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
}

.modal__content {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  min-width: min(92vw, 500px);
  max-height: 90vh;
  overflow-y: auto;
}

.story-content img,
.story-content video {
  width: 100%;
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
}

.review-viewer {
  width: min(92vw, 640px);
  max-height: 90vh;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.review-viewer__body {
  display: grid;
  gap: 6px;
}

.review-viewer__yandex {
  justify-self: start;
}

.review-viewer__media {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.review-viewer__frame {
  min-height: 180px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  display: grid;
  place-items: center;
}

.review-viewer__frame img,
.review-viewer__frame video {
  width: 100%;
  height: auto;
  display: block;
}

.calendar-modal {
  width: min(96vw, 920px);
  display: grid;
  gap: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}

.calendar-grid__header {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.calendar-day {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  min-height: 88px;
  display: grid;
  gap: 6px;
  background: rgba(15, 23, 42, 0.04);
}

.calendar-day.is-empty {
  opacity: 0.35;
  background: transparent;
}

.calendar-day.is-active {
  border-color: var(--accent, #1f5eff);
  box-shadow: 0 0 0 1px rgba(31, 94, 255, 0.3);
}

.calendar-day__date {
  font-weight: 600;
}

.calendar-day__meta {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.calendar-day__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
}

.calendar-day__counts span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.calendar-details {
  margin-top: 10px;
}


.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
}

.calendar-range {
  font-weight: 600;
  color: var(--text-muted);
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 6px 0 8px;
}

@media (max-width: 900px) {
  .calendar-nav {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .calendar-nav .btn {
    flex: 1 1 auto;
  }
  .calendar-range {
    flex: 1 1 100%;
    text-align: center;
  }
  .calendar-legend {
    gap: 6px 8px;
  }
  .calendar-legend .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (max-width: 740px) {
  .tab-list {
    position: sticky;
    top: 0;
    z-index: 8;
    background: var(--bg-card);
    padding: 8px 0;
    margin: 8px 0 12px;
    touch-action: manipulation;
  }

  .tab-button {
    position: relative;
    z-index: 9;
    pointer-events: auto;
    touch-action: manipulation;
  }
  .dashboard-page {
    place-items: start;
    padding: 16px 12px 24px;
  }
  .dashboard-card {
    width: 100%;
    padding: 16px;
  }
  .calendar-page .dashboard-page {
    padding-top: 16px;
  }
  .calendar-page .dashboard-card {
    width: 100%;
    padding: 16px;
  }
  .tab-panel--calendar {
    overflow: visible;
  }
  .tab-panel--calendar .calendar-scroll {
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
  }
  .tab-panel--calendar .calendar-details {
    overflow: visible;
  }
  .calendar-scroll {
    margin: 0;
    padding: 0 0 4px;
    overflow-x: auto;
    overflow-y: visible;
  }
  .calendar-grid--month {
    min-width: 520px;
  }
  .calendar-weeks {
    grid-auto-columns: minmax(120px, 1fr);
  }
  .calendar-week {
    grid-template-rows: repeat(7, minmax(86px, auto));
  }
  .calendar-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .calendar-nav .btn {
    width: 100%;
  }
  .calendar-range {
    order: -1;
    text-align: left;
    font-size: 0.95rem;
  }
  .calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
  }
  .calendar-legend .calendar-badge {
    justify-content: center;
    font-size: 0.78rem;
    padding: 3px 6px;
  }
  .calendar-legend .btn {
    grid-column: 1 / -1;
    text-align: center;
  }
  .calendar-day__date {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .calendar-day__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .calendar-day__counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .calendar-day__counts span {
    white-space: normal;
    text-align: center;
    font-size: 0.68rem;
  }
  .calendar-details {
    gap: 8px;
  }
  .calendar-detail-item {
    gap: 8px;
  }
  .calendar-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.85rem;
  }

  .calendar-motion-enabled .calendar-day[data-date] {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.9);
    transition: opacity 0.46s ease, transform 0.46s cubic-bezier(0.16, 0.9, 0.2, 1);
    will-change: opacity, transform;
  }

  .calendar-motion-enabled .calendar-day[data-date].is-revealed {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .calendar-day {
    padding: 8px;
    min-height: 76px;
  }
  .calendar-day__date {
    font-size: 0.82rem;
    line-height: 1.2;
  }
  .calendar-day__meta {
    font-size: 0.74rem;
  }
  .calendar-day__counts {
    font-size: 0.7rem;
    gap: 4px;
  }
  .calendar-day__counts span {
    padding: 2px 5px;
  }
  .calendar-detail-item {
    padding: 10px;
  }
  .calendar-detail-meta {
    font-size: 0.85rem;
  }
  .calendar-legend .calendar-badge {
    font-size: 0.75rem;
  }
}

.badge-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.badge-confirmed {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

.badge-paid {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.badge-canceled {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-table-wrap {
  max-height: 52vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.calendar-table th,
.calendar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.calendar-table tbody tr {
  cursor: pointer;
}

.calendar-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.06);
}

.calendar-table tbody tr.is-active {
  background: rgba(15, 23, 42, 0.12);
}

.calendar-details {
  display: grid;
  gap: 10px;
}

.calendar-detail-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.calendar-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.calendar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.85rem;
}

.review-viewer__nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reel-viewer {
  border: none;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
}

.reel-viewer::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.reel-viewer__content {
  position: relative;
  background: transparent;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.reel-viewer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.reel-track {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}

.reel-track::-webkit-scrollbar {
  display: none;
}

.reel-item {
  scroll-snap-align: start;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.reel-item__content {
  position: relative;
  width: min(420px, 92vw);
  height: min(760px, 92vh);
  background: #0b0f1a;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.45);
}

.reel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-actions {
  position: absolute;
  right: 12px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}

.reel-action {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.reel-action.is-active {
  background: rgba(255, 64, 129, 0.7);
}

.reel-mute {
  position: absolute;
  left: 12px;
  bottom: 80px;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.reel-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.reel-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(124, 58, 237, 0.9);
}

.reels-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  color: #fff;
}

.reels-overlay.is-open {
  display: block;
}

.reels-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 26, 0.82);
}

.reels-overlay__sheet {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
  pointer-events: none;
}

.reels-overlay__sheet > * {
  pointer-events: auto;
}

.reels-overlay__track {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}

.reels-overlay__track::-webkit-scrollbar {
  display: none;
}

.reels-overlay__item {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  padding: 0;
}

.reels-overlay__stage {
  position: relative;
  width: min(92vw, calc(92vh * 9 / 16));
  height: min(92vh, 860px);
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-overlay__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-overlay__media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-overlay__media img,
.reels-overlay__media video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #000;
  pointer-events: none;
  user-select: none;
}

.reels-overlay__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reels-overlay__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  padding-top: calc(12px + env(safe-area-inset-top));
}

.reels-overlay__topbar-left,
.reels-overlay__topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.reels-overlay__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  align-self: center;
  display: none;
}

.reels-overlay__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.9);
}

.reels-overlay__media-dots {
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}

.reels-overlay__media-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.reels-overlay__media-dot.is-active {
  background: #fff;
}

.reels-overlay__media-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reels-overlay__media-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  border: none;
  background: transparent;
  pointer-events: auto;
  touch-action: pan-y;
}

.reels-overlay__media-tap--left {
  left: 0;
}

.reels-overlay__media-tap--right {
  right: 0;
}

.reels-overlay__media-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reels-overlay__media-arrow--prev {
  left: 12px;
}

.reels-overlay__media-arrow--next {
  right: 12px;
}

.reels-overlay__close,
.reels-overlay__mute,
.reels-overlay__back {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reels-overlay__actions {
  position: absolute;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  pointer-events: auto;
}

.reels-overlay__action {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reels-overlay__action.is-active {
  background: rgba(255, 64, 129, 0.7);
}

.reels-overlay__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(6, 10, 18, 0.7) 55%, rgba(6, 10, 18, 0.9) 100%);
  pointer-events: auto;
}

.reels-overlay__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  max-width: 100%;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.reels-overlay__meta strong {
  font-size: 0.9rem;
}

.reels-overlay__meta p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reels-overlay__tags {
  font-size: 0.75rem;
  opacity: 0.75;
}

.reels-overlay__cta {
  margin-top: 2px;
}

.reels-overlay__book {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.reels-overlay__spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.85);
  animation: reelsSpin 0.9s linear infinite;
}

.reels-overlay__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}

.reels-overlay__fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.reels-overlay__status {
  font-size: 0.85rem;
  opacity: 0.85;
}

.reels-overlay__retry {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.reels-overlay__item--single .reels-overlay__media-dots,
.reels-overlay__item--single .reels-overlay__media-arrow {
  display: none;
}

.reels-overlay__item--video .reels-overlay__media-dots {
  display: none;
}

.reels-overlay__item--video .reels-overlay__progress {
  display: block;
}

.reels-overlay__nav {
  position: absolute;
  right: calc(16px + env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.reels-overlay__nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reels-overlay__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.reels-overlay__nav-btn:focus-visible,
.reels-overlay__action:focus-visible,
.reels-overlay__media-arrow:focus-visible,
.reels-overlay__close:focus-visible,
.reels-overlay__mute:focus-visible,
.reels-overlay__back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.reels-overlay__nav-btn:hover,
.reels-overlay__action:hover,
.reels-overlay__media-arrow:hover,
.reels-overlay__close:hover,
.reels-overlay__mute:hover,
.reels-overlay__back:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

body.reels-open .tabbar {
  display: none;
}

@media (max-width: 768px) {
  .reels-overlay__sheet {
    padding-left: 12px;
    padding-right: 12px;
  }

  .reels-overlay__stage {
    width: min(94vw, calc(90vh * 9 / 16));
    height: min(90vh, 820px);
    border-radius: 18px;
  }

  .reels-overlay__viewport {
    border-radius: 18px;
  }

  .reels-overlay__actions {
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .reels-overlay__media-arrow {
    display: none;
  }

  .reels-overlay__nav {
    display: none;
  }
}

.auth-page,
.dashboard-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card,
.dashboard-card {
  width: min(520px, 100%);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.dashboard-card {
  width: min(960px, 100%);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.slot-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 196, 0, 0.2);
  color: #b77600;
  border: 1px solid rgba(183, 118, 0, 0.35);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tab-button {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.tab-button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.admin-item strong,
.admin-item .hint {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-thumb {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  max-height: 240px;
  object-fit: cover;
}

.admin-media-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.admin-media-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
}

.admin-media-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.2);
}

.admin-media-meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.admin-media-meta strong {
  font-size: 14px;
}

.admin-media-actions {
  display: grid;
  gap: 6px;
}

.admin-media-actions button {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.upload-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-top: 6px;
  display: none;
}

.upload-progress.is-active {
  display: block;
}

.upload-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.comment-body {
  display: grid;
  gap: 12px;
}

.comment-item {
  padding: 12px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
}

.story-content {
  display: grid;
  gap: 12px;
}

.file-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-preview__item {
  padding: 8px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-preview__item span {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .search {
    display: none;
  }
  .tabbar {
    display: flex;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .topbar__actions {
    gap: 6px;
  }
  .btn {
    padding: 8px 12px;
  }
  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }
  .filters::-webkit-scrollbar {
    height: 4px;
  }
  .filters::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
  }
}

#story-modal .modal__content {
  width: min(92vw, 720px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#story-modal .story-content {
  overflow-y: auto;
}

.story-content__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.story-modal__close {
  position: sticky;
  top: 0;
  z-index: 2;
  align-self: flex-end;
}

.hero__content h1,
.section-header h2,
.reviews-bento__title h2,
.review-book__header h3,
.story-card__caption,
.route-card strong {
  font-family: var(--font-display);
  text-shadow: var(--text-shadow-strong);
}

.hero__lead,
.hero__eyebrow,
.reviews-summary,
.reviews-count,
.hint,
.story-card__meta,
.post-meta,
.review-book__header p {
  text-shadow: var(--text-shadow-soft);
}

.calendar-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-grid--month {
  min-width: 680px;
}

@media (max-width: 640px) {
  .calendar-grid--month {
    min-width: 560px;
  }
}

.calendar-day--lvl-1 { background: rgba(34, 197, 94, 0.08); }
.calendar-day--lvl-2 { background: rgba(34, 197, 94, 0.16); }
.calendar-day--lvl-3 { background: rgba(34, 197, 94, 0.26); }
.calendar-day--lvl-4 { background: rgba(34, 197, 94, 0.36); }

@media (prefers-reduced-motion: reduce) {
  .calendar-motion-enabled .calendar-day[data-date] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Keep last in file to win cascade for mobile calendar embedding in admin */
@media (max-width: 740px) {
  .dashboard-page {
    place-items: start;
    align-content: start;
    width: 100%;
    padding: 16px 12px 24px;
    overflow-x: hidden;
  }

  .dashboard-card {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .calendar-page .dashboard-page {
    place-items: start;
    align-content: start;
  }

  .tab-panel--calendar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
    overflow: visible;
  }

  .tab-panel--calendar .calendar-nav,
  .tab-panel--calendar .calendar-legend,
  .tab-panel--calendar .calendar-details {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .tab-panel--calendar .calendar-scroll {
    margin: 0;
    padding: 0 0 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    touch-action: pan-x;
  }

  .tab-panel--calendar .calendar-grid--month {
    min-width: 0;
    width: max-content;
  }

  .tab-panel--calendar .calendar-weeks {
    grid-auto-columns: 136px;
    gap: 10px;
  }

  .tab-panel--calendar .calendar-week {
    grid-template-rows: repeat(7, minmax(86px, auto));
    grid-auto-rows: minmax(86px, auto);
    scroll-snap-align: start;
  }

  .tab-panel--calendar .calendar-day {
    min-height: 76px;
    height: auto;
    padding: 8px;
  }

  .tab-panel--calendar .calendar-day__counts span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tab-panel--calendar .calendar-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tab-panel--calendar .calendar-nav .btn,
  .tab-panel--calendar .calendar-legend .btn {
    width: 100%;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-panel--calendar .calendar-range {
    font-size: 1rem;
    line-height: 1.2;
  }

  .tab-panel--calendar .calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tab-panel--calendar .calendar-legend .calendar-badge {
    justify-content: center;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.15;
    min-height: 26px;
  }

  .tab-panel--calendar .calendar-details {
    overflow: visible;
  }

  .calendar-page .calendar-nav,
  .calendar-page .calendar-legend,
  .calendar-page .calendar-details {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .calendar-page .calendar-scroll {
    margin: 0;
    padding: 0 0 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    touch-action: pan-x;
  }

  .calendar-page .calendar-grid--month {
    min-width: 0;
    width: max-content;
  }

  .calendar-page .calendar-weeks {
    grid-auto-columns: 136px;
    gap: 10px;
  }

  .calendar-page .calendar-week {
    grid-template-rows: repeat(7, minmax(86px, auto));
    grid-auto-rows: minmax(86px, auto);
    scroll-snap-align: start;
  }

  .calendar-page .calendar-day {
    min-height: 76px;
    height: auto;
    padding: 8px;
  }

  .calendar-page .calendar-day__counts span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .calendar-page .calendar-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calendar-page .calendar-nav .btn,
  .calendar-page .calendar-legend .btn {
    width: 100%;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
  }

  .calendar-page .calendar-range {
    font-size: 1rem;
    line-height: 1.2;
  }

  .calendar-page .calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .calendar-page .calendar-legend .calendar-badge {
    justify-content: center;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.15;
    min-height: 26px;
  }
}
