/* v1.3.17 — Explore "Discover" stories: tall cards (the person's latest story), most viewed first.
   ShotGram's own calm look: dark cards, one blue, small labels. */
.xd-head { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; cursor: pointer;
  padding: 0 14px !important; margin-bottom: 9px !important; font: inherit; -webkit-tap-highlight-color: transparent; }
.xd-head b { font-size: 16px; font-weight: 700; }
.xd-chev { opacity: .55; }
[dir="rtl"] .xd-chev { transform: scaleX(-1); }

.xd-row { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 0 14px 6px; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.xd-row::-webkit-scrollbar { display: none; }
.xd-row .xd-card { flex: 0 0 auto; width: 118px; scroll-snap-align: start; }

.xd-card { position: relative; display: block; aspect-ratio: 9 / 15; border: 0; padding: 0; border-radius: 12px; overflow: hidden;
  background: var(--surface-2, #14172b); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: start; }
.xd-card:active { transform: scale(.98); }
.xd-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.xd-card .tile-ph.xd-img img, .xd-card .tile-ph.xd-img video, .xd-card .tile-ph.xd-img canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.xd-shade { position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0)); pointer-events: none; }
.xd-who { position: absolute; inset: auto 7px 7px 7px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.xd-who .avatar { width: 22px !important; height: 22px !important; flex: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }
.xd-who b { min-width: 0; flex: 0 1 auto; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.xd-who svg, .xd-who .badge { flex: none; }

.xd-hot { position: absolute; top: 7px; inset-inline-start: 7px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 4px 0 6px;
  border-radius: 999px; background: rgba(8, 12, 28, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #6db3ff; }
.xd-hot b { font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: .1px; }
.xd-hot i { font-style: normal; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: #3b9bff; color: #fff;
  font-size: 9.5px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.xd-count { position: absolute; top: 7px; inset-inline-end: 7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: rgba(8, 12, 28, .62); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* the full page: every story, two columns */
.xd-page { position: fixed; inset: 0; z-index: 320; background: var(--bg, #06070f); display: flex; flex-direction: column; animation: xdUp .22s ease-out; }
@keyframes xdUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.xd-page-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: calc(env(safe-area-inset-top) + 6px) 8px 8px; }
.xd-page-head b { text-align: center; font-size: 17px; font-weight: 700; }
.xd-page-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 10px calc(env(safe-area-inset-bottom) + 18px); }
.xd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xd-grid .xd-card { width: 100%; border-radius: 14px; }
.xd-grid .xd-who b { font-size: 14px; }
.xd-grid .xd-who .avatar { width: 26px !important; height: 26px !important; }
.xd-sk { aspect-ratio: 9 / 15; border-radius: 14px; }
html[data-mode="light"] .xd-page, body.light .xd-page { background: var(--bg, #fff); }
html[data-mode="light"] .xd-card, body.light .xd-card { background: #e9edf5; }
/* the small cards in the row: no story-count chip (it sat on top of the Trending label) */
.xd-row .xd-count { display: none; }
.xd-row .xd-hot b { font-size: 10px; }

/* a card is never a black box: under the picture sits the person's photo, blurred (or ShotGram's blue) */
.xd-fallback { position: absolute; inset: -12%; background: linear-gradient(160deg, #1b2a52, #0e1430) center / cover no-repeat; filter: blur(14px) saturate(1.15) brightness(.8); }
/* the video still that replaces the placeholder keeps the card's size */
.xd-card > .tile-frame, .xd-card > video, .xd-card > .tile-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.xd-card > .tile-ph { background: none; }
