:root {
  --ps-story-bg: #f5f5f7;
  --ps-story-surface: rgba(255, 255, 255, 0.98);
  --ps-story-soft: #fafafb;
  --ps-story-border: rgba(229, 231, 235, 0.92);
  --ps-story-border-strong: rgba(209, 213, 219, 0.9);
  --ps-story-text: #111111;
  --ps-story-muted: #6b7280;
  --ps-story-muted-soft: #9ca3af;
  --ps-story-gold: #c9a227;
  --ps-story-gold-light: #e5c76b;
  --ps-story-gold-soft: rgba(201, 162, 39, 0.14);
  --ps-story-dark: #0f172a;
  --ps-story-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  --ps-story-avatar-size: 60px;
  --ps-story-ring-size: 66px;
  --ps-story-bubble-width: 76px;
}

.ps-story-shell {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ps-story-shell__head {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.ps-story-shell__head > div {
  display: grid;
  gap: 6px;
  max-width: 42rem;
}

.ps-story-shell__head .eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.18);
  background: rgba(201, 162, 39, 0.08);
  color: #a8831f;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0;
}

.ps-story-shell__head h2 {
  margin: 0;
  color: var(--ps-story-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
}

.ps-story-root {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 122px;
  padding: 12px 14px 10px;
  border: 1px solid var(--ps-story-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 251, 0.96));
  box-shadow: var(--ps-story-shadow);
  overflow: hidden;
}

.ps-story-root::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 42%);
}

.ps-story-shell--product {
  gap: 10px;
  margin-block: 8px 14px;
  padding-block-end: 12px;
  border-block-end: 1px solid rgba(229, 231, 235, 0.88);
}

.ps-story-shell--product .ps-story-root {
  min-height: 120px;
}

.ps-story-shell--product-overlay {
  position: absolute;
  inset-block-start: -15px;
  inset-inline-start: 220px;
  inset-block-end: auto;
  z-index: 4;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  transform: none;
}

.ps-story-shell--product-overlay .ps-story-root {
  width: max-content;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  gap: 5px;
  overflow: visible;
  pointer-events: none;
  justify-items: center;
}

.ps-story-shell--product-overlay .ps-story-root::before {
  display: none;
}

.ps-story-shell--product-overlay .ps-story-rail {
  overflow: visible;
  width: max-content;
}

.ps-story-shell--product-overlay .ps-story-rail__track {
  min-height: 0;
  gap: 0;
  width: max-content;
}

.ps-story-shell--product-overlay .ps-story-state {
  display: none;
}

.ps-story-shell--product-overlay .ps-story-bubble {
  --ps-story-avatar-size: 64px;
  --ps-story-ring-size: 74px;
  --ps-story-bubble-width: 74px;

  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  width: var(--ps-story-bubble-width);
  height: var(--ps-story-ring-size);
  flex-basis: var(--ps-story-bubble-width);
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.14));
  pointer-events: auto;
  animation: ps-story-overlay-pulse 2.15s ease-in-out infinite;
}

.ps-story-shell--product-overlay .ps-story-bubble__ring {
  grid-area: 1 / 1;
  position: relative;
  inset: auto;
  width: var(--ps-story-ring-size);
  height: var(--ps-story-ring-size);
  transform: none;
  border: 2px solid #e53935;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.ps-story-shell--product-overlay .ps-story-bubble__avatar {
  grid-area: 1 / 1;
  width: var(--ps-story-avatar-size);
  height: var(--ps-story-avatar-size);
  border: 2px solid #ffffff;
  box-shadow: none;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
}

.ps-story-shell--product-overlay .ps-story-bubble__label,
.ps-story-shell--product-overlay .ps-story-bubble__count {
  display: none;
}

.ps-story-shell--product-overlay .ps-story-bubble.is-seen {
  animation: none;
}

.ps-story-shell--product-overlay .ps-story-bubble.is-seen .ps-story-bubble__ring {
  border-color: rgba(229, 57, 53, 0.62);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.ps-story-overlay__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding-inline: 8px;
  border-radius: 999px;
  border: 1px solid rgba(229, 57, 53, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #6b7280;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
}

.ps-story-shell--home .ps-story-bubble {
  --ps-story-avatar-size: 64px;
  --ps-story-ring-size: 74px;

  grid-template-rows: var(--ps-story-ring-size) auto auto;
}

.ps-story-shell--home .ps-story-bubble__ring {
  inset: 0 auto auto 50%;
  width: var(--ps-story-ring-size);
  height: var(--ps-story-ring-size);
  transform: translateX(-50%);
  background: #ffffff;
  border: 2px solid #e53935;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.ps-story-shell--home .ps-story-bubble.is-seen .ps-story-bubble__ring {
  border-color: rgba(229, 57, 53, 0.55);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ps-story-shell--home .ps-story-bubble__avatar {
  align-self: center;
  justify-self: center;
  width: var(--ps-story-avatar-size);
  height: var(--ps-story-avatar-size);
  border: 2px solid #ffffff;
  box-shadow: none;
}

.ps-story-shell--home .ps-story-bubble:focus-visible .ps-story-bubble__ring {
  box-shadow:
    0 0 0 4px rgba(229, 57, 53, 0.18),
    0 10px 22px rgba(229, 57, 53, 0.14);
}

.ps-story-rail {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  text-align: start;
}

.ps-story-rail-nav {
  display: none;
}

.ps-story-rail::-webkit-scrollbar {
  display: none;
}

.ps-story-rail__track {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 98px;
}

.ps-story-rail__sentinel {
  flex: 0 0 1px;
  width: 1px;
  min-height: 1px;
  pointer-events: none;
}

.ps-story-bubble {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  width: var(--ps-story-bubble-width);
  flex: 0 0 var(--ps-story-bubble-width);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ps-story-text);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 220ms ease;
}

.ps-story-bubble:hover {
  transform: translateY(-1px);
}

.ps-story-bubble:focus-visible {
  outline: none;
}

.ps-story-bubble:focus-visible .ps-story-bubble__ring {
  box-shadow:
    0 0 0 4px rgba(201, 162, 39, 0.16),
    0 10px 22px rgba(201, 162, 39, 0.14);
}

.ps-story-bubble__ring {
  position: absolute;
  inset: 0 auto auto 50%;
  width: var(--ps-story-ring-size);
  height: var(--ps-story-ring-size);
  border-radius: 999px;
  transform: translateX(-50%);
  background: conic-gradient(from 210deg, var(--ps-story-gold), var(--ps-story-gold-light), #f3e8c2, var(--ps-story-gold));
  box-shadow: 0 10px 22px rgba(201, 162, 39, 0.16);
}

.ps-story-bubble.is-seen .ps-story-bubble__ring {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.72), rgba(226, 232, 240, 0.94));
  box-shadow: none;
}

.ps-story-bubble__avatar {
  position: relative;
  z-index: 1;
  width: var(--ps-story-avatar-size);
  height: var(--ps-story-avatar-size);
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.ps-story-bubble__label {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  color: var(--ps-story-text);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ps-story-bubble__count {
  position: relative;
  z-index: 1;
  color: var(--ps-story-muted);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.ps-story-bubble--skeleton {
  pointer-events: none;
}

.ps-story-bubble--skeleton .ps-story-bubble__ring {
  background: rgba(226, 232, 240, 0.94);
  box-shadow: none;
}

.ps-story-bubble--skeleton .ps-story-bubble__avatar,
.ps-story-bubble--skeleton .ps-story-bubble__label {
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.86), rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.86));
  background-size: 200% 100%;
  animation: ps-story-shimmer 1.35s linear infinite;
}

.ps-story-bubble--skeleton .ps-story-bubble__label {
  width: 52px;
  height: 9px;
  margin-top: 2px;
  border-radius: 999px;
}

.ps-story-state {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px dashed rgba(209, 213, 219, 0.96);
  border-radius: 18px;
  background: rgba(250, 250, 251, 0.9);
  color: var(--ps-story-muted);
  font-size: 12px;
  font-weight: 700;
}

.ps-story-state--hidden {
  display: none;
}

.ps-story-state__retry {
  min-height: 38px;
  padding-inline: 16px;
  border: 0;
  border-radius: 14px;
  background: var(--ps-story-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.ps-story-lock {
  overflow: hidden;
}

.ps-story-viewer {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.ps-story-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ps-story-viewer__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(201, 162, 39, 0.14), transparent 28%),
    rgba(5, 10, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ps-story-viewer__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  max-height: 100dvh;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  color: #fff;
}

.ps-story-viewer__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-self: stretch;
  width: min(430px, 100%);
  max-width: 430px;
  min-height: 0;
}

.ps-story-viewer__progress {
  display: grid;
  grid-template-columns: repeat(var(--ps-story-progress-count, 1), minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.ps-story-viewer__progress-bar {
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.ps-story-viewer__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform;
}

.ps-story-viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ps-story-viewer__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ps-story-viewer__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.94);
}

.ps-story-viewer__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ps-story-viewer__meta strong,
.ps-story-viewer__cta-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-story-viewer__meta span,
.ps-story-viewer__views {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.ps-story-viewer__close,
.ps-story-viewer__nav {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.ps-story-viewer__close {
  width: 44px;
  height: 44px;
}

.ps-story-viewer__stage {
  position: relative;
  display: grid;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
}

.ps-story-viewer__media-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.ps-story-viewer__media {
  width: 100%;
  height: calc(100dvh - 188px);
  object-fit: contain;
  background: transparent;
}

.ps-story-viewer__media--portrait {
  object-fit: cover;
}

.ps-story-viewer__loader,
.ps-story-viewer__error,
.ps-story-viewer__tap-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.ps-story-viewer__loader[hidden],
.ps-story-viewer__error[hidden],
.ps-story-viewer__tap-play[hidden] {
  display: none !important;
}

.ps-story-viewer__loader::before {
  content: "";
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 999px;
  animation: ps-story-spin 0.9s linear infinite;
}

.ps-story-viewer__error {
  gap: 16px;
  text-align: center;
}

.ps-story-viewer__error button {
  min-height: 46px;
  padding-inline: 18px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--ps-story-dark);
  font-weight: 700;
  cursor: pointer;
}

.ps-story-viewer__tap-play {
  align-content: end;
  justify-items: center;
  padding-bottom: 30px;
  pointer-events: none;
}

.ps-story-viewer__tap-play span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: min(280px, calc(100% - 24px));
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ps-story-viewer__bottom {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

@keyframes ps-story-overlay-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  45% {
    transform: translateY(-1px) scale(1.02);
    opacity: 0.92;
  }
}

.ps-story-viewer__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ps-story-viewer__cta-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ps-story-viewer__cta-copy span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.ps-story-viewer__cta-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding-inline: 18px;
  border-radius: 18px;
  background: #fff;
  color: var(--ps-story-dark);
  font-weight: 800;
  text-decoration: none;
}

.ps-story-viewer__cta[hidden],
.ps-story-viewer__cta-button[hidden] {
  display: none !important;
}

@keyframes ps-story-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes ps-story-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767.98px) {
  .home-mobile-shell > .ps-story-shell--home {
    order: -1;
  }

  .home-mobile-shell > .ps-story-shell--home .ps-story-shell__head {
    display: none;
  }

  .home-mobile-shell > .ps-story-shell--home .ps-story-root {
    min-height: 118px;
  }

}

@media (min-width: 768px) {
  .ps-story-shell {
    gap: 10px;
  }

  .ps-story-shell__head h2 {
    font-size: 13.5px;
  }

  .ps-story-root {
    min-height: 126px;
    padding: 14px 16px 12px;
  }

  .ps-story-shell--home .ps-story-root {
    isolation: isolate;
  }

  .ps-story-shell--home .ps-story-rail {
    scroll-padding-inline: 52px;
  }

  .ps-story-shell--home .ps-story-rail-nav {
    position: absolute;
    inset-block-start: 52px;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ps-story-dark);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    cursor: pointer;
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .ps-story-shell--home .ps-story-rail-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.13);
  }

  .ps-story-shell--home .ps-story-rail-nav:active {
    transform: translateY(0) scale(0.98);
  }

  .ps-story-shell--home .ps-story-rail-nav:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 4px rgba(201, 162, 39, 0.16),
      0 12px 26px rgba(15, 23, 42, 0.13);
  }

  .ps-story-shell--home .ps-story-rail-nav[disabled] {
    opacity: 0;
    pointer-events: none;
  }

  .ps-story-shell--home .ps-story-rail-nav--newer {
    right: 10px;
  }

  .ps-story-shell--home .ps-story-rail-nav--older {
    left: 10px;
  }

  .ps-story-shell--product {
    margin-block: 10px 18px;
    padding-block-end: 16px;
  }

  .ps-story-shell--product .ps-story-root {
    min-height: 124px;
  }

  .ps-story-rail__track {
    gap: 14px;
    min-height: 104px;
  }

  .ps-story-bubble {
    --ps-story-avatar-size: 70px;
    --ps-story-ring-size: 76px;
    --ps-story-bubble-width: 84px;

    gap: 7px;
  }

  .ps-story-bubble__label {
    font-size: 12px;
  }

  .ps-story-bubble__count {
    font-size: 10.5px;
  }

  .ps-story-shell--product-overlay {
    inset-block-start: auto;
    inset-block-end: 0;
    inset-inline-start: -21px;
    margin-block: 10px -47px;
    transform: none;
  }

  .ps-story-shell--product-overlay .ps-story-bubble {
    --ps-story-avatar-size: 66px;
    --ps-story-ring-size: 76px;
    --ps-story-bubble-width: 76px;

    height: var(--ps-story-ring-size);
  }

  .ps-story-shell--home .ps-story-bubble {
    --ps-story-avatar-size: 68px;
    --ps-story-ring-size: 78px;

    grid-template-rows: var(--ps-story-ring-size) auto auto;
  }

  .ps-story-overlay__hint {
    min-height: 21px;
    padding-inline: 9px;
    font-size: 9px;
  }

  .ps-story-viewer__dialog {
    padding-inline: 24px;
  }

  .ps-story-viewer__stage {
    border-radius: 34px;
  }

  .ps-story-viewer__media {
    height: min(78vh, 760px);
  }
}
