/* =========================================================
   TWINLY — PROFILE
   ========================================================= */

.profile-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 24px;
  font-weight: 700;
}

.profile-identity h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.profile-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-action {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-align: left;
  border-radius: var(--radius);
  background: var(--card);
  box-sizing: border-box;
}

.profile-action-icon {
  flex-shrink: 0;
  font-size: 22px;
}

.profile-action span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.profile-action strong {
  display: block;
  margin-bottom: 4px;
}

.profile-action small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-section {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.profile-section h3 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.profile-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 20px;
  border: 0;
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-sizing: border-box;

  /*
   * Важно:
   * не обрезаем содержимое самого row.
   * Иначе при flex-сжатии первая часть текста
   * может потерять первые буквы.
   */
  overflow: visible;

  line-height: 1.45;
}

.profile-row span {
  min-width: 0;
}

.profile-row span:first-child {
  /*
   * Не позволяем названию поля сжиматься.
   * Именно это предотвращает обрезание:
   * "Пол", "Ищу", "Цель знакомства" и т.д.
   */
  flex-shrink: 0;
}

.profile-row span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* =========================================================
   PROFILE — ABOUT TEXT
   ========================================================= */

.profile-about-text {
  margin: 0;
  padding: 15px 20px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* =========================================================
   PROFILE — GENDER / LOOKING FOR
   ========================================================= */

.profile-gender-section {
  padding: 15px 20px;
}

.profile-gender-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.profile-gender-row + .profile-gender-row {
  margin-top: 10px;
}

.profile-gender-row strong {
  flex-shrink: 0;
}

.profile-gender-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* =========================================================
   TWINLY — PROFILE EDIT BUTTON
   ========================================================= */

.profile-edit-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  min-width: 0;

  margin: 0 20px 18px;
  padding: 12px 18px;

  border: 1px solid rgba(118,80,109,.28);
  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.10),
      rgba(198,165,106,.12)
    );

  color: var(--plum);

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;

  cursor: pointer;

  box-shadow:
    0 6px 18px rgba(118,80,109,.08);

  box-sizing: border-box;

  transition:
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    transform .15s ease,
    color .2s ease;
}

.profile-edit-profile-button:hover {
  border-color: rgba(118,80,109,.45);

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.15),
      rgba(198,165,106,.16)
    );

  color: var(--plum);

  box-shadow:
    0 9px 24px rgba(118,80,109,.12);

  transform: translateY(-1px);
}

.profile-edit-profile-button:active {
  transform: scale(.97);
}

.profile-edit-profile-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

body.dark .profile-edit-profile-button {
  border-color: rgba(198,165,106,.25);

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.18),
      rgba(198,165,106,.10)
    );

  color: #d9bfd3;
}

body.dark .profile-edit-profile-button:hover {
  border-color: rgba(198,165,106,.40);

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.24),
      rgba(198,165,106,.14)
    );
}

/* =========================================================
   TWINLY — REGISTRATION
   Modern registration UI
   ========================================================= */

.registration-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 40px;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(198,165,106,.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(118,80,109,.10),
      transparent 32%
    ),
    var(--bg);
  animation: registrationPageIn .45s ease both;
}

.registration-card {
  position: relative;
  width: min(100%, 560px);
  padding: 34px 34px 30px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 32px;
  background: rgba(255,255,255,.82);
  box-shadow:
    0 24px 70px rgba(32,32,32,.12),
    0 4px 18px rgba(32,32,32,.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

body.dark .registration-card {
  background: rgba(30,30,30,.88);
  border-color: rgba(255,255,255,.06);
}

.registration-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -130px;
  right: -90px;
  border-radius: 50%;
  background: rgba(198,165,106,.10);
  pointer-events: none;
}

.registration-logo {
  position: relative;
  text-align: center;
  margin-bottom: 24px;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: .14em;
  color: var(--text);
}

.registration-progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin: 0 auto 30px;
}

.registration-progress span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition:
    background .3s ease,
    transform .3s ease,
    opacity .3s ease;
}

.registration-progress span.active {
  background: linear-gradient(
    90deg,
    var(--plum),
    var(--premium)
  );
  transform: scaleY(1.25);
}

.registration-step {
  position: relative;
  animation: registrationStepIn .35s ease both;
}

.page-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 800;
}

.registration-subtitle {
  max-width: 440px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.registration-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border-radius: 24px;
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.13),
      rgba(198,165,106,.18)
    );
  font-size: 34px;
  box-shadow:
    inset 0 0 0 1px rgba(118,80,109,.08),
    0 12px 30px rgba(118,80,109,.08);
}

.registration-subtitle-title {
  margin-top: 34px;
}

/* ---------------------------------------------------------
   FORM
   --------------------------------------------------------- */

.form-label {
  display: block;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

.form-input {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  outline: none;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease,
    background .2s ease;
}

.form-input::placeholder {
  color: var(--muted);
  opacity: .72;
}

.form-input:hover {
  border-color: rgba(118,80,109,.28);
}

.form-input:focus {
  border-color: var(--plum);
  box-shadow:
    0 0 0 4px rgba(118,80,109,.10),
    0 8px 22px rgba(118,80,109,.07);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   CHOICE BUTTONS
   --------------------------------------------------------- */

.registration-choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.registration-choice {
  position: relative;
  min-height: 58px;
  padding: 12px 10px;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  transition:
    border-color .2s ease,
    background .2s ease,
    color .2s ease,
    box-shadow .2s ease,
    transform .15s ease;
}

.registration-choice:hover {
  border-color: rgba(118,80,109,.45);
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(32,32,32,.07);
}

.registration-choice:active {
  transform: scale(.98);
}

.registration-choice.selected {
  border-color: var(--plum);
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.13),
      rgba(198,165,106,.13)
    );
  color: var(--plum);
  box-shadow:
    0 0 0 3px rgba(118,80,109,.08),
    0 10px 25px rgba(118,80,109,.10);
}

.registration-choice.selected::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--plum);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* ---------------------------------------------------------
   GOALS
   --------------------------------------------------------- */

.registration-goals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
  margin-bottom: 24px;
}

.goal-choice {
  width: 100%;
  min-height: 56px;
  text-align: left;
  padding: 13px 18px;
}

.goal-choice.selected {
  padding-right: 42px;
}

/* ---------------------------------------------------------
   CITY
   --------------------------------------------------------- */

.city-results {
  position: relative;
  z-index: 20;
  width: 100%;
  margin-top: 7px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(32,32,32,.10);
}

.city-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease;
}

.city-option:last-child {
  border-bottom: 0;
}

.city-option:hover {
  background: var(--bg);
}

/* ---------------------------------------------------------
   LOCATION
   --------------------------------------------------------- */

#allow-location {
  margin-top: 8px;
}

.registration-secondary {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition:
    color .2s ease,
    transform .2s ease;
}

.registration-secondary:hover {
  color: var(--text);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   PRIMARY BUTTON
   --------------------------------------------------------- */

.registration-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      var(--plum),
      #8b607f
    );
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .01em;
  box-shadow:
    0 12px 28px rgba(118,80,109,.22);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease,
    filter .18s ease;
}

.registration-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(118,80,109,.28);
  filter: brightness(1.03);
}

.registration-submit:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}

.registration-submit:disabled {
  cursor: not-allowed;
  opacity: .42;
  box-shadow: none;
}

/* ---------------------------------------------------------
   ERROR
   --------------------------------------------------------- */

.registration-error {
  min-height: 22px;
  margin-top: 14px;
  color: var(--like);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------------------------------------------------------
   PHOTOS
   --------------------------------------------------------- */

.photo-add-button {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / .72;
  min-height: 150px;
  margin-bottom: 14px;
  border: 2px dashed rgba(118,80,109,.30);
  border-radius: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.055),
      rgba(198,165,106,.08)
    );
  color: var(--plum);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  transition:
    border-color .2s ease,
    background .2s ease,
    transform .18s ease,
    box-shadow .2s ease;
}

.photo-add-button:hover {
  border-color: var(--plum);
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.09),
      rgba(198,165,106,.13)
    );
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(118,80,109,.10);
}

.registration-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-bottom: 8px;
}

.registration-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.25;
  overflow: hidden;
  border-radius: 18px;
  background: var(--line);
  box-shadow: 0 7px 20px rgba(32,32,32,.09);
}

.registration-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.registration-photo-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 5;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20,20,20,.68);
  color: #fff;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition:
    transform .18s ease,
    background .18s ease;
}

.registration-photo-remove:hover {
  background: rgba(169,71,87,.92);
  transform: scale(1.08);
}

#photo-preview:empty {
  display: none;
}

#photo-preview:not(:empty) + .registration-submit {
  margin-top: 18px;
}

/* ---------------------------------------------------------
   STEP ANIMATION
   --------------------------------------------------------- */

@keyframes registrationStepIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes registrationPageIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ---------------------------------------------------------
   MOBILE REGISTRATION
   --------------------------------------------------------- */

@media (max-width: 600px) {

  .registration-page {
    align-items: flex-start;
    padding: 14px 10px 30px;
  }

  .registration-card {
    width: 100%;
    padding: 25px 18px 22px;
    border-radius: 27px;
  }

  .registration-logo {
    margin-bottom: 20px;
    font-size: 24px;
  }

  .registration-progress {
    margin-bottom: 25px;
  }

  .page-title {
    font-size: 27px;
  }

  .registration-subtitle {
    font-size: 14px;
    margin-bottom: 23px;
  }

  .registration-choice-group {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .registration-choice {
    min-height: 54px;
  }

  .registration-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .photo-add-button {
    min-height: 130px;
    aspect-ratio: 1 / .7;
  }

  .registration-submit {
    min-height: 56px;
  }
}

@media (max-width: 360px) {

  .registration-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .registration-photo-grid {
    gap: 7px;
  }

  .registration-photo {
    border-radius: 14px;
  }
}

/* ---------------------------------------------------------
   DARK MODE
   --------------------------------------------------------- */

body.dark .photo-add-button {
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.13),
      rgba(198,165,106,.08)
    );
}

body.dark .registration-choice.selected {
  color: #d9bfd3;
}

body.dark .registration-choice.selected::after {
  color: #fff;
}

body.dark .registration-submit {
  box-shadow:
    0 12px 30px rgba(0,0,0,.28);
}

/* =========================================================
   TWINLY — REGISTRATION GEO MAP
   ========================================================= */

.registration-geo-map {
  position: relative;
  width: 100%;
  max-width: 390px;
  height: 190px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.08),
      rgba(198,165,106,.10)
    ),
    var(--card);
  box-shadow:
    0 18px 45px rgba(32,32,32,.08);
}

body.dark .registration-geo-map {
  background:
    linear-gradient(
      135deg,
      rgba(140,102,133,.14),
      rgba(198,165,106,.08)
    ),
    var(--card);
}

.geo-map-grid {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(
      90deg,
      transparent 49%,
      var(--line) 50%,
      transparent 51%
    ),
    linear-gradient(
      0deg,
      transparent 49%,
      var(--line) 50%,
      transparent 51%
    );
  background-size: 42px 42px;
  transform: rotate(-8deg) scale(1.3);
}

.geo-map-road {
  position: absolute;
  height: 9px;
  border-radius: 20px;
  background: var(--line);
  opacity: .8;
}

.geo-road-1 {
  width: 125%;
  left: -12%;
  top: 72px;
  transform: rotate(16deg);
}

.geo-road-2 {
  width: 110%;
  left: -5%;
  top: 128px;
  transform: rotate(-19deg);
}

.geo-road-3 {
  width: 80%;
  left: 18%;
  top: 22px;
  transform: rotate(67deg);
}

.geo-map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-map-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(169,71,87,.13);
  animation: twinlyGeoPulse 2.2s ease-out infinite;
}

.geo-map-pin-core {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--like);
  color: var(--like);
  font-size: 23px;
  box-shadow:
    0 8px 22px rgba(32,32,32,.16);
}

.geo-map-label {
  position: absolute;
  z-index: 3;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.78);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}

body.dark .geo-map-label {
  background: rgba(30,30,30,.78);
}

.geo-label-1 {
  left: 18px;
  top: 18px;
  color: var(--text);
  letter-spacing: .12em;
}

.geo-label-2 {
  right: 14px;
  bottom: 16px;
}

@keyframes twinlyGeoPulse {
  0% {
    transform: scale(.55);
    opacity: .8;
  }

  70% {
    transform: scale(1.35);
    opacity: 0;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 520px) {

  .registration-geo-map {
    height: 175px;
    margin-bottom: 24px;
    border-radius: 24px;
  }
}


/* =========================================================
   TWINLY — DISCOVERY / FEED
   ========================================================= */

.feed-toolbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.feed-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}


/* ---------------------------------------------------------
   PROFILE CARD
   --------------------------------------------------------- */

.profile-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 42px rgba(32,32,32,.13);
}

.profile-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.5;
  max-height: 58vh;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.10),
      rgba(118,80,109,.04)
    );
}

.profile-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-card-photo-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 54px;
}

.profile-card-distance {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20,20,20,.60);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.profile-card-body {
  padding: 9px 12px;
}

.profile-card-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
}

.profile-card-age {
  font-size: 15px;
  font-weight: 700;
}

.profile-card-about {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.profile-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.profile-card-action {
  height: 44px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform .15s ease,
    background .15s ease,
    border-color .15s ease;
}

.profile-card-action:hover {
  transform: translateY(-2px);
}

.profile-card-action-like {
  background: var(--plum);
  border-color: var(--plum);
  color: #fff;
}

.profile-card-action-super {
  color: var(--premium);
}

/* ---------------------------------------------------------
   EMPTY
   --------------------------------------------------------- */

.feed-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.feed-empty-icon {
  margin-bottom: 12px;
  font-size: 42px;
  color: var(--plum);
}

.feed-empty h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feed-empty p {
  margin: 0;
  color: var(--muted);
}


/* ---------------------------------------------------------
   FILTER BUTTON
   --------------------------------------------------------- */

.feed-filter-button {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(32,32,32,.06);
  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.feed-filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(32,32,32,.10);
}


/* ---------------------------------------------------------
   FILTER MODAL
   --------------------------------------------------------- */

.filters-modal-open {
  overflow: hidden;
}

.feed-filters-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.feed-filters-modal[hidden] {
  display: none;
}

.feed-filters-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,18,20,.48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.feed-filters-panel {
  position: relative;
  z-index: 2;

  width: min(100%, 540px);
  max-height: min(760px, calc(100vh - 48px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 0;

  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;

  background: var(--card);

  box-shadow:
    0 30px 80px rgba(20,20,20,.25);

  animation: filtersModalIn .22s ease both;
}

.feed-filters-header {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  flex-shrink: 0;

  margin: 0;
  padding: 18px 24px;

  background: var(--card);

  border-bottom: 1px solid var(--line);
}

.filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;

  display: flex;
  gap: 12px;

  flex-shrink: 0;

  margin: 0;
  padding: 16px 24px;

  background: var(--card);

  border-top: 1px solid var(--line);
}

.filter-actions button {
  flex: 1;
}

.feed-filters-header h2 {
  margin: 0;
  font-size: 23px;
}

.feed-filters-close {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}


/* ---------------------------------------------------------
   FILTER SECTIONS
   --------------------------------------------------------- */

.filter-section {
  margin-bottom: 22px;
}

.filter-section h3 {
  margin: 0 0 11px;
  font-size: 14px;
  font-weight: 750;
}

.filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 11px;
}

.filter-label-row h3 {
  margin: 0;
}

.filter-label-row span {
  color: var(--plum);
  font-size: 13px;
  font-weight: 750;
}


/* ---------------------------------------------------------
   GENDER
   --------------------------------------------------------- */

.filter-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filter-option {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.filter-option.active {
  border-color: var(--plum);
  background: rgba(118,80,109,.10);
  color: var(--plum);
}


/* ---------------------------------------------------------
   RANGE
   --------------------------------------------------------- */

.range-row {
  position: relative;
  width: 100%;
  min-height: 38px;
}

.range-row input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 0;
  accent-color: var(--plum);
  cursor: pointer;
}

.range-row input[type="range"] + input[type="range"] {
  margin-top: -6px;
  position: relative;
  display: block;
  pointer-events: none;
}

.range-row input[type="range"] + input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
}

.range-row.single {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.range-row.single input[type="range"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


/* ---------------------------------------------------------
   SELECT
   --------------------------------------------------------- */

.filter-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}


/* ---------------------------------------------------------
   CHECKBOX
   --------------------------------------------------------- */

.filter-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--plum);
}


/* ---------------------------------------------------------
   PREMIUM
   --------------------------------------------------------- */

.premium-filter-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0 18px;
  color: var(--premium);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.premium-filter-divider::before,
.premium-filter-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.premium-filter-disabled {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--muted);
  text-align: left;
  cursor: default;
}

.premium-filter-disabled span {
  flex-shrink: 0;
  color: var(--premium);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}


/* ---------------------------------------------------------
   APPLY
   --------------------------------------------------------- */

.filter-apply {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--plum);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform .18s ease,
    filter .18s ease;
}

.filter-apply:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.filter-apply:disabled {
  opacity: .55;
  cursor: wait;
}


/* ---------------------------------------------------------
   ANIMATION
   --------------------------------------------------------- */

@keyframes filtersModalIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {
  .feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .profile-card {
    border-radius: 16px;
  }

  .profile-card-body {
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .profile-card-name {
    width: 100%;
    min-width: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
  }

  .profile-card-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-card-age {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* =========================================================
   TWINLY — PROFILE EDIT MODAL
   ========================================================= */

.profile-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .22s ease,
    visibility .22s ease;
}

.profile-edit-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------------------------------------------------------
   BACKDROP
   --------------------------------------------------------- */

.profile-edit-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(18, 16, 18, .52);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------------------------------------------------------
   DIALOG
   --------------------------------------------------------- */

.profile-edit-dialog {
  position: relative;
  z-index: 2;

  width: min(100%, 620px);
  max-height: min(860px, calc(100vh - 40px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;

  background: var(--card);
  color: var(--text);

  box-shadow:
    0 30px 90px rgba(20,20,20,.28);

  transform: translateY(18px) scale(.97);

  transition:
    transform .22s ease;
}

.profile-edit-modal.is-open .profile-edit-dialog {
  transform: translateY(0) scale(1);
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.profile-edit-header {
  position: relative;
  z-index: 5;

  flex-shrink: 0;

  min-height: 68px;

  display: grid;
  grid-template-columns: 42px 1fr auto;

  align-items: center;

  gap: 10px;

  padding: 10px 14px;

  border-bottom: 1px solid var(--line);

  background: var(--card);
}

.profile-edit-header h2 {
  min-width: 0;

  margin: 0;

  text-align: center;

  font-size: 19px;
  line-height: 1.2;
  font-weight: 750;
}

/* ---------------------------------------------------------
   CLOSE
   --------------------------------------------------------- */

.profile-edit-close {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--muted);

  font-size: 29px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  transition:
    background .16s ease,
    color .16s ease,
    transform .16s ease;
}

.profile-edit-close:hover {
  background: var(--bg);
  color: var(--text);
}

.profile-edit-close:active {
  transform: scale(.92);
}

/* ---------------------------------------------------------
   SAVE
   --------------------------------------------------------- */

.profile-edit-save {
  min-width: 88px;
  min-height: 40px;

  padding: 8px 14px;

  border: 0;
  border-radius: 12px;

  background: var(--plum);
  color: #fff;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform .16s ease,
    filter .16s ease,
    opacity .16s ease;
}

.profile-edit-save:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.profile-edit-save:active:not(:disabled) {
  transform: scale(.97);
}

.profile-edit-save:disabled {
  opacity: .55;
  cursor: wait;
}

.profile-edit-save.is-loading {
  position: relative;
  color: transparent;
}

.profile-edit-save.is-loading::after {
  content: "";

  position: absolute;

  top: 50%;
  left: 50%;

  width: 17px;
  height: 17px;

  margin:
    -8.5px
    0
    0
    -8.5px;

  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;

  border-radius: 50%;

  animation: profileEditSpinner .7s linear infinite;
}

@keyframes profileEditSpinner {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------
   CONTENT
   --------------------------------------------------------- */

.profile-edit-content {
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 20px;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.profile-edit-content::-webkit-scrollbar {
  width: 6px;
}

.profile-edit-content::-webkit-scrollbar-track {
  background: transparent;
}

.profile-edit-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line);
}

/* ---------------------------------------------------------
   SECTION
   --------------------------------------------------------- */

.profile-edit-section {
  margin-bottom: 18px;

  padding: 18px;

  border: 1px solid var(--line);
  border-radius: 20px;

  background: var(--card);

  box-sizing: border-box;
}

.profile-edit-section:last-child {
  margin-bottom: 0;
}

.profile-edit-section h3 {
  margin: 0 0 17px;

  color: var(--text);

  font-size: 16px;
  line-height: 1.3;
  font-weight: 750;
}

/* ---------------------------------------------------------
   FIELD
   --------------------------------------------------------- */

.profile-edit-field {
  display: block;

  margin-bottom: 15px;
}

.profile-edit-field:last-child {
  margin-bottom: 0;
}

.profile-edit-field > span {
  display: block;

  margin-bottom: 7px;

  color: var(--text);

  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.profile-edit-field input:not([type="hidden"]),
.profile-edit-field select,
.profile-edit-field textarea {
  width: 100%;

  box-sizing: border-box;

  border: 1px solid var(--line);
  border-radius: 14px;

  outline: none;

  background: var(--bg);
  color: var(--text);

  font-family: inherit;
  font-size: 15px;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.profile-edit-field input:not([type="hidden"]),
.profile-edit-field select {
  min-height: 48px;

  padding: 0 14px;
}

.profile-edit-field textarea {
  min-height: 110px;

  padding: 13px 14px;

  resize: vertical;

  line-height: 1.5;
}

.profile-edit-field input:not([type="hidden"])::placeholder,
.profile-edit-field textarea::placeholder {
  color: var(--muted);
  opacity: .7;
}

.profile-edit-field input:not([type="hidden"]):hover,
.profile-edit-field select:hover,
.profile-edit-field textarea:hover {
  border-color: rgba(118,80,109,.32);
}

.profile-edit-field input:not([type="hidden"]):focus,
.profile-edit-field select:focus,
.profile-edit-field textarea:focus {
  border-color: var(--plum);

  box-shadow:
    0 0 0 3px rgba(118,80,109,.10);
}

/* ---------------------------------------------------------
   READONLY CITY
   --------------------------------------------------------- */

.profile-edit-field input[readonly] {
  opacity: .82;
  cursor: default;
}

/* ---------------------------------------------------------
   SELECT
   --------------------------------------------------------- */

.profile-edit-field select {
  appearance: auto;
  -webkit-appearance: auto;

  cursor: pointer;
}

/* ---------------------------------------------------------
   HEIGHT
   --------------------------------------------------------- */

.profile-height-control {
  display: flex;
  align-items: center;

  gap: 16px;

  padding: 13px 14px;

  border: 1px solid var(--line);
  border-radius: 14px;

  background: var(--bg);

  box-sizing: border-box;
}

.profile-height-control input[type="range"] {
  flex: 1;

  width: 100%;
  min-width: 0;

  height: 5px;

  margin: 0;

  padding: 0;

  border: 0;

  accent-color: var(--plum);

  cursor: pointer;
}

.profile-height-control strong {
  flex-shrink: 0;

  min-width: 62px;

  color: var(--plum);

  text-align: right;

  font-size: 14px;
  font-weight: 750;
}

/* ---------------------------------------------------------
   RANGE — WEBKIT
   --------------------------------------------------------- */

.profile-height-control input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;

  border-radius: 999px;

  background: var(--line);
}

.profile-height-control input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;

  margin-top: -7.5px;

  border: 0;
  border-radius: 50%;

  background: var(--plum);

  box-shadow:
    0 3px 9px rgba(118,80,109,.25);

  appearance: none;
  -webkit-appearance: none;
}

.profile-height-control input[type="range"]::-moz-range-track {
  height: 5px;

  border-radius: 999px;

  background: var(--line);
}

.profile-height-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;

  border: 0;
  border-radius: 50%;

  background: var(--plum);

  box-shadow:
    0 3px 9px rgba(118,80,109,.25);
}

/* ---------------------------------------------------------
   INTERESTS / LANGUAGES
   --------------------------------------------------------- */

.profile-edit-hint {
  margin: -5px 0 10px;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.45;
}

.profile-edit-selected-count {
  margin-bottom: 13px;

  color: var(--plum);

  font-size: 13px;
  font-weight: 700;
}

.profile-edit-chips {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

/* ---------------------------------------------------------
   CHIP
   --------------------------------------------------------- */

.profile-edit-chip {
  min-height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 13px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: var(--bg);
  color: var(--text);

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  line-height: 1.25;

  cursor: pointer;

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .14s ease,
    box-shadow .16s ease;
}

.profile-edit-chip:hover {
  border-color: rgba(118,80,109,.42);

  transform: translateY(-1px);
}

.profile-edit-chip:active {
  transform: scale(.97);
}

.profile-edit-chip.is-selected {
  border-color: var(--plum);

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.13),
      rgba(198,165,106,.12)
    );

  color: var(--plum);

  box-shadow:
    0 0 0 2px rgba(118,80,109,.06);
}

.profile-edit-chip.is-selected::after {
  content: "✓";

  margin-left: 6px;

  font-size: 11px;
  font-weight: 800;
}

/* ---------------------------------------------------------
   EMPTY
   --------------------------------------------------------- */

.profile-edit-content .profile-empty {
  padding: 14px;

  border: 1px dashed var(--line);
  border-radius: 14px;

  color: var(--muted);

  text-align: center;

  font-size: 13px;
}

/* ---------------------------------------------------------
   PRIVACY SWITCH
   --------------------------------------------------------- */

.profile-edit-switch {
  min-height: 52px;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 11px 13px;

  margin-bottom: 9px;

  border: 1px solid var(--line);
  border-radius: 14px;

  background: var(--bg);

  color: var(--text);

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  box-sizing: border-box;
}

.profile-edit-switch:last-child {
  margin-bottom: 0;
}

.profile-edit-switch input {
  position: relative;

  flex-shrink: 0;

  width: 21px;
  height: 21px;

  margin: 0;

  accent-color: var(--plum);

  cursor: pointer;
}

.profile-edit-switch input:disabled {
  cursor: not-allowed;
}

.profile-edit-switch:has(input:disabled) {
  opacity: .62;
  cursor: default;
}

/* ---------------------------------------------------------
   ERROR
   --------------------------------------------------------- */

.profile-edit-error {
  margin-top: 16px;

  padding: 13px 15px;

  border: 1px solid rgba(169,71,87,.25);
  border-radius: 14px;

  background: rgba(169,71,87,.08);
  color: var(--like);

  font-size: 13px;
  font-weight: 600;

  line-height: 1.45;

  box-sizing: border-box;
}

.profile-edit-error[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   DARK MODE
   --------------------------------------------------------- */

body.dark .profile-edit-dialog {
  border-color: rgba(255,255,255,.07);

  box-shadow:
    0 30px 90px rgba(0,0,0,.48);
}

body.dark .profile-edit-section {
  background: var(--card);
}

body.dark .profile-edit-chip.is-selected {
  color: #d9bfd3;
  border-color: var(--plum);
}

body.dark .profile-edit-switch {
  background: var(--bg);
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 600px) {

  .profile-edit-modal {
    align-items: flex-end;

    padding: 0;
  }

  .profile-edit-dialog {
    width: 100%;
    max-width: none;

    max-height: 92vh;

    border-radius: 24px 24px 0 0;

    border-left: 0;
    border-right: 0;
    border-bottom: 0;

    transform: translateY(30px);
  }

  .profile-edit-modal.is-open .profile-edit-dialog {
    transform: translateY(0);
  }

  .profile-edit-header {
    min-height: 62px;

    grid-template-columns: 40px 1fr auto;

    padding:
      8px
      10px;

    gap: 8px;
  }

  .profile-edit-header h2 {
    font-size: 17px;
  }

  .profile-edit-close {
    width: 40px;
    height: 40px;

    font-size: 27px;
  }

  .profile-edit-save {
    min-width: 76px;
    min-height: 38px;

    padding: 7px 11px;

    border-radius: 11px;

    font-size: 13px;
  }

  .profile-edit-content {
    padding:
      14px
      12px
      calc(18px + env(safe-area-inset-bottom));
  }

  .profile-edit-section {
    margin-bottom: 12px;

    padding: 15px;

    border-radius: 18px;
  }

  .profile-edit-section h3 {
    margin-bottom: 15px;

    font-size: 15px;
  }

  .profile-edit-field {
    margin-bottom: 13px;
  }

  .profile-edit-field > span {
    margin-bottom: 6px;

    font-size: 12px;
  }

  .profile-edit-field input:not([type="hidden"]),
  .profile-edit-field select {
    min-height: 48px;

    font-size: 16px;
  }

  .profile-edit-field textarea {
    min-height: 105px;

    font-size: 16px;
  }

  .profile-height-control {
    gap: 12px;

    padding:
      12px;
  }

  .profile-height-control strong {
    min-width: 58px;

    font-size: 13px;
  }

  .profile-edit-chip {
    min-height: 36px;

    padding:
      7px
      11px;

    font-size: 12px;
  }

  .profile-edit-switch {
    min-height: 50px;

    padding:
      10px
      12px;

    font-size: 13px;
  }

  .profile-edit-error {
    margin-top: 13px;

    padding:
      12px
      13px;

    font-size: 12px;
  }
}

/* ---------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 360px) {

  .profile-edit-dialog {
    max-height: 94vh;
  }

  .profile-edit-content {
    padding-left: 9px;
    padding-right: 9px;
  }

  .profile-edit-section {
    padding: 13px;
  }

  .profile-edit-header {
    grid-template-columns: 38px 1fr auto;
  }

  .profile-edit-save {
    min-width: 70px;

    padding-left: 9px;
    padding-right: 9px;
  }

  .profile-edit-chip {
    padding-left: 9px;
    padding-right: 9px;
  }
}

/* ---------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .profile-edit-modal,
  .profile-edit-dialog,
  .profile-edit-close,
  .profile-edit-save,
  .profile-edit-chip {
    transition: none;
  }

  .profile-edit-save.is-loading::after {
    animation: none;
  }
}

.profile-personal-section .profile-row {
  padding: 6px 20px;
  line-height: 1.35;
}

/* =========================================================
   TWINLY — USER PROFILE
   FINAL
   ========================================================= */

.user-profile-page {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 42px;
  box-sizing: border-box;
}

/* =========================================================
   BACK
   ========================================================= */

.user-profile-top {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
}

.user-profile-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 13px 0 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text, #222);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.user-profile-back:hover {
  background: var(--surface-2, #f3f3f3);
}

.user-profile-back:active {
  transform: scale(.96);
}

.user-profile-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  font-size: 32px;
  font-weight: 300;
  line-height: 24px;
}

.user-profile-back-text {
  line-height: 1;
}

/* =========================================================
   GALLERY
   ========================================================= */

.user-profile-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-2, #f1f1f1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
}

.user-profile-gallery-main {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

/*
 * Ключевое исправление галереи:
 * все фотографии лежат друг на друге,
 * показывается только active.
 */

.user-profile-gallery-photo {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  margin: 0;
  padding: 0;
  border: 0;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .22s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.user-profile-gallery-photo.active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.user-profile-photo-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #999);
  font-size: 58px;
}

/* =========================================================
   GALLERY ARROWS
   ========================================================= */

.user-profile-gallery-prev,
.user-profile-gallery-next {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, .82);
  color: #222;

  font-size: 27px;
  font-weight: 300;
  line-height: 1;

  transform: translateY(-50%);
  cursor: pointer;

  box-shadow: 0 3px 12px rgba(0, 0, 0, .14);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);

  transition:
    transform .18s ease,
    background .18s ease;
}

.user-profile-gallery-prev {
  left: 12px;
}

.user-profile-gallery-next {
  right: 12px;
}

.user-profile-gallery-prev:hover,
.user-profile-gallery-next:hover {
  background: rgba(255, 255, 255, .96);
  transform: translateY(-50%) scale(1.04);
}

.user-profile-gallery-prev:active,
.user-profile-gallery-next:active {
  transform: translateY(-50%) scale(.94);
}

/* =========================================================
   COUNTER
   ========================================================= */

.user-profile-gallery-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;

  display: inline-flex;
  align-items: center;
  gap: 3px;

  padding: 6px 9px;

  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  color: #fff;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.user-profile-gallery-total {
  opacity: .8;
}

/* =========================================================
   DOTS
   ========================================================= */

.user-profile-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 11px;
  z-index: 6;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  transform: translateX(-50%);
}

.user-profile-gallery-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  padding: 0;

  border: 0;
  border-radius: 999px;

  background: rgba(255, 255, 255, .55);

  cursor: pointer;

  transition:
    width .2s ease,
    background .2s ease;
}

.user-profile-gallery-dot.active {
  width: 17px;
  background: #fff;
}

/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.user-profile-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;

  margin: 17px 0 20px;
}

.user-profile-action {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 50px;
  min-width: 50px;
  padding: 0;

  border: 1px solid var(--line, #e7e7e7);
  border-radius: 50%;

  background: var(--surface, #fff);

  font-size: 21px;
  line-height: 1;

  cursor: pointer;

  box-shadow: 0 4px 13px rgba(0, 0, 0, .07);

  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.user-profile-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 17px rgba(0, 0, 0, .11);
}

.user-profile-action:active {
  transform: scale(.93);
}

.user-profile-action-pass {
  font-size: 18px;
}

.user-profile-action-superlike {
  font-size: 20px;
}

.user-profile-action-like {
  font-size: 20px;
}

.profile-unblock-button{
  width:auto;
  min-width:160px;
  height:44px;
  min-height:44px;
  padding:0 22px;

  border:0;
  border-radius:12px;

  background:var(--plum);
  color:#fff;

  font-size:14px;
  font-weight:700;
  line-height:1;

  box-shadow:0 4px 13px rgba(0,0,0,.07);
}

.profile-unblock-button:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 17px rgba(0,0,0,.11);
}

.profile-unblock-button:active{
  transform:scale(.97);
}

.profile-unblock-button:disabled{
  opacity:.5;
  cursor:default;
}

/* =========================================================
   NAME / CITY
   ========================================================= */

.user-profile-header {
  margin: 0 0 18px;
  padding: 0 3px;
}

.user-profile-name {
  margin: 0;

  color: var(--text, #111);

  font-size: clamp(26px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.3px;
}

.user-profile-age {
  margin-left: 4px;
  color: var(--muted, #777);
  font-weight: 500;
}

.user-profile-city {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-top: 7px;

  color: var(--muted, #777);
  font-size: 14px;
  line-height: 1.4;
}

.user-profile-city-icon {
  font-size: 14px;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.user-profile-section {
  margin-top: 13px;
  padding: 18px;

  border-radius: 18px;

  background: var(--surface, #fff);

  box-shadow: 0 4px 17px rgba(0, 0, 0, .055);
}

.user-profile-section-title {
  margin: 0 0 14px;

  color: var(--text, #111);

  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
}

/* =========================================================
   ABOUT
   ========================================================= */

.user-profile-about {
  margin: 0;
  padding: 0;

  color: var(--text, #333);

  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;

  white-space: normal;
  overflow-wrap: anywhere;
}

.user-profile-about br {
  display: block;
  content: "";
  margin-bottom: 4px;
}

/* =========================================================
   BASIC / PERSONAL INFORMATION
   ========================================================= */

.user-profile-info {
  display: flex;
  flex-direction: column;
}

.user-profile-info-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;

  padding: 10px 0;

  border-bottom: 1px solid var(--line, #ededed);
}

.user-profile-info-row:first-child {
  padding-top: 0;
}

.user-profile-info-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.user-profile-info-label {
  flex: 0 0 44%;

  color: var(--text, #333);

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.user-profile-info-value {
  flex: 1;

  color: var(--muted, #777);

  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;

  text-align: right;
  overflow-wrap: anywhere;
}

/* =========================================================
   INTERESTS / LANGUAGES
   ========================================================= */

.user-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-profile-tag {
  display: inline-flex;
  align-items: center;

  min-height: 32px;
  padding: 6px 12px;

  border: 1px solid var(--line, #e4e4e4);
  border-radius: 999px;

  background: var(--surface-2, #f5f5f5);
  color: var(--text, #333);

  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;

  box-sizing: border-box;
}

/* =========================================================
   REPORT / BLOCK
   ========================================================= */

.user-profile-safety {
  display: flex;
  flex-direction: column;
  gap: 9px;

  margin-top: 26px;
  padding: 0 3px;
}

.user-profile-report,
.user-profile-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  width: 100%;
  min-height: 44px;
  padding: 10px 15px;

  border: 1px solid var(--line, #e4e4e4);
  border-radius: 14px;

  background: transparent;
  color: var(--muted, #666);

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .18s ease,
    transform .18s ease;
}

.user-profile-report:hover {
  background: var(--surface-2, #f5f5f5);
}

.user-profile-block {
  color: #c62828;
  border-color: rgba(198, 40, 40, .2);
}

.user-profile-block:hover {
  background: rgba(198, 40, 40, .05);
}

.user-profile-report:active,
.user-profile-block:active {
  transform: scale(.98);
}

/* =========================================================
   LOADING / ERROR
   ========================================================= */

.user-profile-loading,
.user-profile-error {
  width: 100%;
  min-height: 220px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 16px;

  color: var(--muted, #777);

  text-align: center;
}

.user-profile-error-text {
  font-size: 15px;
}

.user-profile-error-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  height: 38px;
  padding: 0 13px 0 8px;

  border: 0;
  border-radius: 12px;

  background: var(--surface-2, #f3f3f3);
  color: var(--text, #333);

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .user-profile-page {
    padding-bottom: 30px;
  }

  .user-profile-gallery {
    border-radius: 20px;
    aspect-ratio: 4 / 5;
  }

  .user-profile-gallery-prev,
  .user-profile-gallery-next {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }

  .user-profile-gallery-prev {
    left: 9px;
  }

  .user-profile-gallery-next {
    right: 9px;
  }

  .user-profile-actions {
    gap: 11px;
    margin-top: 15px;
    margin-bottom: 18px;
  }

  .user-profile-action {
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 19px;
  }

  .user-profile-action-pass {
    font-size: 17px;
  }

  .user-profile-header {
    margin-bottom: 15px;
  }

  .user-profile-name {
    font-size: 27px;
  }

  .user-profile-section {
    margin-top: 11px;
    padding: 16px;
    border-radius: 17px;
  }

  .user-profile-section-title {
    margin-bottom: 12px;
    font-size: 16px;
  }

  .user-profile-info-row {
    gap: 12px;
  }

  .user-profile-info-label {
    flex-basis: 43%;
  }

  .user-profile-safety {
    margin-top: 24px;
  }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

  .user-profile-page {
    padding-bottom: 25px;
  }

  .user-profile-top {
    margin-bottom: 10px;
  }

  .user-profile-back {
    height: 36px;
    padding-right: 10px;
  }

  .user-profile-back-icon {
    width: 22px;
    font-size: 29px;
  }

  .user-profile-gallery {
    border-radius: 17px;
  }

  .user-profile-gallery-counter {
    top: 9px;
    right: 9px;
  }

  .user-profile-gallery-dots {
    bottom: 9px;
  }

  .user-profile-action {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .user-profile-name {
    font-size: 25px;
  }

  .user-profile-section {
    padding: 15px;
  }

  .user-profile-info-row {
    display: block;
    padding: 9px 0;
  }

  .user-profile-info-label {
    display: block;
    margin-bottom: 3px;
  }

  .user-profile-info-value {
    display: block;
    text-align: left;
  }

  .user-profile-tag {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* =========================================================
   DARK THEME
   ========================================================= */

[data-theme="dark"] .user-profile-back {
  color: var(--text, #fff);
}

[data-theme="dark"] .user-profile-back:hover {
  background: var(--surface-2, #29292b);
}

[data-theme="dark"] .user-profile-action,
[data-theme="dark"] .user-profile-section {
  background: var(--surface, #1c1c1e);
}

[data-theme="dark"] .user-profile-name,
[data-theme="dark"] .user-profile-section-title,
[data-theme="dark"] .user-profile-info-label,
[data-theme="dark"] .user-profile-about {
  color: var(--text, #fff);
}

[data-theme="dark"] .user-profile-age,
[data-theme="dark"] .user-profile-city,
[data-theme="dark"] .user-profile-info-value {
  color: var(--muted, #aaa);
}

[data-theme="dark"] .user-profile-info-row {
  border-bottom-color: var(--line, #38383a);
}

[data-theme="dark"] .user-profile-tag {
  border-color: #3a3a3c;
  background: #2c2c2e;
  color: #fff;
}

[data-theme="dark"] .user-profile-report {
  border-color: #3a3a3c;
}

[data-theme="dark"] .user-profile-block {
  border-color: rgba(255, 80, 80, .25);
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .user-profile-gallery-photo,
  .user-profile-action,
  .user-profile-back,
  .user-profile-gallery-prev,
  .user-profile-gallery-next,
  .user-profile-gallery-dot {
    transition: none;
  }
}


/* =========================================================
   TWINLY — FILTER MODAL
   SCROLL + TOP ACTIONS + RECTANGULAR MULTI OPTIONS
   ========================================================= */


/* ---------------------------------------------------------
   SCROLLABLE FILTER CONTENT
   --------------------------------------------------------- */

.feed-filters-content {
  min-height: 0;
  flex: 1 1 auto;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 20px 24px 24px;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.feed-filters-content::-webkit-scrollbar {
  width: 6px;
}

.feed-filters-content::-webkit-scrollbar-track {
  background: transparent;
}

.feed-filters-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line);
}


/* ---------------------------------------------------------
   FILTER ACTIONS — FIXED TOP ZONE
   --------------------------------------------------------- */

.feed-filters-panel > .filter-actions {
  position: relative;
  top: auto;
  bottom: auto;

  order: 2;

  flex-shrink: 0;

  margin: 0;
  padding: 12px 24px;

  border-top: 0;
  border-bottom: 1px solid var(--line);

  background: var(--card);
}

.feed-filters-panel > .feed-filters-header {
  order: 1;
}

.feed-filters-panel > .feed-filters-content {
  order: 3;
}


/* ---------------------------------------------------------
   INTERESTS / LANGUAGES
   RECTANGULAR BUTTONS
   --------------------------------------------------------- */

.filter-multi-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-multi-option {
  width: 100%;
  min-height: 44px;

  display: flex;
  align-items: center;

  padding: 9px 12px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: var(--bg);
  color: var(--text);

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  line-height: 1.25;
  text-align: left;

  cursor: pointer;
  box-sizing: border-box;

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .14s ease;
}

.filter-multi-option:hover {
  border-color: rgba(118,80,109,.42);
  transform: translateY(-1px);
}

.filter-multi-option:active {
  transform: scale(.98);
}

.filter-multi-option.is-selected {
  border-color: var(--plum);

  background:
    linear-gradient(
      135deg,
      rgba(118,80,109,.13),
      rgba(198,165,106,.12)
    );

  color: var(--plum);
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 600px) {

  .feed-filters-modal {
    padding: 10px;
  }

  .feed-filters-panel {
    width: 100%;
    max-height: calc(100vh - 20px);

    border-radius: 24px;
  }

  .feed-filters-header {
    padding: 12px 14px;
  }

  .feed-filters-header h2 {
    font-size: 19px;
  }

  .feed-filters-content {
    padding: 16px 14px 20px;
  }

  .feed-filters-panel > .filter-actions {
    padding: 10px 14px;
  }

  .filter-multi-options {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 7px;
  }

  .filter-multi-option {
    min-height: 42px;

    padding: 8px 10px;

    font-size: 12px;
  }
}

/* =========================================================
   TWINLY — FILTER ACTIONS
   ========================================================= */

.feed-filters-panel > .filter-actions {
  align-items: center;
}

/* Сбросить фильтры — текстовая кнопка */

.feed-filters-panel > .filter-actions .filter-reset {
  flex: 0 0 auto;

  min-height: 40px;
  padding: 8px 4px;

  border: 0;
  background: transparent;

  color: var(--text);

  font-family: inherit;
  font-size: 14px;
  font-weight: 750;

  cursor: pointer;

  transition:
    color .16s ease,
    opacity .16s ease;
}

.feed-filters-panel > .filter-actions .filter-reset:hover {
  color: var(--plum);
}

.feed-filters-panel > .filter-actions .filter-reset:active {
  opacity: .65;
}


/* Сохранить — компактная основная кнопка */

.feed-filters-panel > .filter-actions .filter-apply {
  flex: 1;

  min-height: 40px;
  padding: 8px 14px;

  border-radius: 12px;

  font-size: 14px;
  font-weight: 700;
}


/* MOBILE */

@media (max-width: 600px) {

  .feed-filters-panel > .filter-actions .filter-reset {
    min-height: 38px;
    padding: 7px 3px;

    font-size: 13px;
  }

  .feed-filters-panel > .filter-actions .filter-apply {
    min-height: 38px;
    padding: 7px 12px;

    font-size: 13px;
  }
}

/* =========================================================
   PREMIUM FILTERS
   ========================================================= */

.premium-filters-section {
  position: relative;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.premium-filters-title {
  margin-bottom: 14px;
  color: var(--plum);
  font-size: 15px;
  font-weight: 800;
}

.feed-filters-panel[data-premium="0"]
.premium-filters-section > .filter-section {
  opacity: .45;
  filter: blur(.5px);
  pointer-events: none;
  user-select: none;
}

.feed-filters-panel[data-premium="0"]
.premium-filters-section > .filter-section * {
  pointer-events: none !important;
  user-select: none !important;
}

.premium-filters-panel[data-premium="0"] .premium-filters-title {
  opacity: 1;
  filter: none;
  pointer-events: none;
}

.feed-filters-panel[data-premium="1"]
.premium-filters-section > .filter-section {
  opacity: 1;
  filter: none;
  pointer-events: auto;
  user-select: auto;
}

.premium-upgrade-button {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(118,80,109,.16),
    rgba(198,165,106,.18)
  );
  color: var(--plum);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform .14s ease,
    opacity .16s ease;
}

.premium-upgrade-button:active {
  transform: scale(.98);
  opacity: .7;
}

/* =========================================================
   FREE — PREMIUM BLOCK LOCKED
   ========================================================= */

.feed-filters-panel[data-premium="0"]
.premium-filters-section {
  position: relative;
}


/* визуально приглушаем всё содержимое Premium */

.feed-filters-panel[data-premium="0"]
.premium-filters-section > .filter-section {
  opacity: .45;
  filter: blur(.5px);
}


/* физически отключаем ВСЕ элементы внутри Premium */

.feed-filters-panel[data-premium="0"]
.premium-filters-section > .filter-section,
.feed-filters-panel[data-premium="0"]
.premium-filters-section > .filter-section * {
  pointer-events: none !important;
  user-select: none !important;
}


/* заголовок Premium остаётся чётким */

.feed-filters-panel[data-premium="0"]
.premium-filters-title {
  opacity: 1;
  filter: none;
  pointer-events: none;
}


/* замок остаётся чётким */

.feed-filters-panel[data-premium="0"]
.premium-filters-lock {
  opacity: 1;
  filter: none;
}


/* =========================================================
   PREMIUM — EVERYTHING ACTIVE
   ========================================================= */

.feed-filters-panel[data-premium="1"]
.premium-filters-section > .filter-section {
  opacity: 1;
  filter: none;
  pointer-events: auto;
  user-select: auto;
}


/* =========================================================
   TWINLY — MATCH DECK / PAIRS
   ========================================================= */

.matches-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
  z-index: 20;
}


/*
 * ---------------------------------------------------------
 * PAGE
 * ---------------------------------------------------------
 */

.match-deck-page {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 18px;
}


/*
 * ---------------------------------------------------------
 * DECK
 * ---------------------------------------------------------
 */

.match-deck {
  position: relative;
  width: min(100%, 380px);
  height: min(62vh, 560px);
  min-height: 380px;
  margin: 0 auto;
  touch-action: pan-y;
}


/*
 * ---------------------------------------------------------
 * CARD
 * ---------------------------------------------------------
 */

.match-deck-card {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  border-radius: 24px;

  overflow: hidden;

  background:
    var(--card, #ffffff);

  box-shadow:
    0 14px 38px rgba(40, 20, 35, .18);

  transform-origin:
    50% 100%;

  user-select: none;
  -webkit-user-select: none;

  cursor: grab;

  transition:
    transform .28s ease,
    opacity .28s ease,
    filter .28s ease;

  will-change:
    transform,
    opacity;
}


.match-deck-card.current {
  z-index: 5;

  transform:
    translate3d(0, 0, 0)
    scale(1);

  opacity: 1;
}


.match-deck-card.next {
  z-index: 4;

  transform:
    translate3d(34px, 0, 0)
    scale(.94);

  opacity: .85;

  pointer-events: none;
}


.match-deck-card.next-2 {
  z-index: 3;

  transform:
    translate3d(-34px, 0, 0)
    scale(.88);

  opacity: .55;

  pointer-events: none;
}


.match-deck-card.hidden {
  z-index: 1;

  opacity: 0;

  pointer-events: none;

  transform:
    scale(.8);
}


/*
 * ---------------------------------------------------------
 * CARD INNER
 * ---------------------------------------------------------
 */

.match-deck-card-inner {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background:
    #eee;
}


.match-deck-photo {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  pointer-events: none;

  user-select: none;
  -webkit-user-drag: none;
}


.match-deck-photo-empty {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  font-size: 72px;

  color: var(--plum, #6e3b62);

  background:
    linear-gradient(
      145deg,
      #f4eaf2,
      #ead9e7
    );
}


/*
 * ---------------------------------------------------------
 * GRADIENT / INFO
 * ---------------------------------------------------------
 */

.match-deck-overlay {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  min-height: 42%;

  display: flex;
  align-items: flex-end;

  padding: 26px 22px 22px;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0),
      rgba(0,0,0,.12) 20%,
      rgba(0,0,0,.72) 100%
    );

  pointer-events: none;
}


.match-deck-info {
  width: 100%;

  color: #fff;

  text-shadow:
    0 1px 3px rgba(0,0,0,.45);
}


.match-deck-name {
  margin: 0;

  font-size: 28px;
  line-height: 1.15;

  font-weight: 800;

  letter-spacing: -.3px;
}


.match-deck-name span {
  font-weight: 500;
}


.match-deck-city {
  margin-top: 8px;

  font-size: 15px;
  line-height: 1.3;

  opacity: .96;
}


.match-deck-about {
  margin-top: 10px;

  max-height: 74px;

  overflow: hidden;

  font-size: 14px;
  line-height: 1.45;

  opacity: .95;
}


/*
 * ---------------------------------------------------------
 * ACTION BUTTONS
 * ---------------------------------------------------------
 */

.match-deck-actions {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 14px;

  width: 100%;

  margin-top: 18px;

  padding: 0 8px;
}


.match-deck-action {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background:
    var(--card, #fff);

  box-shadow:
    0 7px 20px rgba(40, 20, 35, .16);

  font-size: 25px;

  line-height: 1;

  cursor: pointer;

  transition:
    transform .16s ease,
    box-shadow .16s ease,
    opacity .16s ease;
}


.match-deck-action:hover {
  transform:
    translateY(-2px)
    scale(1.04);

  box-shadow:
    0 10px 25px rgba(40, 20, 35, .20);
}


.match-deck-action:active {
  transform:
    scale(.93);
}


.match-deck-undo {
  width: 48px;
  height: 48px;

  font-size: 21px;
}


.match-deck-pass {
  width: 62px;
  height: 62px;

  font-size: 25px;
}


.match-deck-superlike {
  width: 58px;
  height: 58px;

  font-size: 24px;
}


.match-deck-like {
  width: 62px;
  height: 62px;

  font-size: 25px;
}


/*
 * FREE USER — UNDO DISABLED
 */

.match-deck-action.is-disabled,
.match-deck-action:disabled {
  opacity: .35;

  cursor: not-allowed;

  transform: none;

  box-shadow:
    0 5px 14px rgba(40, 20, 35, .10);
}


/*
 * ---------------------------------------------------------
 * EMPTY STATE
 * ---------------------------------------------------------
 */

.match-deck-empty {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 30px;

  text-align: center;

  border-radius: 24px;

  background:
    var(--card, #fff);

  box-shadow:
    0 14px 38px rgba(40, 20, 35, .12);
}


.match-deck-empty-icon {
  margin-bottom: 12px;

  font-size: 58px;

  color:
    var(--plum, #6e3b62);

  opacity: .7;
}


.match-deck-empty h2 {
  margin: 0;

  font-size: 21px;
}


.match-deck-empty p {
  max-width: 290px;

  margin: 10px 0 0;

  font-size: 14px;

  line-height: 1.45;

  opacity: .72;
}


/*
 * ---------------------------------------------------------
 * MESSAGE
 * ---------------------------------------------------------
 */

.match-deck-message {
  position: fixed;

  left: 50%;

  bottom: 92px;

  z-index: 1000;

  max-width: calc(100vw - 40px);

  padding: 10px 16px;

  border-radius: 14px;

  background:
    rgba(30, 20, 30, .88);

  color: #fff;

  font-size: 14px;

  line-height: 1.3;

  text-align: center;

  opacity: 0;

  pointer-events: none;

  transform:
    translate(-50%, 10px);

  transition:
    opacity .2s ease,
    transform .2s ease;
}


.match-deck-message.is-visible {
  opacity: 1;

  transform:
    translate(-50%, 0);
}


/*
 * ---------------------------------------------------------
 * MOBILE
 * ---------------------------------------------------------
 */

@media (max-width: 600px) {

  .matches-toolbar {
    margin-bottom: 4px;
  }


  .match-deck-page {
    padding-top: 0;
    padding-bottom: 12px;
  }


  .match-deck {
    width: calc(100vw - 28px);

    height: min(
      66vh,
      610px
    );

    min-height: 390px;
  }


  .match-deck-card {
    border-radius: 21px;
  }


  .match-deck-card.next {
    transform:
      translate3d(22px, 0, 0)
      scale(.94);
  }


  .match-deck-card.next-2 {
    transform:
      translate3d(-22px, 0, 0)
      scale(.88);
  }


  .match-deck-overlay {
    padding:
      24px 18px 18px;
  }


  .match-deck-name {
    font-size: 24px;
  }


  .match-deck-city {
    font-size: 14px;
  }


  .match-deck-about {
    font-size: 13px;

    max-height: 62px;
  }


  .match-deck-actions {
    gap: 10px;

    margin-top: 14px;
  }


  .match-deck-action {
    width: 52px;
    height: 52px;

    font-size: 22px;
  }


  .match-deck-undo {
    width: 44px;
    height: 44px;

    font-size: 19px;
  }


  .match-deck-pass,
  .match-deck-like {
    width: 58px;
    height: 58px;
  }


  .match-deck-message {
    bottom: 82px;
  }

}


/*
 * ---------------------------------------------------------
 * VERY SMALL SCREENS
 * ---------------------------------------------------------
 */

@media (max-height: 700px) {

  .match-deck {
    height: 56vh;
    min-height: 350px;
  }


  .match-deck-actions {
    margin-top: 10px;
  }

}


/*
 * ---------------------------------------------------------
 * PREVENT IMAGE DRAGGING
 * ---------------------------------------------------------
 */

.match-deck img {
  -webkit-user-drag: none;
}


/*
 * ---------------------------------------------------------
 * REDUCE MOTION
 * ---------------------------------------------------------
 */

@media (prefers-reduced-motion: reduce) {

  .match-deck-card,
  .match-deck-action,
  .match-deck-message {
    transition: none;
  }

}

/* ---------------------------------------------------------
   LIKES
   --------------------------------------------------------- */

.likes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.likes-card-wrap {
  position: relative;
  min-width: 0;
  cursor: pointer;
  touch-action: pan-y;
}

.likes-card-wrap .profile-card {
  height: 100%;
}

/*
 * Small action buttons over the bottom
 * of the photo.
 */

.likes-card-actions {
  position: absolute;
  left: 50%;
  bottom: 46px;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transform: translateX(-50%);
}

.likes-card-action {
  width: 28px;
  height: 28px;

  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  font-size: 14px;
  line-height: 1;

  cursor: pointer;

  transition:
    transform .15s ease,
    opacity .15s ease;
}

/* ❌ — без фона */

.likes-card-action-pass {
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-shadow:
    0 1px 4px rgba(0,0,0,.55);
}

/* ❤️ — маленький кружок, но сердце крупнее */

.likes-card-action-like {
  width: 30px;
  height: 30px;

  background: rgba(255,255,255,.94);
  color: var(--plum);

  font-size: 18px;

  box-shadow:
    0 3px 8px rgba(32,32,32,.16);
}

.likes-card-action:hover:not(:disabled) {
  transform: scale(1.08);
}

.likes-card-action:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.likes-card-action-like {
  background: var(--plum);
  color: #fff;
}

.likes-card-action-pass {
  color: var(--text);
}

/*
 * Super Like indicator.
 * Upper-left corner of the photo.
 */

.likes-super-badge {
  position: absolute;
  top: 10px;
  left: 10px;

  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(255,255,255,.94);

  box-shadow:
    0 4px 12px rgba(32,32,32,.18);

  font-size: 16px;

  z-index: 6;
}

/*
 * Locked ordinary Like:
 * photo is blurred,
 * name/age hidden,
 * buttons disabled.
 */

.likes-card-wrap.is-locked {
  cursor: not-allowed;
}

.likes-card-wrap.is-locked
.profile-card-photo img {
  filter: blur(18px);
  transform: scale(1.08);
}

.likes-card-wrap.is-locked
.profile-card-name {
  visibility: hidden;
}

.likes-card-wrap.is-locked
.likes-card-action {
  opacity: .30;
  cursor: not-allowed;
}

.likes-card-wrap.is-locked
.profile-card:hover {
  transform: none;
  box-shadow: var(--shadow);
}

/*
 * Prevent image dragging while swiping.
 */

.likes-card-wrap img {
  -webkit-user-drag: none;
  user-select: none;
}

/* =========================================================
   BOOST PAGE
   ========================================================= */

.boost-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.boost-card {
  position: relative;

  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  display: flex;
  align-items: flex-start;

  gap: 14px;
  padding: 18px;

  border: 1px solid var(--line);
  border-radius: 20px;

  background: var(--card);

  overflow: hidden;
}

.boost-card::after {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 3px;
  height: 100%;

  background: var(--plum);

  opacity: .65;
}

.boost-card-premium::after {
  opacity: 1;
}

.boost-icon {
  flex: 0 0 44px;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: var(--bg);
  border: 1px solid var(--line);

  font-size: 21px;
  line-height: 1;
}

.boost-card-info {
  min-width: 0;
  flex: 1 1 auto;
}

.boost-card-title {
  margin: 1px 0 0;

  color: var(--text);

  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.boost-card-description {
  max-width: 620px;

  margin-top: 7px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.boost-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  margin-top: 14px;
}

.boost-card-price {
  flex: 0 0 auto;

  color: var(--text);

  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.boost-card .boost-payment {
  flex: 0 0 auto;

  width: auto;
  min-width: 112px;
  min-height: 38px;

  margin: 0;
  padding: 9px 16px;

  border-radius: 12px;

  font-size: 13px;
  font-weight: 800;

  white-space: nowrap;
}

.boost-card .boost-payment:disabled {
  opacity: .65;
  cursor: default;
}

.boost-card-premium {
  border-color: color-mix(
    in srgb,
    var(--premium) 35%,
    var(--line)
  );
}

.boost-card-premium .boost-icon {
  border-color: color-mix(
    in srgb,
    var(--premium) 35%,
    var(--line)
  );
}

@media (max-width: 560px) {

  .boost-list {
    gap: 12px;
    margin-top: 16px;
  }

  .boost-card {
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
  }

  .boost-icon {
    flex-basis: 40px;

    width: 40px;
    height: 40px;

    border-radius: 12px;

    font-size: 19px;
  }

  .boost-card-title {
    font-size: 15px;
  }

  .boost-card-description {
    margin-top: 6px;

    font-size: 12px;
    line-height: 1.4;
  }

  .boost-card-bottom {
    gap: 10px;
    margin-top: 13px;
  }

  .boost-card-price {
    font-size: 13px;
  }

  .boost-card .boost-payment {
    min-width: 104px;
    min-height: 36px;

    padding: 8px 13px;

    border-radius: 11px;

    font-size: 12px;
  }
}

/* =========================================================
   TWINLY — PREMIUM PAGE
   ========================================================= */

.premium-hero {
  width: 100%;
  box-sizing: border-box;

  display: flex;
  align-items: center;

  gap: 16px;
  padding: 20px;

  border: 1px solid var(--line);
  border-radius: 22px;

  background:
    linear-gradient(
      135deg,
      rgba(118, 80, 109, .10),
      rgba(198, 165, 106, .10)
    );
}

.premium-hero-icon {
  flex: 0 0 50px;

  width: 50px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;

  background: var(--bg);
  border: 1px solid var(--line);

  color: var(--premium);

  font-size: 24px;
  line-height: 1;
}

.premium-hero-content {
  min-width: 0;
}

.premium-hero-title {
  color: var(--text);

  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.premium-hero-subtitle {
  margin-top: 6px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}


/* =========================================================
   ACTIVE PREMIUM
   ========================================================= */

.premium-active {
  width: 100%;
  box-sizing: border-box;

  margin-top: 14px;
  padding: 15px 17px;

  border: 1px solid var(--line);
  border-radius: 16px;

  background: var(--card);
}

.premium-active-title {
  color: var(--premium);

  font-size: 14px;
  font-weight: 800;
}

.premium-active-date {
  margin-top: 5px;

  color: var(--muted);

  font-size: 12px;
}


/* =========================================================
   PREMIUM PLANS
   ========================================================= */

.premium-plans {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 14px;

  margin-top: 18px;
}

.premium-plan {
  position: relative;

  width: 100%;
  min-width: 0;

  box-sizing: border-box;

  display: flex;
  align-items: flex-start;

  gap: 14px;

  padding: 18px;

  border: 1px solid var(--line);
  border-radius: 20px;

  background: var(--card);

  overflow: hidden;
}

.premium-plan::after {
  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 3px;
  height: 100%;

  background: var(--premium);

  opacity: .8;
}

.premium-plan-icon {
  flex: 0 0 44px;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: var(--bg);

  border: 1px solid var(--line);

  color: var(--premium);

  font-size: 20px;
  line-height: 1;
}

.premium-plan-content {
  min-width: 0;

  flex: 1 1 auto;
}

.premium-plan-title {
  color: var(--text);

  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.premium-plan-duration {
  margin-top: 5px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 600;
}

.premium-plan-features {
  display: flex;
  flex-direction: column;

  gap: 6px;

  margin-top: 14px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.35;
}

.premium-plan-features div::first-letter {
  color: var(--premium);
}

.premium-plan-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  margin-top: 17px;
}

.premium-plan-price {
  flex: 0 0 auto;

  color: var(--text);

  font-size: 15px;
  font-weight: 800;
}

.premium-plan .premium-payment {
  flex: 0 0 auto;

  width: auto;
  min-width: 130px;
  min-height: 38px;

  margin: 0;
  padding: 9px 16px;

  border-radius: 12px;

  font-size: 13px;
  font-weight: 800;

  white-space: nowrap;
}

.premium-plan .premium-payment:disabled {
  opacity: .65;
  cursor: default;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .premium-hero {
    gap: 12px;

    padding: 16px;

    border-radius: 18px;
  }

  .premium-hero-icon {
    flex-basis: 42px;

    width: 42px;
    height: 42px;

    border-radius: 13px;

    font-size: 20px;
  }

  .premium-hero-title {
    font-size: 17px;
  }

  .premium-hero-subtitle {
    font-size: 12px;
  }

  .premium-active {
    padding: 13px 15px;

    border-radius: 14px;
  }

  .premium-plans {
    gap: 12px;

    margin-top: 16px;
  }

  .premium-plan {
    gap: 12px;

    padding: 16px;

    border-radius: 18px;
  }

  .premium-plan-icon {
    flex-basis: 40px;

    width: 40px;
    height: 40px;

    border-radius: 12px;

    font-size: 18px;
  }

  .premium-plan-title {
    font-size: 15px;
  }

  .premium-plan-features {
    margin-top: 12px;

    font-size: 12px;
  }

  .premium-plan-bottom {
    gap: 10px;

    margin-top: 14px;
  }

  .premium-plan-price {
    font-size: 13px;
  }

  .premium-plan .premium-payment {
    min-width: 116px;
    min-height: 36px;

    padding: 8px 13px;

    border-radius: 11px;

    font-size: 12px;
  }
}

.blocked-page-title {
  font-size: 20px;
}

/* =========================================================
   CHAT
   ========================================================= */

.chat-section {
  width: calc(100% - 24px);
  margin: 0 12px 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-sizing: border-box;
}

.chat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin: 0 8px 14px;
  padding-bottom: 12px;

  border-bottom: 1px solid var(--line);
}

.chat-section-title {
  font-size: 16px;
  font-weight: 800;
}

.chat-section-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.chat-new-matches-list {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.chat-new-matches-list::-webkit-scrollbar {
  display: none;
}

.chat-new-match {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.chat-new-match-avatar {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 2px solid var(--plum);
  border-radius: 50%;
  background: var(--soft);
}

.chat-new-match-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-new-match-name {
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-section-empty {
  padding: 14px 4px 4px;
  font-size: 14px;
  text-align: center;
  opacity: .55;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-list-item:last-child {
  border-bottom: 0;
}

.chat-list-item:hover {
  transform: translateY(-1px);
}

.chat-avatar,
.chat-window-avatar {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--soft);
  display: block;
  cursor: pointer;
}

.chat-avatar img,
.chat-window-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
  font-weight: 800;
}

.chat-list-content {
  min-width: 0;
  flex: 1;
}

.chat-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-list-name {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-time {
  flex: 0 0 auto;
  font-size: 12px;
  opacity: .6;
}

.chat-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 20px;
  height: 20px;
  padding: 0 6px;

  border-radius: 999px;

  background: var(--like);
  color: #fff;

  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.chat-list-message {
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  opacity: .7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-window {
  display: flex;
  flex-direction: column;

  width: 100%;
  max-width: 560px;
  height: 100%;
  min-height: 0;

  margin: 0 auto;

  overflow: hidden;
}

.chat-window-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-window-menu-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.chat-window-menu-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-window-menu-button:hover {
  background: var(--bg);
}

.chat-window-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7f3;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.chat-window-menu[hidden] {
  display: none;
}

.chat-window-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-window-menu-item:hover {
  background: #ecece7;
}

.chat-back-button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.chat-back-button:hover {
  background: var(--surface-2, #f3f3f3);
}

.chat-back-button:active {
  transform: scale(.96);
}

.chat-window-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-window-avatar {
  width: 42px;
  height: 42px;
}

.chat-window-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-window-name-text {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-typing {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--muted);
}

.chat-typing em {
  font-style: italic;
  font-weight: 400;
}

.chat-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  min-height: 0;

  gap: 8px;

  padding: 18px 0;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior: contain;
}

.chat-message-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding: 0;
}

.chat-message-row.is-own {
  justify-content: flex-end;
}

.chat-message {
  display: inline-block;
  flex: 0 1 auto;
  width: auto;
  max-width: 62%;
  min-width: 0;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.chat-message-row.is-own .chat-message {
  border-color: var(--plum);
  background: var(--soft);
}

.chat-messages-empty {
  margin: auto;
  padding: 30px 20px;
  text-align: center;
  opacity: .6;
}

.chat-compose {
  display: flex;
  flex: 0 0 auto;

  align-items: center;

  gap: 8px;

  margin: 0;

  padding: 10px 0 4px;

  border-top: 1px solid var(--line);

  box-sizing: border-box;
}

.chat-input {
  flex: 1 1 auto;

  min-width: 0;
  min-height: 44px;
  max-height: 144px;

  height: auto;

  padding: 10px 14px;

  border: 1px solid var(--line);
  border-radius: 18px;

  background: var(--card);
  color: inherit;

  outline: none;

  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;

  resize: none;

  overflow-x: hidden;
  overflow-y: auto;

  box-sizing: border-box;

  field-sizing: content;
}

.chat-input:focus {
  border-color: var(--plum);
}

.chat-send-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--plum);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 600px) {

  .chat-section {
    width: calc(100% - 16px);
    margin: 0 8px 14px;
    padding: 14px;
    border-radius: 18px;
    box-sizing: border-box;
  }

  .chat-new-matches-list {
    gap: 12px;
  }

  .chat-new-match {
    width: 66px;
  }

  .chat-new-match-avatar {
    width: 58px;
    height: 58px;
  }

  .chat-list-item {
    padding: 10px 2px;
  }

  .chat-avatar {
    width: 50px;
    height: 50px;
  }

  .chat-window {
    height: 100%;
    min-height: 0;
  }

  .chat-message {
    max-width: 84%;
  }

}

/* =========================================================
   PROFILE CHAT ACTION
   ========================================================= */

.profile-chat-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 12px 0 18px;
}

.profile-message-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--plum);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}

.profile-message-button:disabled {
  opacity: 0.6;
  cursor: default;
}


/* =========================================================
   MATCH MODAL
   ========================================================= */

.match-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}


.match-modal.is-visible {
  opacity: 1;
  visibility: visible;
}


.match-modal-backdrop {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 190, 215, 0.55),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(225, 195, 255, 0.45),
      transparent 35%
    ),
    radial-gradient(
      circle at 50% 85%,
      rgba(255, 220, 235, 0.55),
      transparent 40%
    ),
    rgba(255, 245, 249, 0.88);

  backdrop-filter:
    blur(12px);
}


.match-modal-content {
  position: relative;
  z-index: 1;

  width: min(
    92vw,
    520px
  );

  min-height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding:
    40px 20px;

  overflow: hidden;
}


.match-modal-title {
  margin-bottom: 40px;

  color: #fff;

  font-size: 30px;
  font-weight: 900;

  text-align: center;

  opacity: 0;

  transform:
    translateY(-20px)
    scale(0.8);

  transition:
    opacity 0.4s ease 0.55s,
    transform 0.5s
      cubic-bezier(
        0.175,
        0.885,
        0.32,
        1.275
      ) 0.55s;
}


.match-modal.is-visible
.match-modal-title {
  opacity: 1;

  transform:
    translateY(0)
    scale(1);
}


.match-modal-profiles {
  position: relative;

  width: 100%;
  height: 300px;

  display: flex;
  align-items: center;
  justify-content: center;
}


.match-modal-profile {
  position: absolute;

  width: 190px;
  height: 250px;

  overflow: hidden;

  border-radius: 24px;

  background:
    var(--card);

  box-shadow:
    0 20px 50px
    rgba(0, 0, 0, 0.45);

  opacity: 0;

  transition:
    transform 0.8s
      cubic-bezier(
        0.175,
        0.885,
        0.32,
        1.275
      ),
    opacity 0.4s ease;
}


.match-modal-profile-left {
  transform:
    translateX(-180px)
    rotate(-10deg);
}


.match-modal-profile-right {
  transform:
    translateX(180px)
    rotate(10deg);
}


.match-modal.is-visible
.match-modal-profile-left {
  opacity: 1;

  transform:
    translateX(-72px)
    rotate(-7deg);

  transition-delay: 0.15s;
}


.match-modal.is-visible
.match-modal-profile-right {
  opacity: 1;

  transform:
    translateX(72px)
    rotate(7deg);

  transition-delay: 0.3s;
}


.match-modal-photo {
  width: 100%;
  height: 100%;
}


.match-modal-photo img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}


.match-modal-hearts {
  position: absolute;

  z-index: 5;

  width: 100%;
  height: 100%;

  pointer-events: none;
}


.match-modal-heart {
  position: absolute;

  left: 50%;
  top: 50%;

  display: block;

  font-size: 38px;
  line-height: 1;

  opacity: 0;

  filter:
    drop-shadow(
      0 6px 14px
      rgba(0, 0, 0, 0.35)
    );
}


.match-modal-heart-left {
  transform:
    translate(
      -50%,
      -50%
    )
    scale(0.3);
}


.match-modal-heart-right {
  transform:
    translate(
      -50%,
      -50%
    )
    scale(0.3);
}


.match-modal.is-visible
.match-modal-heart-left {
  animation:
    matchHeartLeft
    1.4s
    cubic-bezier(
      0.175,
      0.885,
      0.32,
      1.275
    )
    0.65s
    forwards;
}


.match-modal.is-visible
.match-modal-heart-right {
  animation:
    matchHeartRight
    1.4s
    cubic-bezier(
      0.175,
      0.885,
      0.32,
      1.275
    )
    0.8s
    forwards;
}


@keyframes matchHeartLeft {

  0% {
    opacity: 0;

    transform:
      translate(
        -50%,
        -50%
      )
      translateX(-90px)
      scale(0.3)
      rotate(-20deg);
  }

  35% {
    opacity: 1;
  }

  70% {
    transform:
      translate(
        -50%,
        -50%
      )
      translateX(-18px)
      scale(1.15)
      rotate(8deg);
  }

  100% {
    opacity: 1;

    transform:
      translate(
        -50%,
        -50%
      )
      translateX(0)
      scale(1)
      rotate(0);
  }
}


@keyframes matchHeartRight {

  0% {
    opacity: 0;

    transform:
      translate(
        -50%,
        -50%
      )
      translateX(90px)
      scale(0.3)
      rotate(20deg);
  }

  35% {
    opacity: 1;
  }

  70% {
    transform:
      translate(
        -50%,
        -50%
      )
      translateX(18px)
      scale(1.15)
      rotate(-8deg);
  }

  100% {
    opacity: 1;

    transform:
      translate(
        -50%,
        -50%
      )
      translateX(0)
      scale(1)
      rotate(0);
  }
}


.match-modal-actions {
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 12px;

  margin-top: 50px;

  opacity: 0;

  transform:
    translateY(25px);

  transition:
    opacity 0.4s ease 1.25s,
    transform 0.5s ease 1.25s;
}


.match-modal.is-visible
.match-modal-actions {
  opacity: 1;

  transform:
    translateY(0);
}


.match-modal-button {
  width: 100%;
  min-height: 52px;

  border: 0;
  border-radius: 16px;

  font: inherit;
  font-size: 16px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}


.match-modal-button:active {
  transform:
    scale(0.97);
}


.match-modal-message {
  color: #fff;

  background:
    var(--plum);
}


.match-modal-continue {
  color: var(--plum);

  background:
    #fff;
}


@media (
  max-width: 480px
) {

  .match-modal-content {
    width: 100%;

    padding:
      30px 16px;
  }


  .match-modal-title {
    margin-bottom: 30px;

    font-size: 28px;
  }


  .match-modal-profiles {
    height: 270px;
  }


  .match-modal-profile {
    width: 165px;
    height: 225px;

    border-radius: 22px;
  }


  .match-modal.is-visible
  .match-modal-profile-left {
    transform:
      translateX(-58px)
      rotate(-7deg);
  }


  .match-modal.is-visible
  .match-modal-profile-right {
    transform:
      translateX(58px)
      rotate(7deg);
  }


  .match-modal-actions {
    margin-top: 40px;
  }

}


/* =========================================================
   FEED PROMO TOP
   ========================================================= */

.feed-promo-top {
  width: 100%;
  min-height: 52px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 0 16px;

  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 16px;

  background: rgba(139, 92, 246, 0.08);

  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  box-sizing: border-box;

  transition:
    transform .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

.feed-promo-top:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.feed-promo-top:active {
  transform: scale(.99);
}

.feed-promo-icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.feed-promo-title {
  flex: 1 1 auto;
  text-align: left;
}

.feed-promo-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  opacity: .65;
}

/* =========================================================
   CHAT ONLINE PRESENCE
   ========================================================= */

.chat-window-name-text {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-online-indicator {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow:
    0 0 0 2px var(--card, #fff);
}

.chat-online-indicator[hidden] {
  display: none;
}

.chat-avatar,
.chat-new-match-avatar {
  position: relative;
}

.chat-list-online-indicator {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow:
    0 0 0 2px var(--card, #fff);
  z-index: 2;
}

.chat-list-online-indicator[hidden] {
  display: none;
}

/* =========================================================
   USER PROFILE ONLINE PRESENCE
   ========================================================= */

.user-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.user-profile-online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.user-profile-online-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
}

.user-profile-online[hidden] {
  display: none;
}

/* =========================================================
   NEARBY ONLINE PRESENCE
   ========================================================= */

.profile-card-photo {
  position: relative;
}

.profile-card-online {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow:
    0 0 0 3px var(--card, #fff);
  z-index: 3;
}

.profile-card-online[hidden] {
  display: none;
}