.pl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(4px);
}

.pl-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pl-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 9999;
  width: min(86vw, 360px);
  display: flex;
  flex-direction: column;
  background: hsl(var(--sidebar-background, 0 0% 4%));
  color: hsl(var(--sidebar-foreground, 0 0% 92%));
  border-right: 1px solid hsl(var(--sidebar-border, 0 0% 14%));
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.55);
  transform: translateX(-105%);
  transition: transform 220ms ease;
  padding-bottom: env(safe-area-inset-bottom);
}

.pl-drawer.is-open {
  transform: translateX(0);
}

.pl-drawer--right {
  inset: 0 0 0 auto;
  border-right: 0;
  border-left: 1px solid hsl(var(--sidebar-border, 0 0% 14%));
  transform: translateX(105%);
}

.pl-drawer--right.is-open {
  transform: translateX(0);
}

.pl-drawer__header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 18px 14px;
  border-bottom: 1px solid hsl(var(--sidebar-border, 0 0% 14%));
}

.pl-drawer__brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.pl-drawer__brand span,
.pl-accent {
  color: hsl(var(--primary, 180 100% 50%));
}

.pl-icon-button {
  position: relative;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border, 0 0% 18%));
  border-radius: 12px;
  background: hsl(var(--card, 0 0% 6%));
  color: hsl(var(--foreground, 0 0% 96%));
}

.pl-icon-button:hover {
  border-color: hsl(var(--primary, 180 100% 50%) / 0.65);
  color: hsl(var(--primary, 180 100% 50%));
}

.pl-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid hsl(var(--background, 0 0% 0%));
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.pl-badge.has-items {
  display: flex;
}

.pl-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px 24px;
}

.pl-menu-heading {
  margin: 12px 10px 7px;
  color: hsl(var(--muted-foreground, 0 0% 60%));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pl-menu-item {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pl-menu-item:hover,
.pl-menu-item:focus-visible {
  outline: none;
  background: hsl(var(--sidebar-accent, 180 70% 12%));
  color: hsl(var(--primary, 180 100% 50%));
}

.pl-menu-item svg {
  flex: 0 0 auto;
}

.pl-menu-item__text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-menu-trigger {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: hsl(var(--card, 0 0% 5%));
  color: hsl(var(--primary, 180 100% 50%));
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.pl-home-hidden {
  visibility: hidden !important;
}

.pl-mobile-bell {
  margin-left: auto;
  flex: 0 0 auto;
}

.pl-desktop-bell {
  position: absolute;
  top: 11px;
  right: 10px;
}

.pl-notification {
  padding: 14px;
  border: 1px solid hsl(var(--border, 0 0% 17%));
  border-radius: 13px;
  background: hsl(var(--card, 0 0% 6%));
}

.pl-notification + .pl-notification {
  margin-top: 10px;
}

.pl-notification h3 {
  margin: 0 0 6px;
  color: hsl(var(--foreground, 0 0% 96%));
  font-size: 14px;
  font-weight: 800;
}

.pl-notification p {
  margin: 0;
  color: hsl(var(--muted-foreground, 0 0% 68%));
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.pl-notification time {
  display: block;
  margin-top: 9px;
  color: hsl(var(--primary, 180 100% 50%));
  font-size: 10px;
}

.pl-empty {
  padding: 28px 18px;
  color: hsl(var(--muted-foreground, 0 0% 62%));
  text-align: center;
  font-size: 13px;
}

.pl-content-dialog {
  position: fixed;
  inset: 0 0 0 14rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: auto;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: hsl(var(--background, 0 0% 0%));
  color: hsl(var(--foreground, 0 0% 96%));
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pl-content-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pl-content-view__header {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid hsl(var(--border, 0 0% 16%));
  background: hsl(var(--background, 0 0% 0%) / 0.96);
}

.pl-content-view__brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pl-content-view__layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.pl-content-view__main {
  overflow-y: auto;
  padding: clamp(30px, 6vw, 82px) clamp(24px, 6vw, 88px);
}

.pl-content-view__eyebrow {
  margin: 0 0 10px;
  color: hsl(var(--primary, 180 100% 50%));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pl-content-view__main h2 {
  margin: 0 0 26px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.pl-content-view__main > p {
  margin: 0;
  max-width: 900px;
  color: hsl(var(--foreground, 0 0% 90%));
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
  white-space: pre-wrap;
}

.pl-content-view__aside {
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid hsl(var(--border, 0 0% 16%));
  background: hsl(var(--card, 0 0% 4%));
}

.pl-content-view__aside-title {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 20px;
  border-bottom: 1px solid hsl(var(--border, 0 0% 16%));
  background: hsl(var(--card, 0 0% 4%) / 0.96);
  font-size: 17px;
  font-weight: 800;
}

.pl-content-view__list {
  padding: 12px;
}

.pl-content-view__list .pl-menu-item {
  border: 1px solid transparent;
}

.pl-content-view__list .pl-menu-item.is-active {
  border-color: hsl(var(--primary, 180 100% 50%) / 0.28);
  background: hsl(var(--primary, 180 100% 50%) / 0.1);
  color: hsl(var(--primary, 180 100% 50%));
}

.pl-admin-card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius, 0.5rem);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.pl-admin-card__header {
  padding: 24px 24px 14px;
}

.pl-admin-card__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.pl-admin-card__header p {
  margin: 5px 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.pl-admin-card__body {
  padding: 0 24px 24px;
}

.pl-admin-row {
  padding: 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--background) / 0.55);
}

.pl-admin-row + .pl-admin-row {
  margin-top: 10px;
}

.pl-admin-row__title {
  margin: 0 0 4px;
  color: hsl(var(--primary));
  font-size: 15px;
  font-weight: 800;
}

.pl-admin-actions--top {
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid hsl(var(--border));
}

.pl-admin-actions--top .pl-admin-status {
  margin-top: 0;
}

.pl-admin-grid {
  display: grid;
  grid-template-columns: 1fr 145px;
  gap: 10px;
}

.pl-admin-field {
  margin-top: 10px;
}

.pl-admin-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
}

.pl-admin-field input,
.pl-admin-field select,
.pl-admin-field textarea {
  width: 100%;
  border: 1px solid hsl(var(--input));
  border-radius: 7px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.pl-admin-field textarea {
  min-height: 130px;
  resize: vertical;
}

.pl-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pl-admin-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 7px;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pl-admin-button--primary {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.pl-admin-button--danger {
  color: hsl(var(--destructive));
}

.pl-admin-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.pl-admin-status {
  min-height: 20px;
  margin-top: 10px;
  color: hsl(var(--primary));
  font-size: 12px;
  font-weight: 700;
}

.pl-desktop-dynamic {
  margin: 14px 8px 4px;
  padding-top: 12px;
  border-top: 1px solid hsl(var(--sidebar-border));
}

.pl-desktop-dynamic .pl-menu-heading {
  margin-left: 4px;
}

.pl-module-lock {
  top: 50% !important;
  right: auto !important;
  left: 50% !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid hsl(var(--primary, 180 100% 50%) / 0.72) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.58) !important;
  color: hsl(var(--primary, 180 100% 50%)) !important;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2), 0 0 24px hsl(var(--primary, 180 100% 50%) / 0.28) !important;
  transform: translate(-50%, -50%) !important;
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.pl-module-lock svg {
  width: 26px !important;
  height: 26px !important;
  stroke-width: 2.3 !important;
}

.pl-member-finder {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid hsl(var(--primary, 180 100% 50%) / 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(var(--primary, 180 100% 50%) / 0.09), hsl(var(--card)) 48%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.pl-member-finder__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.pl-member-finder__heading h2 {
  margin: 7px 0 3px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
}

.pl-member-finder__heading p,
.pl-member-finder__result {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.pl-access-status {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: rgb(74, 222, 128);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pl-access-summary {
  display: grid;
  grid-template-columns: auto auto 1px auto auto;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
}

.pl-access-summary strong {
  color: hsl(var(--foreground));
  font-size: 20px;
}

.pl-access-summary i {
  align-self: stretch;
  width: 1px;
  margin: 0 6px;
  background: hsl(var(--border));
}

.pl-member-finder__controls {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pl-member-finder__controls input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 9px;
  outline: none;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 13px;
}

.pl-member-finder__controls input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.pl-content-filters {
  display: flex;
  gap: 6px;
}

.pl-content-filter {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 9px;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pl-content-filter.is-active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary));
}

.pl-member-finder__result {
  margin-top: 10px;
}

.pl-content-hidden,
.pl-section-hidden {
  display: none !important;
}

.pl-content-owned > div:first-child {
  border-color: hsl(var(--primary, 180 100% 50%) / 0.32) !important;
}

.pl-universal-modules {
  margin-bottom: 24px;
}

.pl-universal-modules__heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 4px 10px;
}

.pl-universal-modules__heading h2 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: 18px;
  font-weight: 800;
}

.pl-universal-modules__heading span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: rgb(251, 191, 36);
  font-size: 9px;
  font-weight: 900;
}

.pl-universal-modules__heading span.is-released {
  background: rgba(34, 197, 94, 0.14);
  color: rgb(74, 222, 128);
}

.pl-universal-modules__list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pl-universal-card {
  flex: 0 0 140px;
  padding: 0;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
}

.pl-universal-card__cover {
  position: relative;
  aspect-ratio: 281 / 396;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid hsl(var(--primary) / 0.34);
  border-radius: 8px;
  background: hsl(var(--card));
}

.pl-universal-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pl-universal-card:hover img {
  transform: scale(1.04);
}

.pl-universal-card > p {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-universal-card > small {
  color: rgb(251, 191, 36);
  font-size: 10px;
  font-weight: 800;
}

.pl-universal-card > small.is-released {
  color: rgb(74, 222, 128);
}

.pl-universal-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.56);
  color: white;
  text-align: center;
  backdrop-filter: blur(2px);
}

.pl-universal-lock svg {
  color: hsl(var(--primary));
}

.pl-universal-lock strong {
  font-size: 10px;
  line-height: 1.25;
}

.pl-release-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10002;
  width: min(calc(100vw - 32px), 440px);
  padding: 28px;
  border: 1px solid hsl(var(--primary) / 0.42);
  border-radius: 16px;
  background: hsl(var(--card, 0 0% 6%));
  color: hsl(var(--foreground, 0 0% 96%));
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7), 0 0 40px hsl(var(--primary) / 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease;
}

.pl-release-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.pl-release-modal__icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 1px solid hsl(var(--primary) / 0.55);
  border-radius: 999px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.pl-release-modal__eyebrow {
  color: hsl(var(--primary));
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pl-release-modal h2 {
  margin: 7px 0 12px;
  font-size: 21px;
  line-height: 1.25;
}

.pl-release-modal__count {
  display: block;
  margin-bottom: 8px;
  color: rgb(251, 191, 36);
  font-size: 26px;
  font-weight: 900;
}

.pl-release-modal__message {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  line-height: 1.55;
}

.pl-release-modal__button {
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
  border: 0;
  border-radius: 9px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 900;
  cursor: pointer;
}

.pl-admin-universal-wrapper {
  margin: 0 0 24px;
}

.pl-admin-universal-launcher {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 100;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid hsl(var(--primary));
  border-radius: 8px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.pl-admin-universal-panel {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 10002;
  width: min(760px, calc(100vw - 48px));
  overflow-y: auto;
  padding: 0 18px 18px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--background));
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.pl-admin-universal-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.pl-admin-universal-panel__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  background: hsl(var(--background));
}

.pl-admin-universal-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
}

.pl-admin-universal-preview {
  width: 130px;
  aspect-ratio: 281 / 396;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  object-fit: cover;
}

.pl-admin-universal-fields {
  min-width: 0;
}

.pl-admin-release-info {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: rgb(251, 191, 36);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .pl-admin-grid {
    grid-template-columns: 1fr;
  }

  .pl-content-view__header {
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .pl-content-view__layout {
    display: block;
    overflow-y: auto;
  }

  .pl-content-view__main {
    min-height: 56vh;
    overflow: visible;
    padding: 34px 20px 44px;
  }

  .pl-content-view__aside {
    overflow: visible;
    border-top: 1px solid hsl(var(--border, 0 0% 16%));
    border-left: 0;
  }

  .pl-content-view__aside-title {
    position: static;
  }

  .pl-module-lock {
    width: 42px !important;
    height: 42px !important;
  }

  .pl-module-lock svg {
    width: 23px !important;
    height: 23px !important;
  }

  .pl-member-finder {
    padding: 16px;
  }

  .pl-member-finder__heading {
    display: block;
  }

  .pl-access-summary {
    margin-top: 14px;
    justify-content: start;
  }

  .pl-member-finder__controls {
    display: block;
  }

  .pl-content-filters {
    margin-top: 8px;
  }

  .pl-content-filter {
    flex: 1;
  }

  .pl-admin-universal-row {
    grid-template-columns: 1fr;
  }

  .pl-admin-universal-preview {
    width: 110px;
  }

  .pl-admin-universal-launcher {
    top: 70px;
    right: 12px;
  }

  .pl-admin-universal-panel {
    inset: 12px;
    width: auto;
  }
}

@media (max-width: 767px) {
  .pl-content-dialog {
    inset: 0;
    z-index: 10001;
    width: 100%;
  }
}

@media (min-width: 768px) {
  .pl-menu-trigger,
  .pl-mobile-bell {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .pl-universal-card {
    flex-basis: 180px;
  }
}
