/* Isolated popular ranking styles: don't modify existing Redesign card rules. */
.dosug-popular {padding-top:14px;padding-bottom:16px}
.dosug-popular-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.dosug-popular-heading h3{margin:0;font-size:21px;line-height:1.25}
.dosug-popular-all{font-size:13px;white-space:nowrap;color:#e7b2a2;text-decoration:none}
.dosug-popular-all:hover{text-decoration:underline}
.dosug-popular-track{display:flex;gap:11px;max-width:100%;overflow-x:auto;padding:2px 0 6px;scrollbar-width:none;scroll-snap-type:x proximity;overscroll-behavior-x:contain}
.dosug-popular-track::-webkit-scrollbar{display:none}
.dosug-popular-card{flex:0 0 132px;display:block;min-width:0;text-decoration:none;color:#e7b2a2;scroll-snap-align:start}
.dosug-popular-photo{position:relative;display:block;width:100%;aspect-ratio:3/4;overflow:hidden;border-radius:6px;background:#421219;border:1px solid #70212c}
.dosug-popular-photo img{display:block;width:100%;height:100%;object-fit:cover}
.dosug-popular-rank{position:absolute;top:6px;left:6px;padding:3px 6px;border-radius:4px;background:rgba(53,16,22,.86);color:#fff;font:600 12px/1.2 Arial,sans-serif}
.dosug-popular-name{display:block;margin-top:6px;font-size:12px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
@media(hover:hover) and (pointer:fine){.dosug-popular-card:hover .dosug-popular-photo{border-color:#b44e69;filter:brightness(1.06)}}
html[data-theme=light] .dosug-popular-card{color:#4c141d}
html[data-theme=light] .dosug-popular-all{color:#5a1924}
html[data-theme=light] .dosug-popular-photo{background:#f2ded8;border-color:#d8c5c3}
@media(max-width:600px){.dosug-popular{padding-top:12px;padding-bottom:12px}.dosug-popular-heading h3{font-size:16px}.dosug-popular-all{font-size:12px}.dosug-popular-track{gap:8px}.dosug-popular-card{flex-basis:116px}.dosug-popular-name{font-size:11px}}
/* Full TOP-20 page: self-contained layout under the active Redesign header. */
.dosug-popular-page .dosug-popular-heading{max-width:1050px;margin:0 auto 18px}
.dosug-popular-page .dosug-popular-heading h1{margin:0;font-size:26px;font-weight:700;line-height:1.25;color:#e7b2a2}
html[data-theme=light] .dosug-popular-page .dosug-popular-heading h1{color:#4c141d}
.dosug-popular-page .dosug-popular-track{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;max-width:1050px;margin:0 auto;overflow:visible}
.dosug-popular-page .dosug-popular-card{width:100%;max-width:none}
.dosug-popular-page .dosug-popular-name{font-size:14px}
@media(max-width:850px){.dosug-popular-page .dosug-popular-track{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}}
@media(max-width:600px){.dosug-popular-page .dosug-popular-heading{margin-bottom:12px}.dosug-popular-page .dosug-popular-heading h1{font-size:20px}.dosug-popular-page .dosug-popular-track{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dosug-popular-page .dosug-popular-name{font-size:12px}}

/* Popular ranking: use the whole available Redesign content width on desktop.
   Six homepage photos stay compact; mobile / tablet swipe stays unchanged. */
@media (min-width: 1024px) {
  .dosug-popular:not(.dosug-popular-page) .dosug-popular-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
  }
  .dosug-popular:not(.dosug-popular-page) .dosug-popular-card {
    width: 100%;
    max-width: 170px;
    justify-self: center;
  }
  .dosug-popular:not(.dosug-popular-page) .dosug-popular-card:first-child {
    justify-self: start;
  }
  .dosug-popular:not(.dosug-popular-page) .dosug-popular-card:last-child {
    justify-self: end;
  }
}
/* TOP-20 must fill the same .wrap width as the breadcrumbs and page heading. */
.dosug-popular-page .dosug-popular-track {
  width: 100%;
  max-width: none;
}
/* Popular compact premium podium: gold / silver / bronze. Only TOP 1-3. */
.dosug-popular-photo .dosug-popular-rank--podium {
  --metal-hi:#fff2c2;
  --metal-mid:#edc168;
  --metal-low:#ba8029;
  --metal-ink:#432707;
  --metal-border:#ffdea0;
  --metal-glow:rgba(250,192,83,.32);
  position:absolute;
  z-index:3;
  top:6px;
  left:6px;
  display:inline-flex;
  align-items:center;
  width:auto;
  min-width:0;
  height:23px;
  box-sizing:border-box;
  padding:0 7px 0 5px;
  gap:4px;
  border:1px solid var(--metal-border);
  border-radius:5px;
  clip-path:none;
  overflow:hidden;
  background:linear-gradient(150deg,var(--metal-hi) 0%,var(--metal-mid) 55%,var(--metal-low) 100%);
  box-shadow:0 2px 3px rgba(0,0,0,.38),0 4px 8px rgba(0,0,0,.31),0 0 8px var(--metal-glow),inset 0 1px rgba(255,255,255,.7);
  color:var(--metal-ink);
  font:800 11px/1 Arial,sans-serif;
  white-space:nowrap;
  letter-spacing:0;
  text-shadow:0 1px rgba(255,255,255,.38);
  isolation:isolate;
  transition:transform .15s ease,box-shadow .15s ease;
}
.dosug-popular-photo .dosug-popular-rank--podium::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(115deg,rgba(255,255,255,.55) 0%,transparent 34%,rgba(255,255,255,.18) 55%,transparent 70%);
}
.dosug-popular-photo .dosug-popular-rank--podium::after {
  content:"";
  position:absolute;
  inset:1px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:4px;
  pointer-events:none;
}
.dosug-popular-rank--podium .dosug-popular-rank-emblem {
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:14px;
  height:14px;
  flex:0 0 14px;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.35);
  border-radius:3px;
  background:linear-gradient(150deg,rgba(255,255,255,.35),rgba(55,20,8,.06));
  font-size:0;
  line-height:0;
}
.dosug-popular-rank--podium .dosug-popular-rank-emblem::before {
  content:"";
  width:10px;
  height:10px;
  background:currentColor;
  clip-path:polygon(0% 22%,24% 49%,50% 7%,76% 49%,100% 22%,90% 92%,10% 92%);
}
.dosug-popular-rank--podium .dosug-popular-rank-caption {
  position:relative;
  z-index:1;
  display:inline-block;
  line-height:1;
}
.dosug-popular-photo .dosug-popular-rank--place-1,
.pd-meta .pd-popular-award--place-1 {
  --metal-hi:#fff2c2;
  --metal-mid:#edc168;
  --metal-low:#ba8029;
  --metal-ink:#432707;
  --metal-border:#ffdea0;
  --metal-glow:rgba(250,192,83,.32);
}
.dosug-popular-photo .dosug-popular-rank--place-2,
.pd-meta .pd-popular-award--place-2 {
  --metal-hi:#f0f7ff;
  --metal-mid:#c4d1df;
  --metal-low:#879aac;
  --metal-ink:#24364a;
  --metal-border:#e4f0ff;
  --metal-glow:rgba(191,217,243,.26);
}
.dosug-popular-photo .dosug-popular-rank--place-3,
.pd-meta .pd-popular-award--place-3 {
  --metal-hi:#ffe6d2;
  --metal-mid:#d69c75;
  --metal-low:#a36243;
  --metal-ink:#482518;
  --metal-border:#ffe1cc;
  --metal-glow:rgba(219,143,95,.26);
}
@media(hover:hover) and (pointer:fine) {
  .dosug-popular-card:hover .dosug-popular-rank--podium {
    transform:translateY(-1px);
    box-shadow:0 3px 5px rgba(0,0,0,.39),0 6px 11px rgba(0,0,0,.32),0 0 9px var(--metal-glow),inset 0 1px rgba(255,255,255,.78);
  }
}
@media(max-width:600px) {
  .dosug-popular-photo .dosug-popular-rank--podium {
    top:5px;
    left:5px;
    height:21px;
    gap:3px;
    padding:0 6px 0 4px;
    font-size:10px;
    border-radius:4px;
  }
  .dosug-popular-rank--podium .dosug-popular-rank-emblem {
    flex-basis:12px;
    width:12px;
    height:12px;
    border-radius:2px;
  }
  .dosug-popular-rank--podium .dosug-popular-rank-emblem::before {width:9px;height:9px}
}
@media(prefers-reduced-motion:reduce) {
  .dosug-popular-photo .dosug-popular-rank--podium {transition:none}
}

/* Badge beside the original PAID tier (Platinum Queen etc.) on detail pages. */
.pd-meta .pd-popular-award {
  --metal-hi:#fff2c2;
  --metal-mid:#edc168;
  --metal-low:#ba8029;
  --metal-ink:#432707;
  --metal-border:#ffdea0;
  --metal-glow:rgba(250,192,83,.25);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  box-sizing:border-box;
  min-height:23px;
  height:23px;
  padding:0 7px 0 5px;
  max-width:100%;
  border:1px solid var(--metal-border);
  border-radius:5px;
  background:linear-gradient(150deg,var(--metal-hi),var(--metal-mid) 58%,var(--metal-low));
  color:var(--metal-ink)!important;
  font:800 11px/1 Arial,sans-serif;
  white-space:nowrap;
  vertical-align:middle;
  text-decoration:none!important;
  text-shadow:0 1px rgba(255,255,255,.35);
  box-shadow:0 2px 5px rgba(0,0,0,.28),0 0 6px var(--metal-glow),inset 0 1px rgba(255,255,255,.6);
}
.pd-meta .pd-popular-award:hover {filter:brightness(1.055)}
.pd-meta .pd-popular-award__emblem {
  display:inline-block;
  position:relative;
  flex:0 0 12px;
  width:12px;
  height:12px;
}
.pd-meta .pd-popular-award__emblem::before {
  content:"";
  position:absolute;
  inset:0;
  background:currentColor;
  clip-path:polygon(0% 22%,24% 49%,50% 7%,76% 49%,100% 22%,90% 92%,10% 92%);
}
@media(max-width:600px) {
  .pd-meta .pd-popular-award {
    min-height:21px;
    height:21px;
    padding:0 6px 0 4px;
    font-size:10px;
    gap:3px;
    border-radius:4px;
  }
  .pd-meta .pd-popular-award__emblem {width:11px;height:11px;flex-basis:11px}
}

/* Match the existing verified-photo badge on the homepage "Новые анкеты".
   Only affects cards inside Dosug Popular; it does not change moderation,
   verification status, awards, ranking, or the original new-profiles styles. */
.dosug-popular-photo .dosug-popular-verified {
  position: absolute;
  z-index: 3;
  left: 5px;
  right: 5px;
  bottom: 5px;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 24px;
  margin: 0;
  padding: 4px 3px;
  border: 0;
  border-radius: 5px;
  background: rgba(33, 8, 15, .90);
  color: #e7b2a2;
  font-family: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}
.dosug-popular-photo .dosug-popular-verified img {
  display: block;
  flex: 0 0 13px;
  width: 13px;
  min-width: 13px;
  max-width: 13px;
  height: 13px;
  max-height: 13px;
  object-fit: contain;
  border: 0;
  filter: none;
  opacity: 1;
}
@media (max-width: 600px) {
  .dosug-popular-photo .dosug-popular-verified {
    left: 4px;
    right: 4px;
    bottom: 4px;
    min-height: 21px;
    padding: 3px 2px;
    gap: 2px;
    font-size: 8px;
  }
  .dosug-popular-photo .dosug-popular-verified img {
    flex-basis: 11px;
    min-width: 11px;
    width: 11px;
    max-width: 11px;
    height: 11px;
    max-height: 11px;
  }
}
