:root {
  color-scheme: light;
  --brand-font: "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--brand-font);
  color: #101013;
  background: #e1e3ea;
  --paper: #fefefe;
  --ink: #101013;
  --accent: #fa2a48;
  --purple: #383160;
  --search: #e7e8ee;
  --shell-width: 922px;
  --outer-gutter: 7px;
  --header-height: 65px;
  --search-height: 66px;
  --bottom-navigation-height: 67px;
  --bottom-navigation-space: calc(var(--bottom-navigation-height) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
  scroll-padding-bottom: var(--bottom-navigation-space);
}

:root[lang="en"] {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[lang="en"] :is(.hero h1, .home h2, .catalog-heading h1) {
  font-weight: 700;
  letter-spacing: -.018em;
}

:root[lang="en"] .catalog-heading h1 { line-height: 1.13; }

:root[lang="en"] :is(.category-tile span, .home-action strong, .profile-card-name, .catalog-tile-title, .catalog-row-body h2) {
  font-weight: 650;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.site-shell {
  position: relative;
  width: min(calc(100% - 2 * var(--outer-gutter)), var(--shell-width));
  min-height: calc(100svh - 2 * var(--outer-gutter));
  margin: max(var(--outer-gutter), env(safe-area-inset-top)) auto var(--outer-gutter);
  padding-bottom: var(--bottom-navigation-space);
  border-radius: 19px;
  background: var(--paper);
  isolation: isolate;
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  height: var(--header-height);
  padding-inline: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  border-radius: 19px 19px 0 0;
  background: var(--paper);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 2px;
}

.brand {
  flex: none;
  font-family: var(--brand-font);
  font-size: clamp(13px, 4.1vw, 16px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.48px;
  text-decoration: none;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
}

.header-menu { position: relative; flex: none; }

.header-action {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.header-action::-webkit-details-marker { display: none; }
.header-action svg { width: 20px; height: 20px; }
.header-action[aria-current='page'] { background: #eeedf5; }

.menu-panel {
  position: absolute;
  top: calc(100% + 5px);
  inset-inline-start: 0;
  min-width: 180px;
  padding: 5px;
  border: 1px solid #ebebf0;
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 10px 30px #17163418;
}

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
}

.menu-panel .compact-add-link { display: none; }

.language-panel {
  min-width: 146px;
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.language-panel a { justify-content: space-between; gap: 8px; }
.language-panel a[aria-current='page'] { background: #eeedf5; }
.language-panel svg { width: 16px; height: 16px; color: var(--purple); }

#view:focus { outline: none; }

.bottom-navigation {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 0;
  width: min(calc(100% - 2 * var(--outer-gutter)), var(--shell-width));
  min-height: var(--bottom-navigation-space);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid #e8e7ef;
  border-radius: 0 0 19px 19px;
  background: var(--paper);
}

.bottom-navigation-link {
  display: flex;
  min-height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  color: #6c687c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.bottom-navigation-link svg {
  width: 40px;
  height: 29px;
  padding: 3px 7px;
  border-radius: 20px;
}

.bottom-navigation-link[aria-current='page'] {
  color: var(--ink);
  font-weight: 750;
}

.bottom-navigation-link[aria-current='page'] svg { background: #eeedf5; }

.home {
  --category-width: clamp(89px, 27.75vw, 126px);
  --portrait-width: clamp(113px, 35.4vw, 160px);
  --category-gap: 5px;
  --profile-gap: 6px;
  padding-bottom: 35px;
}

.hero { padding-top: 14px; }

.hero h1 {
  margin: 0 20px;
  font-size: clamp(21px, 6.5vw, 30px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.45px;
  text-wrap: balance;
}

.hero h1 span { white-space: nowrap; }
.home-search {
  --search-height: 80px;
  margin: 16px 10px 0;
}

.search-form {
  min-height: var(--search-height);
  display: flex;
  align-items: center;
  gap: clamp(11px, 4vw, 16px);
  padding: 9px 11px 9px clamp(16px, 5.3vw, 22px);
  border-radius: 100px;
  background: var(--search);
  color: var(--purple);
}

.search-form:focus-within { box-shadow: 0 0 0 2px #b0acc9; }
.search-icon { flex: none; width: 24px; height: 24px; }
.home-search .search-icon { width: 28px; height: 28px; }

.search-form input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: clamp(16px, 4.25vw, 18px);
  font-weight: 600;
  color: inherit;
}

.search-form input::placeholder { color: var(--purple); opacity: 1; }
.home-search input { font-size: clamp(17px, 4.65vw, 20px); }
.home-search input::placeholder { color: #62616f; }

.search-submit {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.search-submit svg { width: 22px; height: 22px; }

.home-search .search-submit {
  flex-basis: 52px;
  width: 52px;
  height: 52px;
}

.home-search .search-submit svg { width: 24px; height: 24px; }

@media (prefers-reduced-motion: no-preference) {
  .home-search .search-form { transition: box-shadow 180ms ease; }

  .home-search .search-form:not(:focus-within) .search-submit {
    animation: search-button-pulse 2.8s ease-in-out infinite;
  }
}

@keyframes search-button-pulse {
  0%, 68%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 #fa2a4800;
  }

  31% {
    transform: scale(1.055);
    box-shadow: 0 0 0 4px #fa2a4824;
  }
}

.catalog-search-page .search-form { max-width: 680px; }

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.search-suggestions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: #f1f0f7;
  color: var(--purple);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.category-section { margin-top: 23px; }
.category-section h2 { margin: 0 14px 10px; }

.home h2 {
  font-size: clamp(20px, 5.2vw, 24px);
  font-weight: 800;
  letter-spacing: -.38px;
  line-height: 1.2;
}

.carousel-rail {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-user-select: none;
  user-select: none;
}

.carousel-rail::-webkit-scrollbar { display: none; }
.carousel-rail.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.carousel-rail.is-dragging a { cursor: grabbing; }
.carousel-rail:focus-visible { outline-offset: -2px; }
.carousel-rail a:focus-visible { outline-offset: -3px; }

.category-rail {
  gap: var(--category-gap);
  padding-inline: 13px;
  scroll-padding-inline: 13px;
}

.category-tile {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 0 0 var(--category-width);
  aspect-ratio: 246 / 310;
  overflow: hidden;
  scroll-snap-align: start;
  border-radius: 16px;
  background: #f1f1fa;
  text-decoration: none;
}

.category-tile img {
  grid-area: 2 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.category-tile span {
  grid-area: 1 / 1;
  padding: 14px 9px 0;
  font-size: clamp(12px, 3.65vw, 16px);
  font-weight: 750;
  letter-spacing: -.33px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.featured-section { margin-top: 25px; }
.featured-section h2 { margin: 0 17px 10px; }

.profile-rail {
  gap: var(--profile-gap);
  margin-inline-end: 5px;
  padding-inline-start: 12px;
  scroll-padding-inline-start: 12px;
}

.profile-rail--multiple::after {
  content: '';
  flex: 0 0 max(0px, calc(100% - var(--portrait-width) - var(--profile-gap)));
}

.profile-tile {
  display: block;
  flex: 0 0 var(--portrait-width);
  min-inline-size: 0;
  align-self: start;
  scroll-snap-align: start;
  text-decoration: none;
}

.profile-card-photo {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--profile-card-radius, 14px);
  background: #dedbd4;
}

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

.profile-card-photo::after {
  content: '';
  position: absolute;
  inset: 37% 0 0;
  background: linear-gradient(transparent, #1010142b 32%, #101014e8 100%);
  pointer-events: none;
}

.profile-card-caption {
  position: absolute;
  z-index: 1;
  inset: auto var(--profile-card-name-inset, 10px) 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  color: white;
}

.profile-card-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: clamp(14px, 3.9vw, 18px);
  font-weight: 700;
  line-height: 1.15;
}

.profile-card-profession {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(10px, 2.9vw, 12px);
  font-weight: 450;
  line-height: 1.2;
}

.carousel-dots { display: flex; justify-content: center; }

.carousel-dots button {
  display: grid;
  width: 16px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dddfe6;
}

.carousel-dots button[aria-pressed='true']::before { background: var(--purple); }

@media (hover: hover) {
  .header-action:hover, .menu-panel a:hover { background: #f1f1fa; }
  .bottom-navigation-link:hover { background: #f6f5fa; }
  .search-suggestions a:hover { background: #e7e8f3; }
  .category-tile:hover span, .profile-tile:hover .profile-card-name { text-decoration: underline; text-underline-offset: 3px; }
}

@media (max-width: 480px) {
  .category-rail {
    margin-inline: 13px;
    padding-inline: 0;
    scroll-padding-inline: 0;
  }

  .category-tile {
    flex-basis: calc((100% - 2 * var(--category-gap)) / 3);
    min-inline-size: 0;
    aspect-ratio: 3 / 4;
    grid-template-columns: minmax(0, 1fr);
  }

  .category-tile span { min-block-size: calc(14px + 2.24em); }

  .category-tile img {
    display: block;
    min-block-size: 0;
    padding: 0 5px 5px;
  }
}

@media (max-width: 415px) {
  .header-add { display: none; }
  .menu-panel .compact-add-link { display: flex; }
}

@media (max-width: 350px) {
  .site-header { gap: 2px; padding-inline: 2px; }
  .header-brand { gap: 0; }
  .brand { font-size: 13px; }
  .search-form { gap: 9px; padding-inline-start: 14px; }
  .search-icon { width: 22px; height: 22px; }
  .home-search .search-form { gap: 7px; padding-inline: 12px 9px; }
  .home-search .search-icon { width: 25px; height: 25px; }
}

@media (min-width: 620px) {
  :root { --outer-gutter: 17px; --header-height: 72px; }
  .site-header { padding-inline: 18px 25px; }
  .brand { font-size: 19px; }
  .hero { padding-top: 26px; }
  .hero h1 { margin-inline: 32px; font-size: 34px; letter-spacing: -.7px; }
  .home-search { max-width: 680px; margin-inline: 30px; }
  .home { --category-width: 158px; --portrait-width: 207px; --category-gap: 10px; --profile-gap: 11px; }
  .category-section { margin-top: 29px; }
  .category-section h2 { margin-inline-start: 32px; }
  .category-rail, .profile-rail { padding-inline-start: 30px; scroll-padding-inline-start: 30px; margin-inline-end: 10px; }
  .category-tile { border-radius: 21px; }
  .category-tile span { padding-inline: 16px; padding-top: 16px; }
  .featured-section { margin-top: 26px; }
  .featured-section h2 { margin-inline: 32px 21px; }
  .profile-tile { --profile-card-radius: 19px; --profile-card-name-inset: 15px; }
  .carousel-dots button { width: 22px; height: 34px; }
  .carousel-dots button::before { width: 8px; height: 8px; }
}
