/* Glitch Profile - profile app. Only class selectors inside the screen: the damage layer clones it. */
:root {
	--sat: env(safe-area-inset-top, 0px);
	--sab: env(safe-area-inset-bottom, 0px);
	--ink: #000;
	--muted: #737373;
	--line: #dbdbdb;
	--btn: #efefef;
	--blue: #0095f6;
	--red: #ff3040;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #fff; }
body {
	overflow: hidden;
	overscroll-behavior: none;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.3;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; -webkit-user-drag: none; }
svg { display: block; }

#gp-device {
	position: fixed;
	inset: 0;
	overflow: hidden;
	background: #fff;
	isolation: isolate;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
#gp-device[data-theme="dark"] { background: #000; }
.gp-screen { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.gp-status { display: none; }
.gp-noscript { padding: 40px 24px; text-align: center; color: var(--muted); }

/* ---------- views ---------- */
.gp-view {
	position: absolute;
	left: 0; right: 0; top: var(--sat); bottom: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	overflow: hidden;
}
.gp-scroll {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	scrollbar-width: none;
	padding-bottom: calc(96px + var(--sab));
}
.gp-scroll::-webkit-scrollbar { display: none; }

/* screen stack: the profile stays below, a post feed / story opens above it */
.gp-dimmer { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; }
.gp-feed, .gp-story { z-index: 3; }
.gp-feed { box-shadow: -12px 0 32px rgba(0, 0, 0, .16); }
.gp-feed .gp-scroll { touch-action: pan-y; }
.gp-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; z-index: 6; touch-action: none; }

.gp-top {
	flex: none;
	position: relative;
	z-index: 3;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 6px 0 8px;
	background: #fff;
}
.gp-ib { width: 42px; height: 42px; display: grid; place-items: center; }
.gp-ib svg { width: 27px; height: 27px; }
.gp-top-user {
	position: absolute; left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	display: flex; align-items: center; gap: 5px;
	font-weight: 700; font-size: 21px; letter-spacing: -.3px; white-space: nowrap;
}
.gp-lock svg { width: 16px; height: 16px; }
.gp-chev svg { width: 14px; height: 14px; margin-top: 3px; }
.gp-top-r { display: flex; }
.gp-at { font-size: 28px; font-weight: 500; line-height: 1; padding-bottom: 3px; }

/* ---------- profile head ---------- */
.gp-av { display: block; flex: none; border-radius: 50%; overflow: hidden; background: #000; }
.gp-av img { width: 100%; height: 100%; object-fit: cover; }
.gp-av-xl { width: 84px; height: 84px; }
.gp-av-sm { width: 32px; height: 32px; }
.gp-av-md { width: 44px; height: 44px; }
.gp-av-xs { width: 20px; height: 20px; box-sizing: content-box; border: 2px solid #fff; }
.gp-av-nav { width: 30px; height: 30px; }

.gp-head { display: flex; align-items: center; gap: 24px; padding: 8px 14px 0 15px; }
.gp-head-av { position: relative; flex: none; width: 84px; height: 84px; }
.gp-av-add {
	position: absolute; right: -4px; bottom: -3px;
	width: 28px; height: 28px; border-radius: 50%;
	background: #262626; color: #fff; border: 3px solid #fff;
	display: grid; place-items: center;
}
.gp-av-add svg { width: 14px; height: 14px; stroke-width: 3; }
.gp-note {
	position: absolute; left: 1px; top: -27px; z-index: 2;
	max-width: 82px; padding: 6px 10px 7px;
	background: #fff; border-radius: 15px;
	box-shadow: 0 1px 9px rgba(0, 0, 0, .14);
	font-size: 11.5px; line-height: 1.2; color: #8e8e8e; text-align: center;
	overflow-wrap: anywhere;
}
.gp-note::after {
	content: ""; position: absolute; left: 20px; bottom: -8px;
	width: 9px; height: 9px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.gp-head-info { flex: 1; min-width: 0; }
.gp-fullname { font-weight: 600; font-size: 15px; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-stats { display: flex; gap: clamp(16px, 8vw, 40px); }
.gp-stat b { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.gp-stat span { display: block; font-size: 15px; }

.gp-btns { display: flex; gap: 6px; padding: 20px 15px 0; }
.gp-btn {
	flex: 1; height: 32px; border-radius: 8px;
	background: var(--btn); font-weight: 600; font-size: 14.5px;
	display: grid; place-items: center;
}
.gp-btn-sq { flex: none; width: 32px; }
.gp-btn-sq svg { width: 18px; height: 18px; }
.gp-btn-blue { background: var(--blue); color: #fff; }
.gp-btn-chev { display: inline-block; margin-left: 4px; vertical-align: -2px; }
.gp-btn-chev svg { width: 13px; height: 13px; }
.gp-btns .gp-btn { display: flex; align-items: center; justify-content: center; }

/* someone else's profile: header floats over the content */
.gp-top-visit {
	position: absolute; top: 0; left: 0; right: 0; height: 58px;
	justify-content: flex-start; gap: 4px; padding: 0 8px;
	background: #fff; transition: background .2s;
}
.gp-top-visit::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -26px; z-index: -1;
	opacity: 0; transition: opacity .2s;
	background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, 0));
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	-webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent);
}
.gp-top-visit.is-scrolled { background: transparent; }
.gp-top-visit.is-scrolled::before { opacity: 1; }
.gp-top-name { margin-left: 2px; font-size: 21px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-glass { flex: none; width: 44px; height: 44px; border-radius: 50%; transition: background .2s, box-shadow .2s; }
.gp-glass svg { width: 25px; height: 25px; }
.gp-top-visit.is-scrolled .gp-glass {
	background: rgba(255, 255, 255, .86); box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.gp-profile .gp-scroll { padding-top: 58px; padding-bottom: calc(40px + var(--sab)); }
.gp-feed .gp-scroll { padding-bottom: calc(30px + var(--sab)); }

.gp-link { display: flex; align-items: center; gap: 6px; margin: 14px 15px 0; color: #3a5bd9; font-size: 15px; }
.gp-link svg { width: 19px; height: 19px; }
.gp-followed { display: flex; align-items: center; gap: 10px; margin: 14px 15px 0; text-align: left; font-size: 15px; line-height: 1.3; }
.gp-followed-avs { display: flex; flex: none; }
.gp-av-fb { width: 30px; height: 30px; box-sizing: content-box; border: 2px solid #fff; }
.gp-followed-avs .gp-av + .gp-av { margin-left: -12px; }
.gp-followed-t b { font-weight: 600; }

.gp-hls { display: flex; gap: 11px; padding: 18px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.gp-hls::-webkit-scrollbar { display: none; }
.gp-hl { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.gp-hl-ring {
	width: 64px; height: 64px; border-radius: 50%;
	border: 1.5px solid #d6d6d6; padding: 3px;
	display: grid; place-items: center; overflow: hidden;
}
.gp-hl-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.gp-hl-new svg { width: 30px; height: 30px; }
.gp-hl-t { font-size: 12px; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gp-tabs { display: flex; height: 46px; margin-top: 8px; }
.gp-tab { flex: 1; display: grid; place-items: center; color: #8e8e8e; position: relative; }
.gp-tab svg { width: 25px; height: 25px; }
.gp-tab.is-on { color: #000; }
.gp-tab.is-on::after {
	content: ""; position: absolute; bottom: 0; left: 50%;
	width: 58px; margin-left: -29px; height: 1.5px; background: #000;
}

.gp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; }
.gp-tile { position: relative; display: block; aspect-ratio: 3 / 4; background: #efefef; overflow: hidden; }
.gp-tile img, .gp-tile video { width: 100%; height: 100%; object-fit: cover; }
.gp-tile-dead img { image-rendering: pixelated; }
.gp-tile-badge { position: absolute; top: 7px; right: 7px; color: #fff; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .4)); }
.gp-tile-badge svg { width: 20px; height: 20px; }
.gp-credit { margin: 26px 0 0; text-align: center; font-size: 11px; letter-spacing: .3px; color: #b5b5b5; }

.gp-empty { padding: 48px 32px 30px; text-align: center; }
.gp-empty-ic {
	width: 64px; height: 64px; margin: 0 auto 14px;
	border: 2px solid #000; border-radius: 50%;
	display: grid; place-items: center;
}
.gp-empty-ic svg { width: 32px; height: 32px; }
.gp-empty h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.gp-empty p { margin: 0; color: var(--muted); }

/* ---------- glass navigation pill ---------- */
.gp-nav {
	position: absolute; left: 0; right: 0; bottom: calc(10px + var(--sab)); z-index: 4;
	display: flex; justify-content: center; padding: 0 18px;
	pointer-events: none;
}
.gp-nav-pill {
	pointer-events: auto;
	width: 100%; max-width: 380px; height: 58px; border-radius: 29px;
	display: flex; align-items: center; justify-content: space-between;
	padding: 0 4px 0 10px;
	background: rgba(255, 255, 255, .62);
	-webkit-backdrop-filter: blur(18px) saturate(1.8);
	backdrop-filter: blur(18px) saturate(1.8);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .12), inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 0 0 .5px rgba(0, 0, 0, .06);
}
.gp-nav-i { width: 54px; height: 48px; display: grid; place-items: center; position: relative; }
.gp-nav-i svg { width: 27px; height: 27px; }
.gp-dot { position: absolute; right: 12px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.gp-nav-me { width: 80px; height: 50px; border-radius: 25px; background: rgba(0, 0, 0, .07); display: grid; place-items: center; }

/* ---------- post feed ---------- */
.gp-top-feed { height: 60px; justify-content: center; }
.gp-back {
	position: absolute; left: 14px; top: 50%; margin-top: -21px;
	width: 42px; height: 42px; border-radius: 50%;
	background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .13);
	display: grid; place-items: center;
}
.gp-back svg { width: 22px; height: 22px; margin-left: -2px; }
.gp-top-title { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.gp-top-title b { font-size: 17px; }
.gp-top-title span { font-size: 13px; color: #262626; }

.gp-post { padding-bottom: 20px; }
.gp-post-head { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 6px 0 10px; }
.gp-post-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gp-post-who b { font-size: 14px; font-weight: 600; }
.gp-post-who span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-more svg { width: 22px; height: 22px; }

.gp-media { position: relative; width: 100%; background: #efefef; overflow: hidden; }
.gp-car {
	display: flex; width: 100%; height: 100%;
	overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: none;
}
.gp-car::-webkit-scrollbar { display: none; }
.gp-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.gp-slide img, .gp-slide video { width: 100%; height: 100%; object-fit: cover; }
.gp-count {
	position: absolute; top: 12px; right: 12px;
	padding: 4px 9px; border-radius: 13px;
	background: rgba(18, 18, 18, .72); color: #fff; font-size: 12px; font-weight: 500;
}
.gp-tagged {
	position: absolute; left: 12px; bottom: 12px;
	width: 26px; height: 26px; border-radius: 50%;
	background: rgba(18, 18, 18, .72); color: #fff;
	display: grid; place-items: center;
}
.gp-tagged svg { width: 13px; height: 13px; }
.gp-bigheart {
	position: absolute; left: 50%; top: 50%;
	width: 96px; height: 96px; margin: -48px 0 0 -48px;
	color: #fff; opacity: 0; transform: scale(.2); pointer-events: none;
	filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .25));
}
.gp-bigheart svg { width: 100%; height: 100%; }
.gp-bigheart.is-pop { animation: gp-pop 1s ease forwards; }
@keyframes gp-pop {
	0% { opacity: 0; transform: scale(.2); }
	15% { opacity: 1; transform: scale(1.15); }
	30% { transform: scale(.95); }
	45% { transform: scale(1); }
	80% { opacity: 1; transform: scale(1); }
	100% { opacity: 0; transform: scale(.4) translateY(-30px); }
}

.gp-dots { display: flex; justify-content: center; align-items: center; gap: 4px; height: 6px; margin: 14px 0 -20px; position: relative; z-index: 1; pointer-events: none; }
.gp-dots i { width: 6px; height: 6px; border-radius: 50%; background: #dbdbdb; transition: transform .2s, background .2s; }
.gp-dots i.is-on { background: var(--blue); }
.gp-dots i.is-sm { transform: scale(.66); }
.gp-dots i.is-hidden { display: none; }

.gp-actions { display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 10px 0 12px; }
.gp-actions.has-dots { margin-top: 4px; }
.gp-act { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.gp-act svg { width: 26px; height: 26px; }
.gp-act svg + svg { display: none; }
.gp-act.is-on svg:first-child { display: none; }
.gp-act.is-on svg + svg { display: block; }
.gp-act[data-act="like"].is-on { color: var(--red); animation: gp-bump .35s; }
@keyframes gp-bump { 40% { transform: scale(1.25); } }
.gp-sp { flex: 1; }
.gp-liked { display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 14px; text-align: left; }
.gp-liked-avs { display: flex; }
.gp-liked-avs .gp-av + .gp-av { margin-left: -9px; }
.gp-caption { padding: 5px 12px 0; font-size: 14px; }
.gp-date { display: block; padding: 5px 12px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- likes sheet ---------- */
.gp-sheet-wrap { position: absolute; inset: 0; z-index: 8; }
.gp-sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .25s; }
.gp-sheet {
	position: absolute; left: 0; right: 0; bottom: 0; max-height: 72%;
	display: flex; flex-direction: column;
	background: #fff; border-radius: 14px 14px 0 0;
	padding-bottom: calc(14px + var(--sab));
	transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.gp-sheet-wrap.is-open .gp-sheet-bg { opacity: 1; }
.gp-sheet-wrap.is-open .gp-sheet { transform: none; }
.gp-grab { display: block; width: 36px; height: 4px; margin: 8px auto 4px; border-radius: 2px; background: #c7c7c7; }
.gp-sheet-h { padding: 8px 0 12px; text-align: center; font-weight: 700; font-size: 16px; border-bottom: .5px solid var(--line); }
.gp-sheet-list { overflow-y: auto; padding: 6px 0; }
.gp-person { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.gp-person-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gp-person-t b { font-weight: 600; }
.gp-person-t span { color: var(--muted); }
.gp-person .gp-btn { flex: none; width: 104px; }

/* ---------- stories ---------- */
.gp-story { background: #000; color: #fff; }
.gp-story-card { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 10px; overflow: hidden; background: #161616; touch-action: none; }
.gp-story-media, .gp-story-media img, .gp-story-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gp-story-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .38), transparent 17%, transparent 80%, rgba(0, 0, 0, .32)); }
.gp-story-bars { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 2; display: flex; gap: 2px; }
.gp-story-bars i { flex: 1; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.gp-story-bars b { display: block; height: 100%; width: 0; background: #fff; }
.gp-story-head { position: absolute; top: 18px; left: 10px; right: 4px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.gp-story-av { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #333; }
.gp-story-av img { width: 100%; height: 100%; object-fit: cover; }
.gp-story-name { font-weight: 600; font-size: 14px; }
.gp-story-date { flex: 1; font-size: 14px; opacity: .92; padding-left: 26px; }
.gp-story-x { width: 44px; height: 44px; display: grid; place-items: center; }
.gp-story-x svg { width: 30px; height: 30px; }
.gp-story-say { position: absolute; left: 12px; bottom: 22px; z-index: 2; font-size: 14px; color: rgba(255, 255, 255, .78); pointer-events: none; }
.gp-story-hearts { position: absolute; left: 80px; bottom: 30px; z-index: 2; width: 70px; height: 70px; pointer-events: none; }
.gp-story-hearts span { position: absolute; display: block; animation: gp-float 3.2s ease-in-out infinite; }
.gp-story-hearts span:first-child { left: 0; bottom: 0; width: 34px; height: 34px; }
.gp-story-hearts span:last-child { left: 34px; bottom: 30px; width: 22px; height: 22px; animation-delay: -1.4s; }
@keyframes gp-float { 50% { transform: translateY(-6px) rotate(-6deg); } }
.gp-story-bar { flex: none; display: flex; align-items: flex-start; gap: 16px; height: calc(68px + var(--sab)); padding: 6px 14px 0 18px; }
.gp-story-bar button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 50px; padding-top: 6px; font-size: 12px; }
.gp-story-bar svg { width: 26px; height: 26px; }

/* ---------- desktop: show it inside a phone ---------- */
@media (min-width: 700px) {
	html, body { background: radial-gradient(120% 90% at 50% 0%, #26262b 0%, #0b0b0d 70%); }
	body { display: flex; align-items: center; justify-content: center; }
	#gp-device {
		position: relative; inset: auto; flex: none;
		width: 393px; height: 852px;
		transform: scale(var(--gp-scale, 1));
		border-radius: 52px;
		box-shadow: 0 0 0 10px #050506, 0 0 0 12px #2c2c30, 0 40px 90px rgba(0, 0, 0, .65);
		--sat: 50px;
		--sab: 18px;
	}
	.gp-status {
		display: flex; position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 50px;
		align-items: center; justify-content: space-between;
		padding: 4px 30px 0 46px; font-size: 16px; font-weight: 600;
	}
	.gp-island { position: absolute; left: 50%; top: 11px; width: 118px; height: 34px; margin-left: -59px; border-radius: 20px; background: #000; }
	.gp-sb-r { display: flex; align-items: center; gap: 6px; font-size: 14px; }
	.gp-sb-bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
	.gp-sb-bars i { width: 3px; border-radius: 1px; background: currentColor; }
	.gp-sb-bars i:nth-child(1) { height: 4px; } .gp-sb-bars i:nth-child(2) { height: 6px; }
	.gp-sb-bars i:nth-child(3) { height: 8px; opacity: .35; } .gp-sb-bars i:nth-child(4) { height: 11px; opacity: .35; }
	.gp-sb-bat { position: relative; width: 25px; height: 12px; border-radius: 4px; border: 1.5px solid currentColor; opacity: .9; }
	.gp-sb-bat i { position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 55%; border-radius: 1.5px; background: currentColor; }
	#gp-device[data-theme="dark"] .gp-status { color: #fff; }
	#gp-device::after {
		content: ""; position: absolute; left: 50%; bottom: 7px; z-index: 30;
		width: 134px; height: 5px; margin-left: -67px; border-radius: 3px;
		background: #000; pointer-events: none;
	}
	#gp-device[data-theme="dark"]::after { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
	.gp-story-hearts span { animation: none; }
}
