/* Social, alive: likes, comments and stories inside the phone (r2/social-live.js) */
#social .screen { position: relative; }
.igp .acts button { all: unset; cursor: pointer; display: inline-flex; border-radius: 6px; }
.igp .acts button:focus-visible { outline: 2px solid #2b6cff; outline-offset: 2px; }
.igp .acts > span { display: inline-flex; gap: 14px; align-items: center; }
.igp .ig-like.on svg { fill: #ff3040; stroke: #ff3040; }
.igp .ig-like.on { animation: ig-pop 320ms cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ig-pop { 40% { transform: scale(1.25); } }
.igp .ig-n { margin: 0; padding: 0 12px; font-size: 13.5px; font-weight: 600; }
.igp .ig-all { all: unset; cursor: pointer; display: block; padding: 2px 12px 10px; font-size: 13.5px; color: #737373; }
.igp .ig-all[hidden] { display: none; }
.igp { position: relative; }
.ig-burst { position: absolute; left: 50%; top: 0; pointer-events: none; color: #fff; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); animation: ig-burst 760ms cubic-bezier(.2, .9, .3, 1) forwards; }
.ig-burst svg { fill: #fff; stroke: none; display: block; }
@keyframes ig-burst { 0% { transform: translate(-50%, 0) scale(.2); opacity: 0; } 25% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 45% { transform: translate(-50%, 0) scale(.95); } 80% { opacity: 1; } 100% { transform: translate(-50%, 0) scale(1); opacity: 0; } }

/* comments: a sheet from the bottom of the phone */
.ig-sheet { position: absolute; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0); transition: background 260ms; display: flex; align-items: flex-end; }
.ig-sheet.in { background: rgba(0, 0, 0, .4); }
.ig-sheet[hidden] { display: none; }
.ig-sh-in { position: relative; width: 100%; height: 72%; background: #fff; color: #000; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 260ms cubic-bezier(.22, 1, .36, 1); font-size: 13.5px; }
.ig-sheet.in .ig-sh-in { transform: none; }
.ig-grab { display: block; width: 36px; height: 4px; border-radius: 4px; background: #dbdbdb; margin: 8px auto 4px; }
.ig-sh-t { text-align: center; padding: 6px 0 10px; border-bottom: 1px solid #efefef; font-weight: 700; }
.ig-sh-x { all: unset; cursor: pointer; position: absolute; right: 10px; top: 12px; display: flex; }
.ig-list { list-style: none; margin: 0; padding: 12px 14px; flex: 1; overflow: auto; overscroll-behavior: contain; display: grid; gap: 12px; align-content: start; }
.ig-list li { line-height: 1.35; overflow-wrap: anywhere; }
.ig-list small { color: #737373; margin-left: 4px; }
.ig-list .ig-none { color: #737373; text-align: center; padding-top: 30px; }
.ig-form { border-top: 1px solid #efefef; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.ig-form input { font: inherit; font-size: 16px; border: 0; outline: 0; background: transparent; min-width: 0; }
.ig-hl { display: flex; align-items: center; gap: 2px; color: #737373; font-size: 13px; }
.ig-hl input { font-size: 14px; color: #000; flex: 1; }
.ig-row { display: flex; align-items: center; gap: 8px; border: 1px solid #dbdbdb; border-radius: 22px; padding: 8px 12px; }
.ig-row input { flex: 1; }
.ig-row button { all: unset; cursor: pointer; color: #0095f6; font-weight: 600; font-size: 14px; }
.ig-row button:disabled { opacity: .4; }
.ig-err { margin: 0; color: #ed4956; font-size: 12.5px; }

/* captions, and carousels: count top right, dots under the picture, arrows for a pointer */
.igp .ig-cap { white-space: pre-line; overflow-wrap: anywhere; }
.igp .ph { position: relative; }
.igp .ph > img { width: 100%; height: auto; display: block; }
.ig-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; aspect-ratio: var(--r); }
.ig-track::-webkit-scrollbar { display: none; }
.ig-track:focus-visible { outline: 2px solid #2b6cff; outline-offset: -2px; }
.ig-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; scroll-snap-stop: always; user-select: none; }
.ig-count { position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: 20px; background: rgba(18, 18, 18, .72); color: #fff; font-size: 12px; line-height: 1.2; font-variant-numeric: tabular-nums; pointer-events: none; }
.ig-arr { all: unset; position: absolute; top: 50%; translate: 0 -50%; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .86); color: #111; display: grid; place-items: center; cursor: pointer; }
.ig-arr[hidden] { display: none; }
.ig-arr.prev { left: 8px; } .ig-arr.next { right: 8px; }
.ig-arr:focus-visible { outline: 2px solid #2b6cff; outline-offset: 2px; }
@media (hover: none) { .ig-arr { display: none; } }
.igp .acts { position: relative; align-items: center; }
.igp .acts > span.ig-dots { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 50px; overflow: hidden; display: block; margin-top: 2px; pointer-events: none; }
.igp .acts .ig-dots > span { display: flex; gap: 4px; width: max-content; transition: transform 220ms; }
.igp .acts .ig-dots:has(i:nth-child(-n+4):last-child) > span { margin-inline: auto; }
.ig-dots i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #c7c7c7; transition: scale 220ms, background 220ms; }
.ig-dots i.on { background: #4a68f5; }
.ig-dots i.small { scale: .55; }

/* a Reel, after the owner's template: Reels and the camera on top, the actions up the right, who and the words below */
.ig-reel .ph { background: #000; aspect-ratio: 9 / 16; max-height: var(--feed-h, none); width: 100%; color: #fff; }
.ig-reel video { width: 100%; height: 100%; object-fit: contain; display: block; }
.ig-reel .ph::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); pointer-events: none; }
.rl-side, .rl-foot { z-index: 1; }
.rl-top { position: absolute; left: 25px; right: 15px; top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: 23px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.ig-reel .rl-side { position: absolute; right: 12px; bottom: 18px; width: 36px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.rl-side > span:empty { display: none; }
.rl-side > svg { margin-top: 12px; }
.ig-reel .rl-side button { all: unset; cursor: pointer; display: flex; }
.ig-reel .rl-side button.ig-com { margin-top: 12px; }
.ig-reel .rl-side button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rl-sq { width: 27px; height: 27px; margin-top: 12px; border-radius: 7px; background: rgba(255, 255, 255, .4); display: grid; place-items: center; }
.rl-foot { position: absolute; left: 14px; right: 60px; bottom: 16px; font-size: 13px; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.rl-who { display: flex; align-items: center; gap: 8px; }
.rl-who .av { width: 34px; height: 34px; border-radius: 50%; padding: 1.5px; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); flex: none; }
.rl-who .av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.rl-who div { display: grid; min-width: 0; line-height: 1.3; }
.rl-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-who small { font-size: 11px; white-space: nowrap; }
.rl-follow { flex: none; margin-left: 6px; padding: 4px 9px; border: 1.5px solid #fff; border-radius: 8px; font-weight: 700; font-size: 12px; }
.ig-reel .rl-foot p { margin: 8px 0 0; padding: 0; font-size: 12.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* stories: a story file fills the screen uncut; a post is shown as a shared post on the account's colour */
.ig-story { position: absolute; inset: 0; z-index: 40; background: #000; color: #fff; opacity: 0; transform: scale(.96); transition: opacity 220ms, transform 220ms cubic-bezier(.22, 1, .36, 1); }
.ig-story.in { opacity: 1; transform: none; }
.ig-story[hidden] { display: none; }
.ig-st-bars { position: absolute; left: 8px; right: 8px; top: 50px; z-index: 2; display: flex; gap: 3px; }
.ig-st-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; position: relative; }
.ig-st-bars i::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(var(--k, 0)); }
.ig-story header { position: absolute; left: 0; right: 0; top: 58px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.ig-story header .av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: block; background: #fff; }
.ig-story header .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-story header b { font-size: 13.5px; }
.ig-st-x { all: unset; cursor: pointer; margin-left: auto; display: flex; }
.ig-st-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ig-story.shared .ig-st-media { padding-top: 66px; box-sizing: border-box; }
.ig-full { width: 100%; height: 100%; object-fit: contain; display: block; }
.ig-share { margin: 0; flex: none; background: #fff; color: #262626; border-radius: 13px; overflow: hidden; text-align: left; direction: ltr; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.ig-sh-h { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 8px; font-size: 12.5px; }
.ig-sh-h img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.ig-sh-ph { position: relative; }
.ig-sh-ph img { display: block; width: 100%; height: auto; }
.ig-stack { position: absolute; top: 11px; right: 11px; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .35)); }
.ig-share figcaption { margin: 8px; font-size: 12.5px; line-height: 1.4; max-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.ig-share figcaption b { margin-right: 10px; }
.ig-st-prev, .ig-st-next { all: unset; position: absolute; top: 100px; bottom: 0; z-index: 1; cursor: pointer; }
.ig-st-prev { left: 0; width: 34%; } .ig-st-next { right: 0; width: 66%; }
@media (prefers-reduced-motion: reduce) { .ig-sheet, .ig-sh-in, .ig-story, .ig-dots i, .ig-dots > span { transition: none !important; } .igp .ig-like.on { animation: none; } }
