.ce-pet-switcher,
.ce-pet-switcher * {
  box-sizing: border-box;
}

.ce-pet-switcher {
  position: fixed;
  z-index: 2147483000;
  top: 50%;
  left: max(18px, calc(env(safe-area-inset-left) + 14px));
  width: min(176px, calc(100vw - 36px));
  padding: 15px;
  border: 1px solid rgba(222, 233, 240, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(208, 220, 228, 0.13), transparent 42%),
    rgba(21, 23, 26, 0.66);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 16px 42px rgba(7, 8, 10, 0.29);
  color: rgba(244, 248, 251, 0.94);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  transform: translateY(-50%);
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
  backdrop-filter: blur(20px) saturate(122%);
  -webkit-backdrop-filter: blur(20px) saturate(122%);
}

.ce-pet-switcher__identity {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ce-pet-switcher__mark {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(220, 232, 241, 0.52);
  border-radius: 50%;
}

.ce-pet-switcher__mark::before,
.ce-pet-switcher__mark::after {
  position: absolute;
  width: 12px;
  height: 12px;
  content: "";
  border: 1px solid rgba(220, 232, 241, 0.38);
  border-radius: 50%;
}

.ce-pet-switcher__mark::before {
  transform: rotate(42deg) scaleX(0.58);
}

.ce-pet-switcher__mark::after {
  transform: rotate(-42deg) scaleY(0.58);
}

.ce-pet-switcher__mark i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e4edf2;
  box-shadow: 0 0 9px rgba(220, 232, 241, 0.68);
}

.ce-pet-switcher__identity > span:last-child,
.ce-pet-switcher__links a > span:last-child {
  display: grid;
  gap: 2px;
}

.ce-pet-switcher__identity small,
.ce-pet-switcher__label,
.ce-pet-switcher__links a small,
.ce-pet-switcher__status {
  color: rgba(218, 229, 236, 0.52);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.ce-pet-switcher__identity strong {
  color: rgba(247, 250, 252, 0.95);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.11em;
}

.ce-pet-switcher__label {
  margin: 14px 0 7px;
}

.ce-pet-switcher__links {
  display: grid;
  gap: 6px;
}

.ce-pet-switcher__links a {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 229, 237, 0.1);
  border-radius: 11px;
  background: rgba(234, 241, 245, 0.035);
  color: rgba(223, 233, 239, 0.68);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: border-color 170ms ease, background-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.ce-pet-switcher__links a:hover,
.ce-pet-switcher__links a:focus-visible {
  border-color: rgba(206, 223, 233, 0.39);
  background: rgba(217, 230, 238, 0.11);
  color: #f7fafb;
  outline: none;
  transform: translateX(2px);
}

.ce-pet-switcher__links a[aria-current="page"] {
  border-color: rgba(204, 223, 234, 0.43);
  background:
    linear-gradient(100deg, rgba(209, 226, 236, 0.16), rgba(200, 214, 224, 0.065)),
    rgba(221, 231, 237, 0.06);
  color: #f8fbfc;
}

.ce-pet-switcher__links a strong {
  display: block;
  color: currentColor;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.11em;
}

.ce-pet-switcher__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid rgba(223, 234, 241, 0.48);
  border-radius: 50%;
  background: rgba(224, 233, 239, 0.08);
}

.ce-pet-switcher__links a[aria-current="page"] .ce-pet-switcher__dot {
  border-color: #dce9ef;
  background: #dce9ef;
  box-shadow: 0 0 10px rgba(220, 233, 239, 0.72);
}

.ce-pet-switcher__status {
  display: block;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(219, 229, 235, 0.1);
  letter-spacing: 0.07em;
}

@media (max-width: 700px), (max-height: 580px) {
  .ce-pet-switcher {
    top: auto;
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    left: max(12px, calc(env(safe-area-inset-left) + 8px));
    width: min(330px, calc(100vw - 24px));
    padding: 8px;
    border-radius: 15px;
    background: rgba(21, 23, 26, 0.9);
    box-shadow: 0 10px 28px rgba(7, 8, 10, 0.22);
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .ce-pet-switcher__identity,
  .ce-pet-switcher__label,
  .ce-pet-switcher__status {
    display: none;
  }

  .ce-pet-switcher__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body.mobile-drawer-open .ce-pet-switcher,
  body.mobile-companion-open .ce-pet-switcher,
  body.ce-panel-open .ce-pet-switcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .ce-pet-switcher__links a {
    min-height: 38px;
    justify-content: center;
    padding: 7px 9px;
    text-align: center;
  }

  .ce-pet-switcher__links a:hover,
  .ce-pet-switcher__links a:focus-visible {
    transform: translateY(-1px);
  }

  .ce-pet-switcher__links a small {
    display: none;
  }

  .ce-pet-switcher__links a strong {
    font-size: 12px;
  }

  .ce-pet-switcher--4t {
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 70px));
  }
}

@media (max-width: 360px) {
  .ce-pet-switcher {
    width: calc(100vw - 20px);
    left: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 700px) and (min-height: 600px) {
  .ce-pet-switcher {
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 70px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ce-pet-switcher,
  .ce-pet-switcher * {
    transition-duration: 0.01ms !important;
  }
}
