:root {
  --ink: #101721;
  --muted: rgba(16, 23, 33, 0.5);
  --line: rgba(16, 23, 33, 0.1);
  --soft: #eff0f4;
  --accent: #911c32;
  --green: #2a911c;
  --scale: 1;
}

/* Figma-matched route overlays */
.gallery-modal {
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(16, 23, 33, 0.7);
  backdrop-filter: blur(6px);
}

.gallery-stage {
  display: block;
  width: 720px;
  height: 870px;
  margin: 0;
}

.gallery-stage img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.gallery-close {
  position: fixed;
  top: 65px;
  left: calc(50% + 377px);
  width: 12px;
  height: 12px;
  background: transparent;
}

.gallery-close img {
  width: 12px;
  height: 12px;
  filter: invert(1);
}

.gallery-arrow {
  top: calc(50% - 40px);
  width: 48px;
  height: 48px;
  background: transparent;
}

.gallery-arrow::before {
  display: none;
}

.gallery-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/icons/heart.svg") center/contain no-repeat;
  filter: invert(1);
  opacity: 0;
}

.gallery-arrow-prev,
.gallery-arrow-next {
  background: rgba(255, 255, 255, 0.14);
}

.gallery-arrow-prev {
  left: calc(50% - 328px);
}

.gallery-arrow-next {
  right: calc(50% - 328px);
}

.gallery-arrow-prev::before,
.gallery-arrow-next::before {
  display: block;
  content: "";
  position: absolute;
  top: 16px;
  width: 14px;
  height: 14px;
  border-color: #fff;
  border-style: solid;
}

.gallery-arrow-prev::before {
  left: 19px;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}

.gallery-arrow-next::before {
  left: 15px;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.gallery-call {
  position: fixed;
  left: 50%;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 720px;
  height: 48px;
  transform: translateX(-50%);
}

.gallery-call button {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.gallery-call button .icon {
  filter: brightness(0) invert(1);
}

.gallery-call a {
  display: block;
  width: 40px;
  height: 40px;
}

.gallery-call a img {
  width: 40px;
  height: 40px;
  display: block;
}

.gallery-modal-top,
.gallery-thumbs {
  display: none;
}

.favorites-view.sheet-view {
  position: fixed;
  inset: 54px 0 0;
  width: 100vw;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  overflow: auto;
  background: #fff;
  backdrop-filter: none;
}

.favorites-view .sheet-panel {
  width: 1216px;
  margin: 0 auto;
  padding: 39px 0 220px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.favorites-view h2 {
  margin: 0 0 32px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.favorites-view .favorite-route-card {
  margin: 0;
}

.auth-view.sheet-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: rgba(16, 23, 33, 0.7);
  backdrop-filter: none;
}

.auth-view .auth-panel {
  position: relative;
  width: 390px;
  height: 354px;
  padding: 32px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.auth-view .register-panel {
  height: 413px;
  transform: translateY(29px);
}

.auth-view .auth-close {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 12px;
  height: 12px;
  background: transparent;
}

.auth-view .auth-close img {
  width: 12px;
  height: 12px;
}

.auth-view .auth-logo,
.auth-view .auth-panel > p {
  display: none;
}

.auth-view .auth-panel h2 {
  margin: 0 0 24px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.38;
}

.auth-view .auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.auth-view .auth-form label {
  display: block;
}

.auth-view .auth-form input {
  width: 327px;
  height: 49px;
  border: 1px solid #101721;
  border-radius: 100px;
  padding: 0 16px;
  color: var(--ink);
  font: 400 12px/1.4 Inter, Arial, sans-serif;
  letter-spacing: 0;
  outline: none;
}

.auth-view .auth-form input::placeholder {
  color: rgba(16, 23, 33, 0.5);
  opacity: 1;
}

.auth-view .auth-submit {
  width: 328px;
  height: 48px;
  margin-top: 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  color: rgba(16, 23, 33, 0.8);
  font-size: 14px;
  line-height: normal;
  letter-spacing: 0;
  text-decoration: underline;
  white-space: nowrap;
}

.auth-links-single {
  gap: 0;
}

@media (max-width: 767px) {
  .gallery-modal {
    --gallery-w: 360px;
    --gallery-h: 435px;
    --gallery-half-w: 180px;
    --gallery-half-h: 217.5px;
    --gallery-top: calc(50% - 217.5px);
    --gallery-side-gap: 17px;
    --gallery-close-gap: -28px;
    background: rgba(16, 23, 33, 0.7);
    backdrop-filter: blur(2px);
  }

  .gallery-stage {
    width: 360px;
    height: 435px;
  }

  .gallery-stage img {
    border-radius: 8px;
  }

  .gallery-close {
    top: 12px;
    left: auto;
    right: 16px;
  }

  .gallery-arrow {
    top: 50%;
    width: 24px;
    height: 24px;
  }

  .gallery-arrow-prev {
    left: 17px;
  }

  .gallery-arrow-next {
    right: 16px;
  }

  .gallery-arrow-prev::before,
  .gallery-arrow-next::before {
    top: 8px;
    width: 8px;
    height: 8px;
  }

  .gallery-arrow-prev::before {
    left: 9px;
  }

  .gallery-arrow-next::before {
    left: 7px;
  }

  .gallery-call {
    bottom: 10px;
    width: 328px;
  }

  .gallery-call button {
    width: 280px;
    flex: 0 0 280px;
  }

  .favorites-view.sheet-view,
  .auth-view.sheet-view {
    inset: calc(88px * var(--scale)) 0 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: auto;
    background: #fff;
    backdrop-filter: none;
  }

  .favorites-view .sheet-panel,
  .auth-view .auth-panel,
  .auth-view .register-panel {
    width: 360px;
    min-height: calc(100vh - 88px);
    height: auto;
    padding: 15px 16px 96px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .favorites-view .sheet-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .favorites-view h2,
  .auth-view .auth-panel h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.38;
  }

  .favorites-view h2 {
    margin-left: 16px;
  }

  .favorites-view .favorite-route-card {
    width: 360px;
    min-height: 322px;
    margin-top: 0;
    padding: 20px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .favorites-view .favorite-route-card .card-main {
    grid-template-columns: 168px 148px;
    column-gap: 12px;
    width: 328px;
  }

  .favorites-view .favorite-route-card .card-actions button {
    width: 280px;
  }

  .auth-view .auth-close {
    display: none;
  }

  .auth-view .auth-form {
    margin-top: 20px;
  }

  .auth-view .auth-form input {
    width: 327px;
  }
}

/* Current Figma pass: profile call CTA, filter screen, catalog categories. */
.nav a.is-active,
.mobile-nav a.is-active {
  color: #bd0122;
  opacity: 1;
}

body.catalog-category .page-home .vip-title,
body.catalog-category .page-home .vip-grid,
body.catalog-category #home-mobile .vip-title + .mobile-list {
  display: none;
}

body.catalog-category #home-desktop .home-wrap h2 {
  margin-top: 0;
}

body[data-category="agencies"] .page-home .badge-red {
  background: #d29a1e;
}

body[data-category="massage"] .page-home .badge-red {
  background: #101721;
}

.profile-call-bar {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 55;
  display: none;
  align-items: center;
  gap: 8px;
  width: 1216px;
  height: 48px;
  transform: translateX(-50%);
}

body.profile-route .profile-call-bar {
  display: flex;
}

body.profile-route .bottom-menu,
body.overlay-params .bottom-menu,
body.overlay-gallery .profile-call-bar {
  display: none;
}

.profile-call-button,
.filter-submit {
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
}

.profile-call-button {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 100px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.profile-call-button .icon {
  filter: brightness(0) invert(1);
}

.profile-call-telegram,
.profile-call-telegram img {
  display: block;
  width: 40px;
  height: 40px;
}

.filter-view {
  position: fixed;
  inset: 0;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100vw;
  min-height: 100vh;
  overflow: auto;
  background: rgba(16, 23, 33, 0.7);
  color: #101721;
}

.filter-panel {
  position: relative;
  width: 786px;
  min-height: 1574px;
  margin: 53px 0 40px calc(50% - 324px);
  padding: 24px 10px 90px 32px;
  background: #fff;
}

.filter-panel h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.38;
}

.filter-close {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: transparent;
}

.filter-close img {
  width: 12px;
  height: 12px;
}

.filter-form {
  margin-top: 21px;
}

.filter-fields {
  display: grid;
  grid-template-columns: 331px 331px;
  gap: 24px 40px;
}

.filter-range {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 75px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.filter-range small {
  color: rgba(16, 23, 33, 0.3);
  font-size: inherit;
}

.range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(16, 23, 33, 0.5);
  font-size: 12px;
}

.range-row input {
  width: 128px;
  height: 42px;
  border: 1px solid #dddee3;
  border-radius: 100px;
  padding: 0 16px;
  color: #101721;
  font: 500 15px/1.4 Inter, Arial, sans-serif;
  outline: none;
}

.filter-groups {
  display: grid;
  grid-template-columns: 344px 360px;
  gap: 42px 36px;
  margin-top: 31px;
}

.filter-group h3 {
  margin: 0 0 14px 16px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.38;
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(16, 23, 33, 0.1);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.filter-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-toggle i {
  position: relative;
  width: 48px;
  height: 24px;
  border-radius: 100px;
  background: #eff0f4;
}

.filter-toggle i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.filter-toggle input:checked + i {
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
}

.filter-toggle input:checked + i::after {
  transform: translateX(24px);
}

.filter-submit {
  position: absolute;
  left: 19px;
  bottom: 34px;
  width: 757px;
  height: 48px;
  border-radius: 100px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 1280px) and (min-width: 768px) {
  .filter-panel {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  body.catalog-category #home-mobile .vip-title,
  body.catalog-category #home-mobile .vip-grid,
  body.catalog-category #home-mobile .vip-title + .mobile-list {
    display: none;
  }

  body.catalog-category #home-mobile h2 {
    padding-top: 15px;
  }

  .profile-call-bar {
    left: 50vw;
    bottom: calc(10px * var(--scale));
    width: 328px;
    height: 48px;
    transform: translateX(-50%) scale(var(--scale));
    transform-origin: bottom center;
  }

  .profile-call-button {
    flex: 0 0 280px;
    width: 280px;
  }

  .filter-view {
    justify-content: center;
    min-height: 100vh;
    background: #fff;
  }

  .filter-panel {
    flex: 0 0 360px;
    width: 360px;
    min-height: 2431px;
    margin: 0;
    padding: 12px 0 10px;
    transform: scale(var(--scale));
    transform-origin: top center;
  }

  .filter-panel h2 {
    margin-left: 16px;
    font-size: 22px;
  }

  .filter-close {
    top: 22px;
    right: 16px;
  }

  .filter-form {
    margin-top: 24px;
  }

  .filter-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 331px;
    margin-left: 16px;
  }

  .filter-range {
    width: 331px;
  }

  .range-row input {
    width: 138px;
  }

  .filter-groups {
    display: block;
    margin-top: 32px;
  }

  .filter-group {
    margin-top: 32px;
  }

  .filter-group:first-child {
    margin-top: 0;
  }

  .filter-group h3 {
    margin-left: 16px;
  }

  .filter-toggle {
    width: 360px;
  }

  .filter-submit {
    position: sticky;
    left: auto;
    bottom: 10px;
    width: 328px;
    margin: 12px 16px 10px;
  }
}

/* Last-pass corrections for real route favorites and viewport-fitted gallery. */
.favorites-page-wrap {
  width: 1216px;
  min-height: calc(100vh - 54px);
  margin: 0 auto;
  padding: 39px 0 220px;
}

.favorites-page-wrap h1 {
  margin: 0 0 32px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.favorites-page-wrap .favorite-route-card {
  margin: 0;
}

.gallery-modal {
  --gallery-w: min(720px, 66.67vh);
  --gallery-h: min(870px, 80.56vh);
  --gallery-half-w: min(360px, 33.33vh);
  --gallery-half-h: min(435px, 40.28vh);
  --gallery-top: min(65px, 6.02vh);
  --gallery-side-gap: min(28px, 2.59vh);
  --gallery-close-gap: min(18px, 1.67vh);
}

.gallery-stage {
  position: fixed;
  top: var(--gallery-top);
  left: 50%;
  width: var(--gallery-w);
  height: var(--gallery-h);
  transform: translateX(-50%);
}

.gallery-stage img {
  max-height: none;
  border-radius: 8px;
  object-fit: cover;
}

.gallery-arrow {
  top: calc(var(--gallery-top) + var(--gallery-half-h));
}

.gallery-arrow-prev {
  left: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-arrow-next {
  right: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-close {
  top: var(--gallery-top);
  left: calc(50% + var(--gallery-half-w) + var(--gallery-close-gap));
}

.gallery-close img {
  filter: none;
}

.gallery-call {
  width: var(--gallery-w);
}

@media (max-width: 767px) {
  .favorites-page-wrap {
    width: auto;
    min-height: auto;
    padding: 0;
  }

  .mobile-favorites-page {
    min-height: calc(100vh - (88px * var(--scale)));
    padding: 15px 0 96px;
    background: #fff;
  }

  .mobile-favorites-page h1 {
    margin: 0 0 0 16px;
    font-family: Manrope, Inter, sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.38;
  }

  .mobile-favorites-page .favorite-route-card {
    width: 360px;
    min-height: 322px;
    margin-top: 0;
    padding: 20px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-favorites-page .favorite-route-card .card-main {
    grid-template-columns: 168px 148px;
    column-gap: 12px;
    width: 328px;
  }

  .mobile-favorites-page .favorite-route-card .card-actions button {
    width: 280px;
  }

  .gallery-modal {
    --gallery-w: 360px;
    --gallery-h: 435px;
    --gallery-half-w: 180px;
    --gallery-half-h: 217.5px;
    --gallery-top: calc(50% - 217.5px);
    --gallery-side-gap: 17px;
    --gallery-close-gap: -28px;
  }

  .gallery-stage {
    transform: translateX(-50%);
  }

  .gallery-arrow-prev {
    left: 17px;
  }

  .gallery-arrow-next {
    right: 16px;
  }

  .gallery-close {
    top: 12px;
    left: auto;
    right: 16px;
  }
}

/* Favorites is a real route page; gallery scales down from the Figma 1920x1080 frame. */
.favorites-page-wrap {
  width: 1216px;
  min-height: calc(100vh - 54px);
  margin: 0 auto;
  padding: 39px 0 220px;
}

.favorites-page-wrap h1 {
  margin: 0 0 32px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.favorites-page-wrap .favorite-route-card {
  margin: 0;
}

.gallery-modal {
  --gallery-w: min(720px, 66.67vh);
  --gallery-h: min(870px, 80.56vh);
  --gallery-half-w: min(360px, 33.33vh);
  --gallery-half-h: min(435px, 40.28vh);
  --gallery-top: min(65px, 6.02vh);
  --gallery-side-gap: min(28px, 2.59vh);
  --gallery-close-gap: min(18px, 1.67vh);
}

.gallery-stage {
  position: fixed;
  top: var(--gallery-top);
  left: 50%;
  width: var(--gallery-w);
  height: var(--gallery-h);
  transform: translateX(-50%);
}

.gallery-arrow {
  top: calc(var(--gallery-top) + var(--gallery-half-h));
}

.gallery-arrow-prev {
  left: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-arrow-next {
  right: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-close {
  top: var(--gallery-top);
  left: calc(50% + var(--gallery-half-w) + var(--gallery-close-gap));
}

.gallery-close img {
  filter: none;
}

.gallery-call {
  width: var(--gallery-w);
}

@media (max-width: 767px) {
  .favorites-page-wrap {
    width: auto;
    min-height: auto;
    padding: 0;
  }

  .mobile-favorites-page {
    min-height: calc(100vh - (88px * var(--scale)));
    padding: 15px 0 96px;
    background: #fff;
  }

  .mobile-favorites-page h1 {
    margin: 0 0 0 16px;
    font-family: Manrope, Inter, sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.38;
  }

  .mobile-favorites-page .favorite-route-card {
    width: 360px;
    min-height: 322px;
    margin-top: 0;
    padding: 20px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-favorites-page .favorite-route-card .card-main {
    grid-template-columns: 168px 148px;
    column-gap: 12px;
    width: 328px;
  }

  .mobile-favorites-page .favorite-route-card .card-actions button {
    width: 280px;
  }

  .gallery-modal {
    --gallery-w: 360px;
    --gallery-h: 435px;
    --gallery-half-w: 180px;
    --gallery-half-h: 217.5px;
    --gallery-top: calc(50% - 217.5px);
    --gallery-side-gap: 17px;
    --gallery-close-gap: -28px;
  }

  .gallery-stage {
    transform: translateX(-50%);
  }

  .gallery-arrow-prev {
    left: 17px;
  }

  .gallery-arrow-next {
    right: 16px;
  }

  .gallery-close {
    top: 12px;
    left: auto;
    right: 16px;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  padding-bottom: 96px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
}

.page,
.mobile-page {
  display: none;
}

.page.is-active,
.mobile-page.is-active {
  display: block;
}

.desktop-app {
  display: block;
  min-width: 1220px;
}

.mobile-shell {
  display: none;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  border-bottom: 1px solid #e8e8e9;
}

.site-header .logo {
  position: absolute;
  left: calc(50% - 608px);
  top: 18px;
}

.logo {
  display: block;
  align-items: center;
  width: 159px;
  height: 16px;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav {
  position: absolute;
  left: 50%;
  top: 17px;
  transform: translateX(-50%);
  display: flex;
  gap: 48px;
  font-size: 14px;
  opacity: 0.8;
}

.city {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.8;
}

.site-header .city {
  position: absolute;
  left: calc(50% + 533px);
  top: 15px;
}

.icon {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.home-wrap,
.profile-wrap {
  width: 1216px;
  margin: 0 auto;
}

.home-wrap {
  padding-top: 39px;
}

.home-wrap h1,
.home-wrap h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.home-wrap h2 {
  margin-top: 80px;
}

.desktop-grid {
  display: grid;
  grid-template-columns: repeat(3, 392px);
  gap: 48px 20px;
}

.vip-grid {
  margin-top: 32px;
}

.catalog-grid {
  margin-top: 32px;
}

.warning {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 328px;
  height: 36px;
  margin-top: 16px;
  padding: 0 16px 0 12px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.warning .icon-alert {
  width: 20px;
  height: 20px;
}

.escort-card {
  width: 392px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  cursor: pointer;
}

.card-main {
  display: grid;
  grid-template-columns: 168px 148px;
  column-gap: 12px;
  width: 328px;
}

.card-photo {
  position: relative;
  width: 168px;
  height: 226px;
  border-radius: 20px;
  overflow: hidden;
}

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

.badge {
  position: absolute;
  left: 12px;
  padding: 2px 8px;
  border-radius: 100px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  white-space: nowrap;
}

.badge-green {
  top: 172px;
  background: var(--green);
}

.badge-red {
  top: 195px;
  background: var(--accent);
}

.escort-card:not(.verified) .badge-green {
  display: none;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 148px;
}

.card-info h3 {
  margin: 0 0 6px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
}

.name-alina h3::before,
.name-angeline h3::before {
  content: "";
}

.name-alina h3,
.name-angeline h3 {
  font-size: 0;
}

.name-alina h3::after {
  content: "Алина";
  font-size: 18px;
}

.name-angeline h3::after {
  content: "Ангелина";
  font-size: 18px;
}

.district {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
  white-space: nowrap;
}

.district .icon {
  width: 12px;
  height: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 3px;
}

.chips span {
  border-radius: 100px;
  background: var(--soft);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.prices {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.prices span {
  opacity: 0.8;
}

.prices b,
.price-table b {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.prices small,
.price-table small {
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-actions button {
  width: 344px;
  height: 40px;
  border-radius: 100px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.telegram {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.telegram-icon {
  width: 40px;
  height: 40px;
}

.loader {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 48px 0 60px;
  color: var(--ink);
  font-size: 14px;
}

.loader span {
  width: 16px;
  height: 16px;
  background: url("assets/icons/loading.svg") center/contain no-repeat;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 0 48px;
}

.desktop-footer {
  width: 1216px;
  margin: 0 auto;
}

.footer p {
  margin: 0;
  color: var(--ink);
  opacity: 0.5;
  font-size: 12px;
  line-height: 1.3;
}

.footer > a:last-child {
  font-size: 14px;
  text-decoration: underline;
}

.profile-wrap {
  position: relative;
  min-height: 2318px;
  padding-top: 88px;
}

.profile-left {
  width: 360px;
}

.profile-title {
  display: flex;
  align-items: end;
  gap: 20px;
}

.profile-title h1,
.mobile-profile-title h1 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.profile-title span,
.mobile-profile-title span {
  margin-bottom: 12px;
  font-size: 14px;
}

.favorite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 218px;
  height: 40px;
  margin-top: 8px;
  border-radius: 100px;
  color: var(--accent);
  background: var(--soft);
  font-size: 14px;
  font-weight: 600;
}

.warning-profile {
  margin-top: 8px;
}

.price-head {
  display: grid;
  grid-template-columns: 82px 126px 1fr;
  gap: 34px;
  margin-top: 78px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: Manrope, Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.price-head span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-table {
  display: grid;
  grid-template-columns: 82px 88px 88px;
  column-gap: 36px;
  row-gap: 24px;
  margin-top: 18px;
  font-size: 15px;
}

.price-table b {
  font-size: 16px;
}

.about {
  width: 328px;
  margin: 72px 0 0;
  font-size: 15px;
  line-height: 1.4;
}

.gallery {
  position: absolute;
  left: 410px;
  top: 88px;
  display: grid;
  grid-template-columns: 392px 186px 186px;
  grid-template-rows: 290px 290px;
  gap: 20px;
}

.gallery img {
  border-radius: 16px;
}

.gallery-main {
  grid-row: span 2;
  height: 600px;
}

.more-photos {
  position: relative;
  width: 186px;
  height: 290px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(rgba(16, 23, 33, 0.72), rgba(16, 23, 33, 0.72)), url("assets/images/profile-main.webp") center/cover;
  color: #fff;
  font-family: Manrope, Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 0.9;
}

.more-photos span {
  display: block;
}

.params,
.services,
.location {
  margin-top: 112px;
}

.params h2,
.services h2,
.location h2 {
  margin: 0 0 28px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(3, 360px);
  gap: 0 52px;
}

.param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.4;
}

.param-row span:first-child {
  color: var(--muted);
  font-weight: 500;
}

.param-row span:last-child {
  text-align: right;
}

.services {
  margin-top: 58px;
}

.services-grid {
  display: grid;
  grid-template-columns: 215px 328px 215px 215px;
  gap: 80px;
}

.service-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-group h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.service-group ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.4;
}

.service-group li {
  display: flex;
  align-items: start;
  gap: 10px;
  white-space: nowrap;
}

.service-icon {
  width: 20px;
  height: 20px;
}

.service-group li.disabled {
  color: var(--muted);
}

.service-group small {
  color: var(--accent);
  font-size: 12px;
}

.location {
  margin-top: 78px;
}

.location img {
  width: 1216px;
  height: 480px;
  border-radius: 16px;
}

.complaint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 46px;
  color: #ee1717;
  font-size: 16px;
}

.bottom-menu {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  width: 444px;
  height: 56px;
  padding: 11px 34px 10px 36px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  transform: translateX(-50%);
  box-shadow: 0 10px 28px rgba(145, 28, 50, 0.16);
}

.bottom-menu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 0;
  opacity: 0.7;
  min-width: 64px;
}

.bottom-menu a.is-active {
  opacity: 1;
  font-weight: 600;
}

.bottom-menu img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.app-overlays {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  pointer-events: none;
}

.app-overlays.is-open {
  display: block;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

body.overlay-gallery .app-overlays {
  z-index: 120;
}

body.overlay-gallery .bottom-menu {
  opacity: 0;
  pointer-events: none;
}

.overlay-screen {
  display: none;
  min-height: 100%;
}

.overlay-screen.is-active {
  display: flex;
}

.overlay-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
}

.overlay-close img {
  width: 16px;
  height: 16px;
}

.gallery-modal {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 70px 116px 118px;
  background: rgba(16, 23, 33, 0.96);
  color: #fff;
}

.gallery-close {
  position: absolute;
  right: 40px;
  top: 32px;
  background: rgba(255, 255, 255, 0.12);
}

.gallery-close img {
  filter: invert(1);
}

.gallery-modal-top {
  position: absolute;
  left: 40px;
  top: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: Manrope, Inter, sans-serif;
  font-weight: 800;
}

.gallery-counter {
  min-width: 56px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 16px;
}

.gallery-title {
  font-size: 24px;
}

.gallery-stage {
  display: grid;
  place-items: center;
  width: min(760px, calc(100vw - 448px));
  height: calc(100vh - 210px);
  margin: 0;
}

.gallery-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 760px;
  border-radius: 16px;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-arrow::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 15px;
  width: 14px;
  height: 14px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.gallery-arrow-prev {
  left: 40px;
}

.gallery-arrow-prev::before {
  transform: rotate(45deg);
}

.gallery-arrow-next {
  right: 40px;
}

.gallery-arrow-next::before {
  left: 14px;
  transform: rotate(-135deg);
}

.gallery-thumbs {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.gallery-thumbs button {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  opacity: 0.54;
}

.gallery-thumbs button.is-active {
  border-color: #fff;
  opacity: 1;
}

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

.sheet-view {
  align-items: flex-start;
  justify-content: center;
  padding: 82px 20px 128px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.sheet-panel,
.auth-panel {
  width: 1216px;
  border: 1px solid #e8e8e9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(16, 23, 33, 0.08);
}

.sheet-panel {
  padding: 32px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.sheet-head p,
.auth-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.sheet-head h2,
.auth-panel h2 {
  margin: 4px 0 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.18;
}

.favorites-layout {
  display: grid;
  grid-template-columns: 392px 1fr;
  gap: 56px;
  padding-top: 32px;
}

.favorite-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  width: 392px;
  min-height: 160px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.favorite-card > img {
  width: 120px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
}

.favorite-card h3,
.favorites-note h3 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.favorite-card p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.favorite-remove {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
}

.favorite-remove img {
  width: 16px;
  height: 16px;
}

.favorites-note {
  align-self: center;
  max-width: 430px;
}

.favorites-note p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.auth-view {
  align-items: center;
  padding-top: 40px;
}

.auth-panel {
  position: relative;
  width: 392px;
  padding: 32px;
}

.auth-close {
  position: absolute;
  right: 24px;
  top: 24px;
}

.auth-logo {
  width: 159px;
  height: 16px;
  margin-bottom: 48px;
}

.auth-panel h2 {
  margin-top: 0;
}

.auth-panel p {
  margin-top: 10px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--ink);
  font: 500 15px/1 Inter, Arial, sans-serif;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(145, 28, 50, 0.5);
  box-shadow: 0 0 0 3px rgba(145, 28, 50, 0.08);
}

.auth-submit {
  height: 48px;
  margin-top: 6px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch {
  display: block;
  margin-top: 20px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 767px) {
  body {
    overflow-x: hidden;
    padding-bottom: calc(82px * var(--scale));
  }

  .desktop-app {
    display: none;
  }

  .mobile-shell {
    display: flex;
    justify-content: center;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
  }

  .mobile-scale {
    width: 360px;
    transform: scale(var(--scale));
    transform-origin: top center;
    will-change: transform;
  }

  .mobile-header {
    width: 360px;
    height: 88px;
    border-bottom: 1px solid #e8e8e9;
    background: #fff;
  }

  .mobile-top {
    position: relative;
    height: 40px;
    border: 1px solid #e8e8e9;
    border-left: 0;
    border-right: 0;
  }

  .mobile-top .logo {
    position: absolute;
    left: 16px;
    top: 14px;
    width: 126px;
    height: 13px;
  }

  .mobile-top .city {
    position: absolute;
    left: 269px;
    top: 10px;
  }

  .mobile-nav {
    display: flex;
    justify-content: center;
    gap: 26px;
    padding-top: 14px;
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
  }

  .mobile-page {
    width: 360px;
    min-height: 1px;
  }

  .mobile-page h1,
  .mobile-page h2 {
    margin: 0;
    font-family: Manrope, Inter, sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.38;
  }

  #home-mobile h1 {
    padding: 15px 0 0 16px;
  }

  #home-mobile h2 {
    padding: 20px 0 0 16px;
  }

  #home-mobile .warning {
    margin: 0 0 0 16px;
  }

  .mobile-list {
    margin-top: 0;
  }

  .escort-card.mobile-card {
    width: 360px;
    min-height: 322px;
    padding: 20px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-card .card-main {
    grid-template-columns: 168px 148px;
    column-gap: 12px;
    width: 328px;
  }

  .mobile-card .card-actions button {
    width: 280px;
  }

  .mobile-card .district {
    font-size: 12px;
  }

  .mobile-card .badge-green {
    display: none;
  }

  .mobile-card.verified .badge-green {
    display: block;
  }

  .loader {
    margin: 24px 0;
  }

  .footer {
    width: 360px;
    padding: 24px 16px 40px;
  }

  .mobile-profile {
    width: 360px;
    padding-top: 0;
  }

  .mobile-slider {
    position: relative;
    width: 360px;
    height: 400px;
    margin-left: 0;
    overflow: hidden;
    touch-action: pan-y;
  }

  .mobile-slider-track {
    display: flex;
    gap: 4px;
    width: max-content;
    height: 400px;
    transition: transform 220ms ease;
    will-change: transform;
  }

  .mobile-slide {
    position: relative;
    flex: 0 0 331px;
    width: 331px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
  }

  .mobile-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }

  .mobile-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 23, 33, 0) 72%, rgba(16, 23, 33, 0.7));
  }

  .mobile-slider .badge {
    z-index: 1;
    left: 16px;
  }

  .mobile-slider .badge-green {
    top: 39px;
  }

  .mobile-slider .badge-red {
    top: 16px;
  }

  .dots {
    position: absolute;
    z-index: 1;
    left: 151px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .dots span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.48);
  }

  .dots .is-active {
    width: 14px;
    background: #fff;
  }

  .mobile-profile-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    width: 328px;
    margin: 20px 0 0 16px;
  }

  .mobile-profile-title h1 {
    font-size: 22px;
  }

  .mobile-profile-title span {
    margin: 0 0 7px;
  }

  .mobile-profile .warning,
  .mobile-profile .favorite {
    width: 328px;
    margin-left: 16px;
  }

  .mobile-profile .warning {
    margin-top: 12px;
  }

  .mobile-profile .favorite {
    margin-top: 16px;
  }

  .mobile-profile .price-head {
    grid-template-columns: 73px 118px 1fr;
    gap: 32px;
    margin: 32px 0 0;
    padding: 0 16px 20px;
    font-size: 14px;
  }

  .mobile-profile .price-table {
    grid-template-columns: 73px 80px 80px;
    column-gap: 25px;
    margin: 18px 0 0 16px;
  }

  .mobile-profile .about {
    margin: 72px 0 0 16px;
  }

  .mobile-profile .params,
  .mobile-profile .services,
  .mobile-profile .location {
    margin-top: 32px;
  }

  .mobile-profile .params h2,
  .mobile-profile .services h2,
  .mobile-profile .location h2 {
    margin-left: 16px;
  }

  .mobile-profile .params h2 {
    margin-bottom: 12px;
  }

  .mobile-profile .services h2 {
    margin-bottom: 24px;
  }

  .mobile-profile .location h2 {
    margin-bottom: 16px;
  }

  .mobile-profile .params-grid {
    display: block;
  }

  .mobile-profile .param-row {
    width: 360px;
  }

  .mobile-profile .services {
    margin-top: 32px;
  }

  .mobile-profile .services-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 328px;
    margin-left: 16px;
  }

  .mobile-profile .service-group ul {
    gap: 16px;
  }

  .mobile-profile .location {
    margin-top: 32px;
  }

  .mobile-profile .location img {
    width: 329px;
    height: 548px;
    margin-left: 16px;
  }

  .mobile-profile .complaint {
    margin: 22px 0 0 16px;
  }

  .bottom-menu {
    bottom: calc(10px * var(--scale));
    width: 328px;
    padding-left: 24px;
    padding-right: 22px;
    transform: translateX(-50%) scale(var(--scale));
    transform-origin: bottom center;
  }

  .app-overlays {
    z-index: 40;
  }

  body.overlay-gallery .app-overlays {
    z-index: 120;
  }

  .gallery-modal {
    padding: 0;
    background: #101721;
  }

  .gallery-close {
    right: 16px;
    top: 16px;
    z-index: 2;
  }

  .gallery-modal-top {
    left: 16px;
    top: 18px;
    z-index: 2;
  }

  .gallery-title {
    font-size: 18px;
  }

  .gallery-counter {
    font-size: 14px;
  }

  .gallery-stage {
    width: 100vw;
    height: 100vh;
  }

  .gallery-stage img {
    max-height: none;
    border-radius: 0;
    object-fit: cover;
  }

  .gallery-arrow {
    display: none;
  }

  .gallery-thumbs {
    bottom: 20px;
    gap: 8px;
  }

  .gallery-thumbs button {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .sheet-view {
    display: none;
    align-items: flex-start;
    padding: 0 0 calc(86px * var(--scale));
    background: #fff;
    backdrop-filter: none;
  }

  .sheet-view.is-active {
    display: flex;
  }

  .sheet-panel,
  .auth-panel {
    width: min(360px, 100vw);
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sheet-panel {
    padding: 24px 16px 32px;
  }

  .sheet-head {
    padding-bottom: 24px;
  }

  .sheet-head h2,
  .auth-panel h2 {
    font-size: 22px;
  }

  .favorites-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
  }

  .favorite-card {
    grid-template-columns: 112px 1fr;
    width: 328px;
    min-height: 150px;
    padding: 12px;
  }

  .favorite-card > img {
    width: 112px;
    height: 150px;
  }

  .favorite-card h3,
  .favorites-note h3 {
    font-size: 18px;
  }

  .favorites-note {
    max-width: 328px;
  }

  .favorites-note p {
    font-size: 14px;
  }

  .auth-view {
    align-items: flex-start;
    padding-top: 0;
  }

  .auth-panel {
    padding: 24px 16px 32px;
  }

  .auth-close {
    right: 16px;
    top: 16px;
  }

  .auth-logo {
    width: 126px;
    height: 13px;
    margin-bottom: 48px;
  }

  .auth-form {
    margin-top: 24px;
  }
}

/* Final Figma route overrides. Kept at the end so legacy route styles cannot win. */
.app-overlays {
  width: 100vw;
}

.bottom-menu {
  left: 50vw;
}

.gallery-modal {
  --gallery-w: min(720px, 66.67vh);
  --gallery-h: min(870px, 80.56vh);
  --gallery-half-w: min(360px, 33.33vh);
  --gallery-half-h: min(435px, 40.28vh);
  --gallery-top: min(65px, 6.02vh);
  --gallery-side-gap: min(28px, 2.59vh);
  --gallery-close-gap: min(18px, 1.67vh);
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  background: rgba(16, 23, 33, 0.7);
  backdrop-filter: blur(6px);
  color: #fff;
}

.gallery-stage {
  position: fixed;
  top: var(--gallery-top);
  left: 50%;
  display: block;
  width: var(--gallery-w);
  height: var(--gallery-h);
  margin: 0;
  transform: translateX(-50%);
}

.gallery-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 8px;
  object-fit: cover;
}

.gallery-close {
  position: fixed;
  top: var(--gallery-top);
  left: calc(50% + var(--gallery-half-w) + var(--gallery-close-gap));
  z-index: 2;
  width: 12px;
  height: 12px;
  background: transparent;
}

.gallery-close img {
  width: 12px;
  height: 12px;
  filter: none;
}

.gallery-modal-top,
.gallery-thumbs {
  display: none;
}

.gallery-arrow {
  position: fixed;
  top: calc(var(--gallery-top) + var(--gallery-half-h));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%);
}

.gallery-arrow-prev {
  left: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-arrow-next {
  right: calc(50% - var(--gallery-half-w) + var(--gallery-side-gap));
}

.gallery-arrow::before {
  content: "";
  position: absolute;
  top: 16px;
  width: 14px;
  height: 14px;
  border-color: #fff;
  border-style: solid;
}

.gallery-arrow-prev::before {
  left: 19px;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}

.gallery-arrow-next::before {
  left: 15px;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.gallery-call {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--gallery-w);
  height: 48px;
  transform: translateX(-50%);
}

.gallery-call button {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.gallery-call button .icon {
  filter: brightness(0) invert(1);
}

.gallery-call a,
.gallery-call a img {
  display: block;
  width: 40px;
  height: 40px;
}

.favorites-view.sheet-view {
  position: fixed;
  inset: 54px 0 0;
  align-items: flex-start;
  justify-content: center;
  height: calc(100vh - 54px);
  min-height: 0;
  padding: 0;
  overflow: auto;
  background: #fff;
  backdrop-filter: none;
}

.favorites-view .sheet-panel {
  width: 1216px;
  min-height: calc(100vh - 54px);
  margin: 0 auto;
  padding: 39px 0 220px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.favorites-view h2 {
  margin: 0 0 32px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.38;
}

.favorites-view .favorite-route-card {
  margin: 0;
}

.auth-view.sheet-view {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: rgba(16, 23, 33, 0.7);
  backdrop-filter: none;
}

.auth-view .auth-panel {
  position: relative;
  width: 390px;
  height: 354px;
  min-height: 0;
  padding: 32px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.auth-view .register-panel {
  height: 413px;
  transform: translateY(29px);
}

.auth-view .auth-close {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 12px;
  height: 12px;
  background: transparent;
}

.auth-view .auth-close img {
  width: 12px;
  height: 12px;
}

.auth-view .auth-logo,
.auth-view .auth-panel > p {
  display: none;
}

.auth-view .auth-panel h2 {
  margin: 0 0 24px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.38;
}

.auth-view .auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.auth-view .auth-form label {
  display: block;
}

.auth-view .auth-form input {
  width: 327px;
  height: 49px;
  border: 1px solid #101721;
  border-radius: 100px;
  padding: 0 16px;
  color: var(--ink);
  font: 400 12px/1.4 Inter, Arial, sans-serif;
  letter-spacing: 0;
  outline: none;
}

.auth-view .auth-form input::placeholder {
  color: rgba(16, 23, 33, 0.5);
  opacity: 1;
}

.auth-view .auth-submit {
  width: 328px;
  height: 48px;
  margin-top: 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #bd0122 0%, #de781f 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  color: rgba(16, 23, 33, 0.8);
  font-size: 14px;
  line-height: normal;
  text-decoration: underline;
  white-space: nowrap;
}

.auth-links-single {
  gap: 0;
}

@media (max-width: 767px) {
  .gallery-modal {
    --gallery-w: 360px;
    --gallery-h: 435px;
    --gallery-half-w: 180px;
    --gallery-half-h: 217.5px;
    --gallery-top: calc(50% - 217.5px);
    --gallery-side-gap: 17px;
    --gallery-close-gap: -28px;
    background: rgba(16, 23, 33, 0.7);
    backdrop-filter: blur(2px);
  }

  .gallery-stage {
    width: 360px;
    height: 435px;
    transform: translateX(-50%);
  }

  .gallery-stage img {
    border-radius: 8px;
  }

  .gallery-close {
    top: 12px;
    left: auto;
    right: 16px;
  }

  .gallery-arrow {
    display: block;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
  }

  .gallery-arrow-prev {
    left: 17px;
  }

  .gallery-arrow-next {
    right: 16px;
  }

  .gallery-arrow::before {
    top: 8px;
    width: 8px;
    height: 8px;
  }

  .gallery-arrow-prev::before {
    left: 9px;
  }

  .gallery-arrow-next::before {
    left: 7px;
  }

  .gallery-call {
    bottom: 10px;
    width: 328px;
  }

  .gallery-call button {
    flex: 0 0 280px;
    width: 280px;
  }

  .favorites-view.sheet-view,
  .auth-view.sheet-view {
    inset: calc(88px * var(--scale)) 0 0;
    align-items: flex-start;
    justify-content: flex-start;
    height: calc(100vh - (88px * var(--scale)));
    min-height: 0;
    overflow: auto;
    background: #fff;
    backdrop-filter: none;
  }

  .favorites-view .sheet-panel,
  .auth-view .auth-panel,
  .auth-view .register-panel {
    width: 360px;
    min-height: calc(100vh - (88px * var(--scale)));
    height: auto;
    padding: 15px 16px 96px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-view .register-panel {
    transform: none;
  }

  .favorites-view .sheet-panel {
    padding-right: 0;
    padding-left: 0;
  }

  .favorites-view h2,
  .auth-view .auth-panel h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.38;
  }

  .favorites-view h2 {
    margin-left: 16px;
  }

  .favorites-view .favorite-route-card {
    width: 360px;
    min-height: 322px;
    margin-top: 0;
    padding: 20px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .favorites-view .favorite-route-card .card-main {
    grid-template-columns: 168px 148px;
    column-gap: 12px;
    width: 328px;
  }

  .favorites-view .favorite-route-card .card-actions button {
    width: 280px;
  }

  .auth-view .auth-close {
    display: none;
  }

  .auth-view .auth-form {
    margin-top: 20px;
  }

  .auth-view .auth-form input {
    width: 327px;
  }
}
