/* ATMCYBER — мини-профиль (как у Cybershoke) и рамки PRIME */
.ac-mp {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 8, .6);
  backdrop-filter: blur(3px);
  padding: 16px
}

.ac-mp[hidden] {
  display: none
}

.ac-mp__card {
  width: 100%;
  max-width: 380px;
  background: var(--ac-surface, #15171c);
  border: 1px solid var(--ac-line, #262a33);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--ac-shadow, 0 20px 60px rgba(0, 0, 0, .45));
  animation: ac-mp-in .2s var(--ac-ease, ease) both;
  color: var(--ac-text, #f1f1ee);
  font-family: var(--ac-font, "Golos Text", sans-serif)
}

@keyframes ac-mp-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98)
  }
}

.ac-mp__loading {
  padding: 40px;
  text-align: center;
  color: var(--ac-muted, #868b98);
  font-size: 22px
}

.ac-mp__body {
  position: relative;
  display: flex
}

.ac-mp__bg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat
}

.ac-mp__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 23, 28, .3), rgba(21, 23, 28, .85) 55%, var(--ac-surface, #15171c))
}

.ac-mp__bg.is-default {
  filter: grayscale(1);
  opacity: .5
}

.ac-mp__main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 16px
}

.ac-mp__who {
  display: flex;
  gap: 12px;
  align-items: flex-start
}

.ac-mp__who img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block
}

.ac-mp__ava-plain {
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ac-line-2, #323743)
}

.ac-mp__nick {
  display: block;
  font: 800 17px var(--ac-font-head, "Inter", sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px
}

.ac-mp__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px
}

.ac-mp__lvl {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 172, 28, .5);
  background: rgba(255, 172, 28, .1);
  color: #ffac1c;
  font-size: 11px;
  font-weight: 700
}

.ac-mp__on {
  font-size: 11px;
  color: var(--ac-green, #3ddc84)
}

.ac-mp__prime {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: color-mix(in srgb, var(--t) 14%, transparent);
  color: var(--t)
}

.ac-mp__prime span {
  margin-left: auto;
  color: var(--ac-text-2, #b9bcc6)
}

.ac-mp__buy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 172, 28, .1);
  color: #ffac1c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none
}

.ac-mp__buy:hover {
  background: rgba(255, 172, 28, .18)
}

.ac-mp__buy>i:last-child {
  margin-left: auto
}

.ac-mp__buy-ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px dashed var(--ac-muted, #868b98);
  color: var(--ac-muted, #868b98)
}

.ac-mp__level {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--ac-line, #262a33);
  border-radius: 12px;
  background: rgba(12, 13, 16, .6)
}

.ac-mp__level>span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--ac-surface-2, #1b1e24);
  font-weight: 700;
  font-size: 12px
}

.ac-mp__level>div {
  flex: 1
}

.ac-mp__level-h {
  display: flex;
  justify-content: space-between;
  font-size: 12px
}

.ac-mp__level-h small {
  color: var(--ac-muted, #868b98)
}

.ac-mp__bar {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--ac-surface-3, #22262e);
  overflow: hidden
}

.ac-mp__bar i {
  display: block;
  height: 100%;
  background: var(--ac-blue, #4da3ff);
  border-radius: inherit
}

.ac-mp__side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-left: 1px solid var(--ac-line, #262a33);
  background: var(--ac-surface, #15171c)
}

.ac-mp__side-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--ac-surface-2, #1b1e24);
  color: var(--ac-text-2, #b9bcc6);
  font-size: 18px;
  cursor: pointer;
  text-decoration: none
}

.ac-mp__side-btn:hover {
  background: var(--ac-surface-3, #22262e);
  color: var(--ac-text, #f1f1ee)
}

.ac-mp__side-btn.is-acc {
  background: #ffac1c;
  color: #121212
}

.ac-mp__side-btn.is-sent {
  opacity: .6
}

.ac-mp__side-btn.is-ok {
  color: var(--ac-green, #3ddc84)
}

.ac-mp__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ac-line, #262a33)
}

.ac-mp__foot a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  font-size: 11px;
  color: var(--ac-text-2, #b9bcc6);
  text-decoration: none
}

.ac-mp__foot a+a {
  border-left: 1px solid var(--ac-line, #262a33)
}

.ac-mp__foot a:hover {
  background: var(--ac-surface-2, #1b1e24);
  color: var(--ac-text, #f1f1ee)
}

.ac-mp__foot i {
  font-size: 18px
}

/* курсор: всё, что открывает мини-профиль */
[data-mp-uid],
.ac-mp-trigger {
  cursor: pointer
}

/* Рамки PRIME (дублируют atmprime.css, чтобы работали на любой странице шаблона) */
.apr-frame {
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  padding: 2px;
  flex: none;
  vertical-align: middle
}

.apr-frame>img {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ac-bg, #0c0d10)
}

.apr-frame--prime {
  background: #4da3ff
}

.apr-frame--plus {
  background: linear-gradient(135deg, #f764e6, #a86bff)
}

.apr-frame--elite {
  overflow: hidden
}

.apr-frame--elite::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(#ffac1c, #ff8a00, #fff4c9, #ffac1c);
  animation: apr-spin 3s linear infinite
}

@keyframes apr-spin {
  to {
    transform: rotate(360deg)
  }
}

.apr-nick-badge {
  display: inline-block;
  vertical-align: -3px;
  margin-left: 4px;
  object-fit: contain;
  cursor: help;
}

/* Mini-profile dropdown: anchor-positioned popup, no modal backdrop */
.ac-mp {
  position: fixed;
  inset: auto;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  z-index: 14000;
  pointer-events: none
}

.ac-mp[hidden] {
  display: none
}

.ac-mp__card {
  pointer-events: auto;
  width: min(380px, calc(100vw - 24px));
  max-width: 380px;
  animation: ac-mp-pop .16s ease-out both;
  transform-origin: top center
}

@keyframes ac-mp-pop {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(.985)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

/* PRIME badge placement: large subtle mark on cover corner + compact mark by nickname */
.ac-mp__who {
  position: relative;
  isolation: isolate
}

.ac-mp__prime-watermark {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 68px;
  height: 68px;
  object-fit: contain;
  opacity: .28;
  filter: drop-shadow(0 2px 8px rgba(255, 172, 28, .25));
  pointer-events: none;
  z-index: 0
}

.ac-mp__identity {
  position: relative;
  z-index: 1;
  min-width: 0
}

.ac-mp__nick {
  display: flex;
  align-items: center;
  gap: 5px
}

.ac-mp__nick-mark {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: none;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(255, 172, 28, .4))
}

.ac-mp__badges {
  position: relative;
  z-index: 1
}

.ac-mp__foot a:first-child i {
  display: none
}

/* ===== v2: звание справа от ника, место в рейтинге, достижения вместо «0», статус дружбы; блок уровня удалён ===== */
.ac-mp__level {
  display: none !important
}

.ac-mp__lvl {
  display: none !important
}

.ac-mp__identity {
  flex: 1
}

.ac-mp__nickrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0
}

.ac-mp__nickrow .ac-mp__nick {
  flex: 1;
  min-width: 0;
  margin-top: 0
}

.ac-mp__nick>span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ac-mp__rank {
  flex: none;
  width: auto !important;
  height: 30px !important;
  max-width: 72px;
  border-radius: 0 !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5))
}

.ac-mp__badges {
  flex-wrap: wrap;
  min-height: 0
}

.ac-mp__fr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ac-text-2, #b9bcc6)
}

.ac-mp__fr.is-friend {
  color: var(--ac-green, #3ddc84)
}

.ac-mp__fr.is-in {
  color: var(--ac-accent, #ffac1c)
}

.ac-mp__achs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  min-height: 26px
}

.ac-mp__who .ac-mp__achs img.ac-mp__ach {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: transform .15s
}

.ac-mp__who .ac-mp__achs img.ac-mp__ach:hover {
  transform: translateY(-2px) scale(1.08)
}

.ac-mp__ach.t3 {
  box-shadow: inset 0 0 0 1px rgba(255, 200, 60, .5) !important
}

.ac-mp__ach-more {
  display: grid;
  place-items: center;
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ac-surface-2, #1b1e24);
  color: var(--ac-text-2, #b9bcc6);
  font-size: 11px;
  font-weight: 700
}

.ac-mp__ach-empty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ac-muted, #868b98)
}

.ac-mp__place {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ac-text, #f1f1ee);
  background: linear-gradient(100deg, rgba(255, 172, 28, .16), rgba(255, 138, 0, .04) 60%, transparent), rgba(12, 13, 16, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 172, 28, .28)
}

.ac-mp__place:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 172, 28, .6)
}

.ac-mp__place-n {
  font: 900 italic 26px/1 var(--ac-font-head, "Inter", sans-serif);
  color: var(--ac-accent, #ffac1c);
  letter-spacing: -.02em
}

.ac-mp__place-n small {
  font-size: 15px;
  margin-right: 1px;
  opacity: .75
}

.ac-mp__place-t {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.ac-mp__place-t b {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em
}

.ac-mp__place-t small {
  font-size: 11px;
  color: var(--ac-muted, #868b98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ac-mp__place>i {
  margin-left: auto;
  font-size: 20px;
  color: var(--ac-accent, #ffac1c);
  opacity: .8
}

.ac-mp__side-btn.is-friend {
  color: var(--ac-green, #3ddc84);
  background: rgba(61, 220, 132, .12);
  cursor: default
}

.ac-mp__side-btn.is-sent {
  opacity: 1;
  color: var(--ac-text-2, #b9bcc6)
}

.ac-mp__side-btn:disabled {
  cursor: default
}

/* Mini-profile rank image: override generic avatar sizing; rank title text intentionally hidden */
.ac-mp__who .ac-mp__rank {
  flex: none !important;
  width: auto !important;
  height: 30px !important;
  max-width: 72px !important;
  max-height: 30px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  display: block !important;
}

.ac-mp__foot a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

.ac-mp__foot a i {
  display: block !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Fix PRIME mark in mini-profile: compact by nickname, never decorate footer links */
.ac-mp__nick-mark {
  display: inline-block !important;
  flex: 0 0 13px !important;
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  margin: 0 0 0 3px !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  border-radius: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(255, 172, 28, .25)) !important;
}

.ac-mp__foot .apr-nick-badge,
.ac-mp__foot .ac-mp__nick-mark,
.ac-mp__foot img[title*="PRIME"],
.ac-mp__foot img[alt*="PRIME"] {
  display: none !important;
}

/* PRIME tier effects: all moving highlights are clipped to their own ring. */
.ac-mp__card--prime {
  position: relative;
  isolation: isolate;
  border-color: var(--mp-prime-color, rgba(77, 163, 255, .5)) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .48), 0 0 16px color-mix(in srgb, var(--mp-prime-color) 16%, transparent) !important;
  animation: ac-mp-prime-card-glow 3s ease-in-out infinite
}

.ac-mp__card--prime::before {
  content: none !important
}

.ac-mp__card--prime-tier-prime {
  --mp-prime-color: #54aaff
}

.ac-mp__card--prime-tier-plus {
  --mp-prime-color: #f46ad9
}

.ac-mp__card--prime-tier-elite {
  --mp-prime-color: #ffbf36
}

@keyframes ac-mp-prime-card-glow {

  0%,
  100% {
    box-shadow: 0 20px 60px rgba(0, 0, 0, .48), 0 0 8px color-mix(in srgb, var(--mp-prime-color) 12%, transparent)
  }

  50% {
    box-shadow: 0 20px 60px rgba(0, 0, 0, .48), 0 0 18px color-mix(in srgb, var(--mp-prime-color) 26%, transparent)
  }
}

.ac-mp__card--prime .ac-mp__who .apr-frame {
  overflow: hidden;
  isolation: isolate;
  background: var(--mp-prime-color) !important;
  padding: 3px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--mp-prime-color) 28%, transparent)
}

.ac-mp__card--prime .ac-mp__who .apr-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 60%, var(--mp-prime-color) 68%, white 74%, var(--mp-prime-color) 80%, transparent 88% 100%);
  animation: ac-mp-prime-avatar-ring 2.4s linear infinite;
  z-index: 0
}

.ac-mp__card--prime .ac-mp__who .apr-frame>img {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ac-bg, #0c0d10)
}

@keyframes ac-mp-prime-avatar-ring {
  to {
    transform: rotate(360deg)
  }
}

.ac-mp__card--prime .ac-mp__nick {
  background: linear-gradient(100deg, var(--mp-prime-color) 0%, white 35%, var(--mp-prime-color) 70%, white 100%);
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  animation: ac-mp-prime-shimmer 4s ease-in-out infinite
}

@keyframes ac-mp-prime-shimmer {

  0%,
  100% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }
}

@media(prefers-reduced-motion:reduce) {

  .ac-mp__card--prime,
  .ac-mp__card--prime .ac-mp__who .apr-frame::before,
  .ac-mp__card--prime .ac-mp__nick {
    animation: none !important
  }
}