:root {
  --page: #ffffff;
  --surface: #f7f7f9;
  --surface-strong: #f1f1f4;
  --ink: #222225;
  --muted: #77777f;
  --line: #e8e8ec;
  --dark: #292929;
  --accent: #27a982;
  --accent-soft: #e6f8f1;
  --radius: 22px;
  --shadow: 0 12px 32px rgba(25, 25, 30, 0.08);
  --bn-h: 0px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 248, 235, 0.34), transparent 28rem),
    var(--page);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a,
button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.metrika-pixel {
  position: absolute;
  left: -9999px;
}

.home-header {
  position: relative;
  z-index: 10;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 40px) 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(39, 169, 130, 0.18);
}

.brand span {
  display: grid;
}

.brand strong {
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.geo-btn > span:first-child {
  color: var(--accent);
  font-size: 23px;
  line-height: 1;
}

.geo-btn__text {
  font-size: 12px;
  font-weight: 600;
}

.home-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 8px 8px 17px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search:focus-within {
  border-color: rgba(39, 169, 130, 0.45);
  box-shadow: 0 0 0 4px rgba(39, 169, 130, 0.1);
}

.home-search__icon {
  color: #a1a1aa;
  font-size: 28px;
  line-height: 1;
  transform: rotate(-18deg);
}

.home-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.home-search input::placeholder {
  color: #a0a0a8;
}

.home-search button {
  min-height: 40px;
  padding: 8px 17px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.top-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 13px;
  border-bottom: 1px solid var(--line);
}

.top-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 55px;
  padding: 8px 6px 11px;
  color: #9999a1;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}

.top-nav__item span {
  font-size: 18px;
  filter: grayscale(0.75);
}

.top-nav__item.active {
  color: var(--ink);
  font-weight: 600;
}

.top-nav__item.active::after {
  position: absolute;
  right: 14%;
  bottom: -1px;
  left: 14%;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
}

.home-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px) 36px;
}

.request-banner {
  overflow: hidden;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 48%),
    var(--dark);
  box-shadow: 0 14px 30px rgba(25, 25, 28, 0.16);
}

.request-banner__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 20px;
  color: #fff;
  text-decoration: none;
}

.request-banner__link > span:first-child {
  display: grid;
  gap: 5px;
}

.request-banner__link strong {
  font-size: 18px;
}

.request-banner__link small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.request-banner__plus {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  font-size: 30px;
  font-weight: 300;
}

.request-banner__note {
  margin: -7px 20px 17px;
  color: #bcebdc;
  font-size: 11px;
}

.account-strip,
.guest-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px solid #dcefe8;
  border-radius: 18px;
  background: #f1fbf7;
}

.account-strip > div:first-child {
  display: grid;
  gap: 3px;
}

.account-strip__eyebrow {
  color: var(--muted);
  font-size: 11px;
}

.account-strip strong {
  font-size: 14px;
}

.account-strip__actions,
.guest-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-strip a,
.guest-strip a {
  padding: 8px 12px;
  border-radius: 11px;
  color: #14765b;
  background: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.account-strip a.account-strip__logout {
  color: #8a5252;
}

.guest-strip {
  color: #686870;
  font-size: 12px;
}

.recent-section,
.catalog-section,
.help-section,
.support-card {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.section-heading > a {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
  font-size: 11px;
}

.section-heading__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.quick-chips a {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #55555d;
  background: #fff;
  text-decoration: none;
  font-size: 11px;
  box-shadow: 0 5px 15px rgba(25, 25, 30, 0.04);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
}

.service-card {
  position: relative;
  display: block;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.service-card__visual {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  font-size: clamp(38px, 8vw, 64px);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover .service-card__visual,
.service-card:focus-visible .service-card__visual {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(25, 25, 30, 0.1);
}

.service-card__visual--mint  { background: linear-gradient(145deg, #effcf7, #e3f6ef); }
.service-card__visual--lilac { background: linear-gradient(145deg, #fbf4ff, #f0e9fb); }
.service-card__visual--blue  { background: linear-gradient(145deg, #f1faff, #e7f3fa); }
.service-card__visual--green { background: linear-gradient(145deg, #f3fff9, #e7f7ef); }
.service-card__visual--sand  { background: linear-gradient(145deg, #fffdf1, #f9f2da); }
.service-card__visual--peach { background: linear-gradient(145deg, #fff8f0, #f8eadc); }
.service-card__visual--rose  { background: linear-gradient(145deg, #fff7fa, #f8eaf0); }

.service-card__label {
  display: block;
  min-height: 34px;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.35;
}

.service-card__count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: #176d56;
  background: #e3f7f0;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(25, 25, 30, 0.08);
}

.service-card__count--empty {
  color: #8f8f96;
  background: #f1f1f3;
}

.faq-list {
  overflow: hidden;
  border: 1px solid #ededf0;
  border-radius: 20px;
  background: var(--surface);
}

.faq-list details {
  border-bottom: 1px solid #e4e4e8;
}

.faq-list details:last-child {
  border-bottom: 0;
}

.faq-list summary {
  position: relative;
  padding: 17px 48px 17px 16px;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 19px;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid #96969e;
  border-bottom: 1.5px solid #96969e;
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.faq-list p {
  margin: -4px 16px 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background: var(--dark);
}

.support-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.support-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 22px;
}

.support-card h2 {
  margin: 0;
  font-size: 15px;
}

.support-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 11px;
}

.support-card__links {
  display: flex;
  gap: 8px;
}

.support-card__links a {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
}

.bottom-nav {
  display: none;
}

.bn-spacer {
  display: none;
}

.autocomplete-box {
  z-index: 1200;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.autocomplete-item {
  padding: 11px 14px;
  font-size: 13px;
  cursor: pointer;
}

.autocomplete-item + .autocomplete-item {
  border-top: 1px solid var(--line);
}

.autocomplete-item:hover {
  background: var(--surface);
}

.ripple {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0.5;
  transform: scale(0);
  animation: home-ripple 0.55s ease-out;
}

@keyframes home-ripple {
  to {
    opacity: 0;
    transform: scale(2.7);
  }
}

@media (min-width: 680px) {
  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 16px;
  }

  .service-card__label {
    font-size: 12px;
  }
}

@media (min-width: 960px) {
  .home-header {
    padding-top: 26px;
  }

  .home-search {
    margin-top: 26px;
  }

  .home-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 0 28px;
  }

  .request-banner,
  .account-strip,
  .guest-strip,
  .recent-section,
  .catalog-section {
    grid-column: 1;
  }

  .catalog-section {
    grid-row: span 3;
  }

  .help-section {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }

  .support-card {
    grid-column: 2;
    align-self: start;
    flex-direction: column;
    align-items: stretch;
  }

  .support-card__links {
    flex-wrap: wrap;
  }
}

@media (max-width: 780px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .home-header {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .home-main {
    padding-top: 10px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 1000;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    min-height: 70px;
    padding: 7px 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    background: rgba(38, 38, 38, 0.97);
    box-shadow: 0 15px 38px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
  }

  .bn-link {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    border-radius: 17px;
    color: rgba(255, 255, 255, 0.48);
    text-decoration: none;
    font-size: 8px;
  }

  .bn-link__icon {
    color: rgba(255, 255, 255, 0.63);
    font-size: 23px;
    line-height: 1;
  }

  .bn-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
  }

  .bn-link.active .bn-link__icon {
    color: #fff;
  }

  .bn-link--create .bn-link__icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #222;
    background: #fff;
    font-size: 22px;
  }

  .bn-spacer {
    display: block;
    height: calc(var(--bn-h, 92px) + 18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  .home-header,
  .home-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand small,
  .geo-btn__text {
    display: none;
  }

  .geo-btn {
    width: 42px;
    padding: 7px;
    justify-content: center;
  }

  .home-search {
    margin-top: 15px;
  }

  .home-search button {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 11px;
  }

  .top-nav__item {
    flex-direction: column;
    gap: 2px;
    min-height: 62px;
    font-size: 9px;
  }

  .request-banner__link {
    min-height: 84px;
    padding: 17px;
  }

  .request-banner__link strong {
    font-size: 15px;
  }

  .account-strip,
  .guest-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .recent-section,
  .catalog-section,
  .help-section,
  .support-card {
    margin-top: 25px;
  }

  .service-grid {
    gap: 14px 8px;
  }

  .service-card__visual {
    border-radius: 18px;
  }

  .support-card {
    align-items: stretch;
    flex-direction: column;
  }

  .support-card__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-card__links a {
    text-align: center;
  }
}

@media (max-width: 360px) {
  .home-search__icon {
    display: none;
  }

  .home-search {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 13px;
  }

  .top-nav__item span {
    font-size: 16px;
  }

  .service-card__label {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
