.overtop-home {
  padding-top: 0;
  padding-bottom: 80px;
  color: var(--overtop-ink);
  font-family: var(--overtop-sans);
}

.overtop-home__inner {
  width: 100%;
  margin: 0;
}

.overtop-home__banner {
  width: 100%;
  margin: 0 0 28px;
}

.overtop-section {
  margin-top: 96px;
}

.overtop-section--news {
  margin-top: 12px;
}

.overtop-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.overtop-section__title {
  margin: 0;
  font-family: var(--overtop-serif);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.overtop-section__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.overtop-section__filters a {
  color: #8a8a8a;
  font-size: 13px;
  text-decoration: none;
}

.overtop-section__filters a:hover {
  color: var(--overtop-ink);
}

.overtop-hero {
  padding: 18px 0 8px;
}

.overtop-hero__photo {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #ece7e0;
  box-shadow: var(--overtop-shadow);
}

.overtop-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
}

.overtop-subnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 28px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--overtop-card);
  box-shadow: var(--overtop-shadow);
}

.overtop-subnav:has(.overtop-subnav__search) {
  justify-content: space-between;
}

.overtop-subnav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: #888;
}

.overtop-subnav__search input {
  width: 100%;
  max-width: 280px;
  border: 0;
  background: transparent;
  color: var(--overtop-ink);
  font: inherit;
  outline: none;
}

.overtop-subnav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.overtop-subnav__links a {
  color: var(--overtop-ink);
  font-size: 14px;
  text-decoration: none;
}

.overtop-subnav__links a:hover {
  color: var(--overtop-blue);
}

.overtop-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.overtop-cat-rail {
  position: relative;
  margin: 0 0 22px;
  background: transparent;
}

.overtop-cat-rail__btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.92);
  color: var(--overtop-ink);
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 4px 14px rgba(40, 32, 24, 0.12);
  cursor: pointer;
}

.overtop-cat-rail__btn--prev {
  left: 4px;
}

.overtop-cat-rail__btn--next {
  right: 4px;
}

.overtop-cat-rail__btn:hover:not(:disabled) {
  border-color: rgba(26, 26, 26, 0.36);
  background: #fff;
}

.overtop-cat-rail__btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.overtop-features--categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
  padding: 6px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: transparent;
}

.overtop-features--categories::-webkit-scrollbar {
  display: none;
  height: 0;
}

.overtop-feature {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 28px 24px;
  border-radius: 12px;
  border: 0;
  box-shadow: var(--overtop-shadow);
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.overtop-feature h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-family: var(--overtop-serif);
  font-size: 28px;
}

.overtop-feature p {
  position: relative;
  z-index: 1;
  max-width: 16em;
  margin: 0;
  color: #4a4a4a;
  font-size: 13px;
  line-height: 1.6;
}

.overtop-feature__blob {
  position: absolute;
  right: -24px;
  bottom: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.overtop-feature.overtop-feature--compact {
  flex: 0 0 auto;
  min-width: 128px;
  min-height: 112px;
  height: auto;
  padding: 16px 16px 18px;
  border-radius: 10px;
  scroll-snap-align: start;
}

.overtop-feature.overtop-feature--compact h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.overtop-feature.overtop-feature--compact p {
  max-width: none;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.72;
}

.overtop-feature.overtop-feature--compact .overtop-feature__blob {
  right: -36px;
  bottom: -52px;
  width: 96px;
  height: 96px;
}

.overtop-feature.overtop-feature--compact.is-active {
  outline: none;
  box-shadow:
    var(--overtop-shadow),
    0 0 0 2px rgba(26, 26, 26, 0.22);
}

.overtop-feature--sage {
  background: #c9d6b8;
}

.overtop-feature--sand {
  background: #ead7a8;
}

.overtop-feature--peach {
  background: #f0c7b4;
}

.overtop-feature--lavender {
  background: #ddd0ee;
}

.overtop-feature--mint {
  background: #cfe8d4;
}

.overtop-feature--sky {
  background: #c9d7ee;
}

.overtop-popular-books {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	column-gap: 56px;
	row-gap: 36px;
	max-width: none;
	width: 100%;
}

.overtop-popular-book {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	min-width: 0;
	padding: 0;
	text-decoration: none;
	color: inherit;
	text-align: left;
}

.overtop-popular-book[hidden] {
	display: none !important;
}

.overtop-popular-book__cover {
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: 8px;
	background: #ece7e0;
	box-shadow: var(--overtop-shadow);
}

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

.overtop-popular-book__cover .overtop-book-placeholder {
	width: 100%;
	height: 100%;
	min-height: 100%;
	aspect-ratio: auto;
	border: 0;
	border-radius: 0;
}

.overtop-popular-book__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.overtop-popular-book__author {
	margin: 0;
	color: var(--overtop-muted);
	font-size: 12px;
	line-height: 1.4;
}

.overtop-popular-book__meta {
	margin: 0;
	color: var(--overtop-muted);
	font-size: 12px;
	line-height: 1.5;
}

.overtop-popular-books__empty {
	margin: 12px 0 0;
	color: var(--overtop-muted);
	font-size: 14px;
}

.overtop-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
}

.overtop-catalog--books {
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--overtop-card);
  box-shadow: var(--overtop-shadow);
}

.overtop-catalog__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.overtop-catalog__item[hidden] {
  display: none !important;
}

.overtop-catalog__item:hover {
  background: rgba(244, 241, 234, 0.7);
}

.overtop-catalog__cover {
  display: block;
  overflow: hidden;
  width: 52px;
  height: 72px;
  border-radius: 4px;
  background: #ece7e0;
  box-shadow: 0 4px 10px rgba(40, 32, 24, 0.12);
}

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

.overtop-catalog__title {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.overtop-catalog__meta {
  display: block;
  color: var(--overtop-muted);
  font-size: 12px;
}

.overtop-catalog__go {
  color: #aaa;
  font-size: 22px;
  line-height: 1;
}

.overtop-catalog__empty {
  margin: 12px 0 0;
  color: var(--overtop-muted);
  font-size: 14px;
}

.overtop-cover {
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  width: 52px;
  height: 72px;
  padding: 6px;
  border-radius: 3px 5px 5px 3px;
  box-shadow: 2px 4px 10px rgba(40, 32, 24, 0.16);
}

.overtop-cover__title {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(40, 28, 20, 0.85);
  font-family: var(--overtop-serif);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.overtop-cover--mini {
  width: 38px;
  height: 54px;
  padding: 0;
}

.overtop-cover--peach {
  background: linear-gradient(160deg, #f3c2ae, #e8a58c);
}
.overtop-cover--sage {
  background: linear-gradient(160deg, #cfe0c0, #9fb892);
}
.overtop-cover--lavender {
  background: linear-gradient(160deg, #ddd0ee, #b9a6d4);
}
.overtop-cover--sand {
  background: linear-gradient(160deg, #ecd9b4, #d2b684);
}
.overtop-cover--mint {
  background: linear-gradient(160deg, #cfe8d4, #8fbfa8);
}
.overtop-cover--rose {
  background: linear-gradient(160deg, #f0c3c8, #d98b96);
}
.overtop-cover--sky {
  background: linear-gradient(160deg, #c9d7ee, #8aa4cc);
}
.overtop-cover--clay {
  background: linear-gradient(160deg, #e4c4a8, #c4926c);
}

.overtop-genres {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.overtop-genres--categories {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.overtop-genre {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 118px;
  padding: 14px;
  overflow: hidden;
  border-radius: 10px;
  background: #2a2a2e;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--overtop-shadow);
}

.overtop-genre:nth-child(1) {
  background: linear-gradient(160deg, #3d3a36, #1c1b19);
}
.overtop-genre:nth-child(2) {
  background: linear-gradient(160deg, #3a4148, #1a1f24);
}
.overtop-genre:nth-child(3) {
  background: linear-gradient(160deg, #43383a, #1f1819);
}
.overtop-genre:nth-child(4) {
  background: linear-gradient(160deg, #2f3f3a, #141c1a);
}
.overtop-genre:nth-child(5) {
  background: linear-gradient(160deg, #3a3344, #18151e);
}
.overtop-genre:nth-child(6) {
  background: linear-gradient(160deg, #3d3a2c, #1b1912);
}

.overtop-genre__dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8c9a4;
}

.overtop-genre:nth-child(2) .overtop-genre__dot {
  background: #c9d6b8;
}
.overtop-genre:nth-child(3) .overtop-genre__dot {
  background: #f0c7b4;
}
.overtop-genre:nth-child(4) .overtop-genre__dot {
  background: #d5c9e8;
}
.overtop-genre:nth-child(5) .overtop-genre__dot {
  background: #ead7a8;
}
.overtop-genre:nth-child(6) .overtop-genre__dot {
  background: #cfe8d4;
}

.overtop-genre__label {
  font-family: var(--overtop-serif);
  font-size: 18px;
}

.overtop-section--showcase .overtop-showcase {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.overtop-section--showcase .overtop-showcase::-webkit-scrollbar {
  display: none;
}

.overtop-showcase__nav {
  display: flex;
  gap: 6px;
}

.overtop-showcase__arrow {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #444;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.overtop-showcase__card {
  flex: 0 0 196px;
  scroll-snap-align: start;
  padding: 8px 4px 0;
  text-decoration: none;
  color: inherit;
}

.overtop-showcase__card .overtop-cover {
  width: 100%;
  height: 250px;
  padding: 18px 14px;
  border-radius: 4px 10px 10px 4px;
}

.overtop-showcase__card .overtop-cover__title {
  font-size: 18px;
  -webkit-line-clamp: 4;
}

.overtop-showcase__card h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.overtop-showcase__card p {
  margin: 0;
  color: var(--overtop-muted);
  font-size: 12px;
  line-height: 1.5;
}

.overtop-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.overtop-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.overtop-list__covers {
  display: flex;
  height: 62px;
}

.overtop-list__covers .overtop-cover {
  margin-left: -14px;
}

.overtop-list__covers .overtop-cover:first-child {
  margin-left: 0;
}

.overtop-list__title {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.overtop-list__meta {
  color: var(--overtop-muted);
  font-size: 13px;
}

.overtop-search .overtop-subnav {
  margin-top: 8px;
}

.overtop-search__count {
  margin: 0;
  color: var(--overtop-muted);
  font-size: 13px;
}

.overtop-search__empty {
  margin: 8px 0 0;
  color: var(--overtop-muted);
  font-size: 15px;
  line-height: 1.7;
}

.overtop-popular-authors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
}

.overtop-contact {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: 36px 48px;
  align-items: center;
}

.overtop-contact__portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #ece7e0;
  box-shadow: var(--overtop-shadow);
  aspect-ratio: 4 / 5;
}

.overtop-contact__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.overtop-contact__copy {
  min-width: 0;
}

.overtop-contact__quote {
  margin: 0 0 22px;
  font-family: "Ma Shan Zheng", "STKaiti", "KaiTi", "BiauKai", cursive;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--overtop-ink);
}

.overtop-contact__body {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
}

.overtop-contact__body p {
  margin: 0;
  color: #3d4654;
  font-size: clamp(14px, 1.35vw, 16px);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.overtop-contact__sign {
  margin: 0 0 28px;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--overtop-ink);
}

.overtop-contact__list {
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  list-style: none;
  display: grid;
  gap: 12px;
}

.overtop-contact__list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.overtop-contact__label {
  color: var(--overtop-muted);
  font-size: 13px;
  font-weight: 600;
}

.overtop-contact__list a,
.overtop-contact__list span:not(.overtop-contact__label) {
  color: var(--overtop-ink);
  font-size: 15px;
  text-decoration: none;
  line-height: 1.5;
  word-break: break-word;
}

.overtop-contact__list a:hover {
  color: var(--overtop-blue);
}

@media (max-width: 960px) {
	.overtop-features:not(.overtop-features--categories),
	.overtop-catalog,
	.overtop-genres,
	.overtop-lists {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.overtop-popular-books {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 40px;
		row-gap: 28px;
		max-width: none;
	}

	.overtop-contact {
		grid-template-columns: 1fr;
		gap: 24px;
	}

  .overtop-popular-authors {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .overtop-contact__portrait {
    max-width: 360px;
    margin-inline: auto;
  }

  .overtop-contact__sign {
    text-align: left;
  }
}

@media (max-width: 720px) {
	.overtop-section {
		margin-top: 40px;
	}

	.overtop-section--news {
		margin-top: 4px;
	}

	.overtop-features:not(.overtop-features--categories),
	.overtop-catalog,
	.overtop-genres,
	.overtop-lists {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.overtop-popular-books {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 36px;
		row-gap: 28px;
	}

	.overtop-subnav {
		flex-direction: column;
		align-items: stretch;
	}

	.overtop-subnav__links {
		justify-content: flex-start;
	}

	.overtop-section__head {
		flex-direction: row;
		align-items: baseline;
		gap: 10px;
	}

	.overtop-section__title {
		flex: 1 1 auto;
		min-width: 0;
	}

	.overtop-section__filters,
	.overtop-videos__all {
		flex: 0 0 auto;
		margin-left: auto;
	}

	.overtop-section__filters a,
	.overtop-videos__all {
		white-space: nowrap;
		font-size: 12px;
	}
}
