.pypin {
  position: fixed;
  z-index: 99990;
  top: calc(env(safe-area-inset-top) + var(--pypin-desktop-top, 140px));
  right: max(22px, env(safe-area-inset-right));
  color: #211b24;
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease, visibility .35s ease;
}
.pypin.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.pypin [hidden] { display: none !important; }
.pypin__expanded {
  position: relative;
  box-sizing: border-box;
  width: min(340px, calc(100vw - 44px));
  padding: 23px 54px 22px 24px;
  border: 1px solid color-mix(in srgb, var(--pypin-accent) 30%, white);
  border-radius: 22px;
  background: rgba(255,253,254,.97);
  box-shadow: 0 18px 50px rgba(45,28,46,.2);
  backdrop-filter: blur(12px);
}
.pypin__collapse {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(123,47,134,.2);
  border-radius: 50%;
  background: #f5edf5;
  color: #4a354c;
  font: 400 25px/30px Arial,sans-serif;
  cursor: pointer;
}
.pypin__kicker { margin: 0 0 8px; color: var(--pypin-primary); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pypin__kicker span { color: var(--pypin-accent); }
.pypin__expanded h2 { margin: 0 0 7px; color: #211b24; font-size: 23px; line-height: 1.16; }
.pypin__subtitle { margin: 0 0 8px; color: #716873; font-size: 14px; line-height: 1.45; }
.pypin__description { display: -webkit-box; margin: 0 0 15px; overflow: hidden; color: #716873; font-size: 13px; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.pypin__watch,
.pypin__pill {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  background: linear-gradient(110deg,var(--pypin-primary),var(--pypin-accent));
  box-shadow: 0 10px 24px rgba(123,47,134,.25);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none !important;
  text-transform: uppercase;
}
.pypin__watch { padding: 12px 18px; }
.pypin__pill { height: 46px; min-height: 46px; padding: 7px 17px; }
.pypin__pill > span:last-child { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1; }
.pypin__pill small { display: block; color: rgba(255,255,255,.82); font-size: 8px; font-weight: 600; letter-spacing: .14em; line-height: 1; }
.pypin a:hover { color: #fff; transform: translateY(-1px); }
.pypin a:focus-visible,
.pypin button:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--pypin-primary); }

@media (max-width: 600px) {
  .pypin {
    position: absolute !important;
    z-index: 2147482900 !important;
    top: calc(env(safe-area-inset-top) + var(--pypin-mobile-top, 112px)) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
  }
  .pypin.is-floating-alert {
    position: fixed !important;
  }
  .pypin:not(.is-expanded) .pypin__pill {
    width: 38px;
    height: auto;
    min-height: 0;
    padding: 11px 7px;
    flex-direction: column;
    gap: 6px;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(180deg, #713079, #4d1c58);
    box-shadow: -5px 8px 24px rgba(25,11,29,.28);
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }
  .pypin:not(.is-expanded) .pypin__pill > span:first-child { display: none; }
  .pypin:not(.is-expanded) .pypin__pill > span:last-child {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
    white-space: nowrap;
  }
  .pypin:not(.is-expanded) .pypin__pill b {
    font: 700 9px/1.1 Montserrat, Arial, sans-serif;
    letter-spacing: .1em;
  }
  .pypin:not(.is-expanded) .pypin__pill small {
    color: rgba(255,255,255,.82);
    font: 600 8px/1.1 Georgia, serif;
    letter-spacing: .07em;
  }
  .pypin:not(.is-expanded).is-minimized .pypin__pill {
    width: 32px;
    height: 46px;
    padding: 0;
    border-radius: 10px 0 0 10px;
    writing-mode: horizontal-tb;
  }
  .pypin:not(.is-expanded).is-minimized .pypin__pill > span:first-child {
    display: block;
    font-size: 10px;
    line-height: 1;
  }
  .pypin:not(.is-expanded).is-minimized .pypin__pill > span:last-child { display: none; }
  .pypin.is-expanded { right: max(14px, env(safe-area-inset-right)) !important; }
  .pypin__expanded { width: min(300px, calc(100vw - 28px)); padding: 18px 48px 18px 19px; border-radius: 18px; }
  .pypin__expanded h2 { font-size: 19px; }
  .pypin__subtitle { font-size: 12px; }
  .pypin__description { font-size: 12px; -webkit-line-clamp: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .pypin { transition: none; }
  .pypin a:hover { transform: none; }
}
