/* The story viewer at the top of /instagram-story-viewer/ (USER_STORIES W1). Tokens from styles.css. */

.sv-hero {
  color: #f7f3fa;
  background:
    radial-gradient(60% 50% at 10% 70%, rgba(255, 79, 163, 0.2) 0%, transparent 70%),
    radial-gradient(115% 80% at 50% -15%, #6a3f8f 0%, transparent 62%),
    linear-gradient(168deg, var(--night-1) 0%, var(--night-2) 55%, var(--night-3) 100%);
  padding-block: clamp(22px, 4vw, 48px) clamp(30px, 4vw, 52px);
}
.sv-hero h1 {
  font-size: clamp(32px, 5.4vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin: 10px 0 0;
}
.sv-hero h1 span, .sv-hero h1 em { display: block; }
.sv-hero h1 em {
  font-style: normal;
  background: linear-gradient(94deg, #ff4fa3, #ff77c2 45%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
/* The tool is the hero: centred on a wide screen, left-aligned on a phone. */
@media (min-width: 900px) {
  .sv-hero-center { text-align: center; }
  .sv-hero-center .sv-sub { margin-inline: auto; }
  .sv-hero-center .sv-form { margin-inline: auto; }
  .sv-hero-center .sv-chips, .sv-hero-center .sv-trust { justify-content: center; }
  .sv-hero { padding-block: clamp(36px, 4vw, 60px) clamp(44px, 4.5vw, 68px); }
}
.sv-sub { text-wrap: balance; color: #d9cfe4; max-width: 52ch; margin: 14px 0 0; font-size: clamp(16px, 1.5vw, 18px); }

.sv-form { margin-top: 22px; display: flex; gap: 10px; max-width: 640px; flex-wrap: wrap; }
.sv-field {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding-left: 16px;
  height: 56px;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.sv-field:focus-within { border-color: var(--pink); background: rgba(255, 255, 255, 0.1); }
.sv-field > span { color: #b9aec6; font-size: 18px; font-weight: 600; }
/* 18px: below 16px an iPhone zooms into the field. */
.sv-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 18px;
  padding: 0 6px 0 4px;
  outline: none;
}
.sv-field input::placeholder { color: #8f84a0; }
.sv-clear { border: 0; background: none; color: #b9aec6; width: 44px; height: 44px; font-size: 16px; cursor: pointer; }
.sv-field input:placeholder-shown + .sv-clear { visibility: hidden; }
.sv-go {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(94deg, #ff4fa3, #e04bc0 50%, #a855f7);
  box-shadow: 0 16px 30px -16px rgba(255, 79, 163, 0.9);
  transition: filter 0.15s, transform 0.15s;
}
.sv-go:hover { filter: brightness(1.07); }
.sv-go:active { transform: scale(0.985); }
.sv-go[disabled] { opacity: 0.7; cursor: progress; }
.sv-err { margin: 10px 0 0; font-size: 14.5px; color: #ffc2dc; min-height: 1.5em; }
.sv-chips { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: #b9aec6; }
.sv-chips button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ece4f3;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.sv-trust { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: #cdc2d8; }
.sv-trust li { display: flex; gap: 7px; align-items: center; }
.sv-trust svg { width: 16px; height: 16px; color: var(--pink); }
#sv-ts:not(:empty) { margin-top: 14px; }

.sv-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* The compact search that stays once the hero has scrolled away. */
.sv-mini {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--night-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
}
.sv-on .sv-mini { display: block; }
.sv-mini .wrap { display: flex; gap: 8px; align-items: center; padding-block: 8px; }
.sv-mini .sv-field { flex: 1 1 auto; }
.sv-mini .sv-field { height: 42px; }
.sv-mini .sv-field input { font-size: 16px; }
.sv-mini .sv-go { height: 42px; padding: 0 18px; font-size: 15px; }

.sv-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 26px 10px; }
.sv-main > * { min-width: 0; }
@media (min-width: 900px) { .sv-main { max-width: 920px; } }
.sv-main:has(#sv-result:empty) { padding-top: clamp(28px, 4vw, 48px); }
#sv-result { scroll-margin-top: 70px; }
#sv-result:empty, #sv-follow:empty, #sv-upsell:empty { display: none; }
.sv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.sv-sk { background: linear-gradient(90deg, var(--panel-2), var(--line), var(--panel-2)); background-size: 200% 100%; animation: sv-sk 1.1s linear infinite; border-radius: 12px; }
@keyframes sv-sk { to { background-position: -200% 0; } }
.sv-load { margin: 12px 0 0; font-size: 14px; color: var(--tx-2); }

.sv-prof { display: flex; gap: 16px; align-items: center; }
.sv-ring { width: 84px; height: 84px; border-radius: 50%; padding: 3px; flex: none; border: 0; background: var(--line); cursor: default; }
.sv-ring.live { background: conic-gradient(from 200deg, #ff4fa3, #a855f7, #ff77c2, #ff4fa3); cursor: pointer; }
.sv-ring img, .sv-ring i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--panel); object-fit: cover; background: var(--panel-2); }
.sv-who { min-width: 0; flex: 1; }
.sv-who h2 { margin: 0; font-size: 21px; letter-spacing: -0.025em; line-height: 1.2; overflow-wrap: anywhere; }
.sv-who .sv-h { color: var(--tx-2); font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.sv-who .sv-h svg { width: 15px; height: 15px; color: #3d8bfd; fill: currentColor; stroke: none; }
.sv-stats { display: flex; gap: 4px 14px; margin-top: 4px; font-size: 14px; color: var(--tx-2); flex-wrap: wrap; }
.sv-stats b { color: var(--tx); }

.sv-tabs { display: flex; gap: 22px; margin: 18px 0 14px; border-bottom: 1px solid var(--line); }
.sv-tabs button { border: 0; background: none; padding: 10px 0; font: inherit; font-weight: 700; color: var(--tx-3); border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-size: 15px; cursor: pointer; }
.sv-tabs button[aria-selected="true"] { color: var(--tx); border-color: var(--pink); }
.sv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 210px)); gap: 12px; }
@media (max-width: 560px) { .sv-form > .sv-go { flex: 1 1 100%; } .sv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .sv-card { padding: 16px; } .sv-ring { width: 72px; height: 72px; } }
.sv-tile { position: relative; border: 0; padding: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 9 / 16; background: var(--panel-2); cursor: pointer; }
.sv-tile img { width: 100%; height: 100%; object-fit: cover; }
.sv-age { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.5); border-radius: 999px; padding: 1px 8px; }
.sv-vid { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); display: grid; place-items: center; }
.sv-vid svg { width: 11px; height: 11px; fill: #fff; stroke: none; }
.sv-hls { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; }
.sv-hl { flex: none; border: 0; background: none; padding: 0; text-align: center; font: inherit; font-size: 12.5px; color: var(--tx-2); width: 78px; cursor: pointer; }
.sv-hl img, .sv-hl i { display: block; width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 2px solid var(--line); padding: 2px; background: var(--panel); background-clip: content-box; }
.sv-hl span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-hint { margin: 12px 0 0; font-size: 13.5px; color: var(--tx-3); }
.sv-empty { text-align: center; padding: 20px 8px 6px; }
.sv-empty h3 { margin: 0; font-size: 19px; letter-spacing: -0.02em; text-wrap: balance; }
.sv-empty p { color: var(--tx-2); margin: 8px auto 0; max-width: 46ch; font-size: 15px; }
.sv-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--panel-2); color: var(--tx-2); }
.sv-ico svg { width: 24px; height: 24px; }
.sv-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--tx); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; }
.sv-btn:hover { border-color: var(--accent); }

.sv-follow h3 { margin: 0; font-size: 19px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-est { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.sv-follow .sv-note { margin: 4px 0 0; color: var(--tx-2); font-size: 14.5px; }
.sv-split { margin-top: 14px; display: grid; gap: 10px; }
.sv-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--panel-2); }
.sv-bar i { display: block; height: 100%; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sv-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sv-legend div { background: var(--panel-2); border-radius: 14px; padding: 10px 12px; font-variant-numeric: tabular-nums; min-width: 0; }
.sv-legend b { display: block; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.sv-legend span { font-size: 12.5px; color: var(--tx-2); }
.sv-w b { color: var(--accent); }
.sv-m b { color: #6d3df0; }
@media (prefers-color-scheme: dark) { .sv-m b { color: #a78bfa; } }
.sv-o b { color: var(--tx-2); }
.sv-faces { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--tx-2); flex-wrap: wrap; }
.sv-faces span { display: flex; }
.sv-faces img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -8px; object-fit: cover; filter: blur(3px) saturate(0.9); }
.sv-faces img:first-child { margin-left: 0; }

.sv-upsell {
  color: #f7f3fa;
  border: 0;
  background:
    radial-gradient(70% 90% at 0% 100%, rgba(255, 79, 163, 0.22) 0%, transparent 70%),
    linear-gradient(160deg, var(--night-1), var(--night-3));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
}
.sv-bell { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 79, 163, 0.16); color: var(--pink); }
.sv-bell svg { width: 26px; height: 26px; }
.sv-upsell h3 { margin: 0; font-size: 21px; letter-spacing: -0.025em; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.sv-upsell p { margin: 6px 0 0; color: #d9cfe4; font-size: 14.5px; max-width: 52ch; }
.sv-acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.sv-qr { grid-row: 1; grid-column: 3; background: #fff; border-radius: 12px; padding: 8px; text-align: center; color: #1a1322; font-size: 11px; font-weight: 700; line-height: 1.3; }
.sv-qr img { width: 92px; height: 92px; }
.sv-play { line-height: 0; }
.sv-play img { height: 54px; width: auto; margin-left: -6px; }
.sv-iph { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 18px 8px 14px; border-radius: 14px; background: #0b0810; color: #fff; border: 1px solid rgba(255, 255, 255, 0.22); text-decoration: none; flex: 1 1 240px; }
.sv-iph svg { color: var(--pink); width: 24px; height: 24px; }
.sv-iph b { display: block; font-size: 15px; }
.sv-iph small { display: block; font-size: 12px; color: #b9aec6; }
.sv-lite { color: #d9cfe4; font-size: 14px; text-decoration: underline dotted; text-underline-offset: 4px; }
@media (max-width: 640px) {
  .sv-upsell { grid-template-columns: auto minmax(0, 1fr); }
  .sv-acts { grid-column: 1 / -1; }
  .sv-qr { display: none; }
}

.sv-sec h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.sv-sec > p { margin: 4px 0 0; color: var(--tx-2); font-size: 15px; }
.sv-wants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-top: 14px; }
.sv-want { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.sv-st { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 1px 8px; }
.sv-st.live { background: var(--accent-soft); color: var(--accent); }
.sv-st.soon { color: var(--tx-2); border: 1px dashed var(--tx-3); }
.sv-want h3 { margin: 0; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.3; }
.sv-want p { margin: 0; font-size: 13.5px; color: var(--tx-2); }
.sv-want .sv-btn { justify-self: start; margin-top: 2px; padding: 6px 13px; font-weight: 600; font-size: 13.5px; }
.sv-want .sv-btn.done { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); cursor: default; }

/* ---------- the player ---------- */

dialog.sv-player { position: fixed; inset: 0; margin: auto; z-index: auto; border: 0; padding: 0; background: transparent; max-width: min(420px, 100vw); width: 100%; max-height: 100dvh; overflow: visible; }
dialog.sv-player::backdrop { background: rgba(10, 6, 16, 0.9); }
html:has(dialog.sv-player[open]) { overflow: hidden; }
.sv-pl { position: relative; aspect-ratio: 9 / 16; max-height: 92dvh; border-radius: 22px; overflow: hidden; background: #000; margin: auto; touch-action: none; }
@media (max-width: 480px) {
  dialog.sv-player { max-width: 100vw; margin: 0; height: 100dvh; }
  .sv-pl { aspect-ratio: auto; height: 100dvh; max-height: none; border-radius: 0; }
}
.sv-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.sv-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.sv-bars s { display: block; height: 100%; width: 0; background: #fff; }
.sv-bars .full s { width: 100%; }
.sv-bars .run s { animation: sv-fill var(--d, 5s) linear forwards; }
.sv-bars .vid s { animation: none; }
.sv-paused .sv-bars .run s { animation-play-state: paused; }
@keyframes sv-fill { to { width: 100%; } }
.sv-plh { position: absolute; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); z-index: 3; }
.sv-plh > img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.sv-plh > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-plh .sv-r { margin-left: auto; display: flex; gap: 6px; flex: none; }
.sv-plh button { background: rgba(0, 0, 0, 0.4); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.sv-plh button svg { width: 18px; height: 18px; }
.sv-quiet { position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.5); border-radius: 999px; padding: 6px 12px; display: flex; gap: 6px; align-items: center; z-index: 2; }
.sv-quiet svg { width: 14px; height: 14px; }
.sv-tap { position: absolute; inset: 70px 0 70px 0; display: grid; grid-template-columns: 1fr 2fr; z-index: 1; }
.sv-tap button { background: transparent; border: 0; cursor: pointer; }
.sv-end { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 28px; color: #fff; z-index: 4; background: radial-gradient(80% 60% at 50% 30%, rgba(168, 85, 247, 0.35), transparent 70%), rgba(15, 10, 22, 0.95); }
.sv-ended .sv-end { display: flex; }
.sv-end h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.sv-end p { margin: 0; color: #d9cfe4; font-size: 14.5px; }
.sv-end .sv-go { display: inline-grid; place-items: center; height: 50px; font-size: 16px; text-decoration: none; }
.sv-end .sv-again { background: none; border: 0; color: #d9cfe4; text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.sv-end .sv-x { position: absolute; top: 18px; right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .sv-sk { animation: none; }
  .sv-bar i { transition: none; }
}

.prose h2.sv-guide-h { margin-top: 0; }
.sv-stamp { font-size: 14px; color: var(--tx-3) !important; }

/* End of the stories: an opaque card, so the last story does not show through. */
.sv-ended .sv-media, .sv-ended .sv-tap, .sv-ended .sv-quiet, .sv-ended .sv-bars { visibility: hidden; }
.sv-end { background: radial-gradient(80% 55% at 50% 25%, rgba(168, 85, 247, 0.4), transparent 70%), linear-gradient(170deg, var(--night-1), var(--night-3)); }

/* The app, after the tool. */
.sv-app { padding-block: clamp(40px, 6vw, 72px); background: linear-gradient(180deg, transparent, rgba(58, 40, 86, 0.35)); }
.sv-app-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
.sv-app h2 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; max-width: 18ch; }
.sv-app ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 12px; max-width: 54ch; color: var(--tx-2); font-size: 16.5px; }
.sv-app li { padding-left: 26px; position: relative; }
.sv-app li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.sv-app li strong { color: var(--tx); }
.sv-app-visual .phone { width: clamp(220px, 22vw, 290px); }
.sv-app-visual .phone-screen { max-height: 520px; }
@media (max-width: 900px) { .sv-app-grid { grid-template-columns: minmax(0, 1fr); } .sv-app-visual { justify-self: center; } }

/* The long guide stays on the page for search engines and curious readers, folded. */
.sv-guide details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 4px 22px; }
.sv-guide summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-block: 16px; }
.sv-guide summary::-webkit-details-marker { display: none; }
.sv-guide summary h2 { margin: 0; font-size: 20px; }
.sv-guide summary span { color: var(--accent); font-weight: 600; font-size: 15px; white-space: nowrap; }
.sv-guide details[open] summary span { display: none; }
.sv-guide details[open] { padding-bottom: 18px; }
.prose.sv-guide { max-width: 1120px; }
.sv-guide details > :not(summary) { max-width: 68ch; }

/* Our own clear button only: the browser's search field draws a second one. */
.sv-field input[type="search"]::-webkit-search-cancel-button, .sv-field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.sv-field input[type="search"] { -webkit-appearance: none; appearance: none; }
.sv-app h2 { max-width: 24ch; }
.sv-app-visual img { width: clamp(220px, 22vw, 300px); height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)); }
