.pg-grid,
.style-gallery.pg-grid {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: flex-start;
}
.pg-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pg-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #101012;
  cursor: pointer;
  color: #fff;
}
.pg-media {
  position: relative;
  width: 100%;
  background: #141416;
}
.pg-card.is-video .pg-media {
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background: #1a1a20;
}
.pg-card.is-video .pg-media img,
.pg-card.is-video .pg-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-media img,
.pg-media video {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: auto;
}
.pg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.5) 100%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.pg-card:hover .pg-overlay,
.pg-card:focus-within .pg-overlay {
  opacity: 1;
}
.pg-top-left {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-top-right {
  position: absolute;
  top: 12px;
  right: 12px;
}
.pg-bottom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.pg-bottom-left {
  flex: 1;
  min-width: 0;
}
.pg-bottom-right {
  flex: 0 0 auto;
}
.pg-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;

  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.pg-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 600;
}
.pg-views svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.pg-votes {
  display: flex;
  align-items: center;
  gap: 4px;

  pointer-events: auto;
}
.pg-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font: 650 12px/1 system-ui, sans-serif;
  cursor: pointer;
}
.pg-vote em,
.pg-vote span { display: none; }
.pg-vote:hover {
  background: rgba(0,0,0,0.6);
}
.pg-vote svg {

  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
}
.pg-vote.is-down svg { transform: scaleY(-1); }
.pg-vote.is-on svg { fill: currentColor; }
.pg-video-still {
  display: block;
  position: relative;
  width: 100%;
  background: #141416;
}
.pg-video-still img,
.pg-video-still video {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}
.pg-video-still img:not([src]),
.pg-video-still img[src=""] { display: none; }
.pg-card.is-video .pg-media video.is-frame {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
}
.pg-sound {
  height: 250px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding: 36px 18px 28px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.16), transparent 46%),
    radial-gradient(circle at 80% 90%, rgba(255, 255, 255, 0.08), transparent 42%),
    #16161a;
}
.pg-sound span {
  width: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.88);
}
.pg-sound span:nth-child(1) { height: 22px; }
.pg-sound span:nth-child(2) { height: 48px; }
.pg-sound span:nth-child(3) { height: 78px; }
.pg-sound span:nth-child(4) { height: 36px; }
.pg-sound span:nth-child(5) { height: 58px; }
.pg-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2a2a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 750;
  text-shadow: none;
}
.pg-who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.pg-who b,
.pg-who small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-who b {
  font-size: 13px;
  font-weight: 680;
}
.pg-who small {
  margin-top: 2px;
  color: #ddd;
  font-size: 11px;
}
.pg-kind { display: none; }
.pg-play,
.pg-modal-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: none;
}
.pg-modal-play { pointer-events: auto; width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.pg-modal-play[hidden],
.pg-modal-poster[hidden] { display: none; }
.pg-play::before,
.pg-modal-play::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 20px;
  border-style: solid;
  border-width: 14px 0 14px 20px;
  border-color: transparent transparent transparent #111;
}
.pg-modal-play::before { left: 33px; top: 26px; border-width: 16px 0 16px 24px; }
.pg-modal-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.pg-modal-video.is-behind-poster { opacity: 0; }
.pg-card-video,
.pg-modal-video {
  width: 100%;
  height: auto;
  display: block;
  background: #111;
  object-fit: contain;
}
.pg-card.is-voting { opacity: 0.86; }

.pg-more { display: flex; justify-content: center; margin-top: 22px; }
.pg-more-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 680;
}

.pg-more-link:hover { background: rgba(255, 255, 255, 0.14); }
.pg-empty { margin: 12px 0 0; text-align: center; color: #9aa0a6; }
#styles.pg-home { padding: 56px 12px 72px; }
#styles.pg-home .section-header { margin-bottom: 18px; }
#styles.pg-home h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.pg-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
}
.pg-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font: 650 14px/1 system-ui, sans-serif;
  cursor: pointer;
}
.pg-filters button.is-on {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pg-status {
  min-height: 24px;
  margin: 16px 0 28px;
  text-align: center;
  color: #9aa0a6;
  font-size: 14px;
}

.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
}
.pg-modal[hidden] { display: none; }
.pg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px);
}
.pg-modal-card {
  position: relative;
  width: auto;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: visible;
  border-radius: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.pg-modal-card.has-details {
  width: auto;
  height: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.pg-modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pg-modal-split {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  min-height: 0;
}

.pg-modal-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: transparent;
  overflow: hidden;
  border-radius: 14px;
}
.pg-modal-card.has-details .pg-modal-stage {
  background: #000;
  border-radius: 0;
}
.pg-modal-stage img,
.pg-modal-stage video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1440px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  object-fit: contain;
}
.pg-modal-card.has-details .pg-modal-stage {
  flex: 0 0 auto;
  background: #000;
}
.pg-modal-card.has-details .pg-modal-stage img,
.pg-modal-card.has-details .pg-modal-stage video {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}
.pg-modal-side {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #101014;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.pg-modal-side[hidden] { display: none; }
.pg-modal-details {
  padding: 28px 22px 22px;
  overflow-y: auto;
}
.pg-detail-kicker {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.pg-detail-label {
  margin: 0 0 8px;
  color: #9a9aa3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pg-stage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 22%, transparent 72%, rgba(0,0,0,0.5) 100%);
}
.pg-stage-overlay .pg-modal-person {
  position: absolute;
  top: 14px;
  left: 14px;
}
.pg-stage-overlay.is-video {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
  height: 84px;
  bottom: auto;
}
.pg-stage-overlay.is-video .pg-votes {
  top: 14px;
  right: 58px;
  bottom: auto;
}
.pg-stage-overlay .pg-votes {
  position: absolute;
  right: 14px;
  bottom: 14px;
  gap: 8px;
}
.pg-stage-overlay .pg-vote {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
}
.pg-stage-overlay .pg-vote em,
.pg-stage-overlay .pg-vote span { display: none; }
.pg-stage-overlay .pg-vote.is-on {
  background: #fff;
  color: #111;
}
.pg-modal-prompt {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #f5f5f7;
  background: rgba(0,0,0,0.4);
  padding: 12px;
  border-radius: 12px;
  white-space: pre-wrap;
}
.pg-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pg-modal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: #f5f5f7;
}
.pg-modal-chip b {
  color: #d0d0d4;
  font-weight: 650;
}

.pg-modal-sound {
  width: min(520px, 100%);
  padding: 28px 22px 18px;
}
.pg-modal-sound .pg-sound { height: 110px; }
.pg-modal-sound audio { width: 100%; margin-top: 18px; }
.pg-modal-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.pg-modal-person .pg-avatar { background: rgba(0, 0, 0, 0.45); }
.pg-vote-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 64px;
  margin: 0;
  color: #ffb4a8;
  font-size: 13px;
}
.pg-vote-note a { color: #fff; }

@media (min-width: 900px) { }
@media (min-width: 1200px) { }
@media (min-width: 1600px) { }
@media (max-width: 900px) {
  .pg-overlay {
    opacity: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.6) 100%);
  }
}

@media (max-width: 760px) {
  .pg-who small { display: none; }
  .pg-modal {
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .pg-modal-card:not(.has-details) {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100dvh;
    align-self: center;
    background: transparent;
  }
  .pg-modal-card.has-details {
    align-self: flex-start;
    width: 100%;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }
  .pg-modal-split {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
  }
  .pg-modal-stage { order: 1; }
  .pg-modal-side {
    order: 2;
    align-self: stretch;
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    min-height: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .pg-modal-card.has-details .pg-modal-details {
    flex: 1 1 auto;
    min-height: 0;
  }
  .pg-modal-stage img,
  .pg-modal-stage video {
    max-width: 100vw;
    max-height: calc(100dvh - 24px);
  }
  .pg-modal-card.has-details .pg-modal-stage img,
  .pg-modal-card.has-details .pg-modal-stage video {
    max-width: 100vw;
    max-height: 64dvh;
  }
}

.pg-page {
  margin: 0;
  min-height: 100dvh;
  background: #070708;
  color: #f5f5f7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.pg-page a { color: inherit; text-decoration: none; }
.pg-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 16px;
  background: rgba(7, 7, 8, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pg-brand {
  font-weight: 820;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
}
.pg-enter {
  justify-self: end;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 680;
}
.pg-enter:hover { background: rgba(255, 255, 255, 0.06); }
.pg-feed { padding: 10px 10px 0; }
@media (max-width: 720px) {
  .pg-top {
    grid-template-columns: 1fr auto;
    padding: 10px 12px 8px;
  }
  .pg-filters {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}
