/* Shared homepage/profile viewer. Consolidated from the existing homepage styles. */


















.post-overlay-backdrop{position: fixed; inset: 0px; z-index: 160; display: none; background: rgba(15, 13, 25, 0.48); backdrop-filter: blur(7px);}
.post-overlay-backdrop.open{display: block;}
.post-overlay-shell{position: fixed; inset: 50% auto auto 50%; z-index: 161; width: min(940px, -30px + 100vw); height: min(680px, -40px + 100vh); display: none; grid-template-columns: minmax(0px, 1fr); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 26px; background: rgb(255, 255, 255); box-shadow: rgba(0, 0, 0, 0.28) 0px 35px 100px; transform: translate(-50%, -50%); transition: grid-template-columns 0.32s, width 0.32s;}
.post-overlay-shell.open{display: grid;}
.post-overlay-shell.comments-open{width: min(1180px, -30px + 100vw); grid-template-columns: minmax(0px, 1fr) 390px;}
.post-overlay-main{position: relative; min-width: 0px; display: flex; flex-direction: column; padding: 25px; overflow: auto; transition: transform 0.32s;}
.post-overlay-shell.comments-open .post-overlay-main{transform: translateX(8px);}
.post-overlay-close{position: absolute; top: 15px; right: 15px; z-index: 4; width: 39px; height: 39px; border: 0px; border-radius: 50%; background: rgb(242, 242, 242); font-size: 25px;}
.overlay-author{display: flex; align-items: center; gap: 11px; padding-right: 48px; color: rgb(17, 17, 17); text-decoration: none;}
.overlay-author-copy{display: grid;}
.overlay-author-copy small{color: rgb(119, 119, 119);}
.overlay-content{flex: 1 1 0%; display: grid; align-content: center; padding: 35px 10px 26px;}
.overlay-content h2{margin: 0px 0px 15px; font: 500 clamp(38px, 5vw, 64px) Georgia, serif; letter-spacing: -0.045em;}
.overlay-content p{margin: 0px; color: rgb(68, 68, 68); font-size: 19px; line-height: 1.65; white-space: pre-wrap;}
.overlay-tags{margin-top: 20px; color: var(--purple); font-weight: 850;}
.overlay-actions{display: flex; flex-wrap: wrap; gap: 9px; padding-top: 17px; border-top: 1px solid var(--line);}
.overlay-action{display: flex; align-items: center; gap: 8px; padding: 11px 15px; border: 0px; border-radius: 999px; background: rgb(241, 241, 241); font-weight: 900;}
.overlay-action:hover{background: rgb(234, 229, 255); color: var(--purple);}
.overlay-action.active{background: rgb(233, 229, 255); color: var(--purple);}
.overlay-action.like.active{background: rgb(231, 236, 255); color: rgb(85, 113, 255);}
.overlay-action.comment.active{background: rgb(243, 233, 255); color: rgb(115, 88, 255);}
.post-comments-drawer{min-width: 0px; display: none; grid-template-rows: auto 1fr auto; border-left: 1px solid var(--line); background: rgb(251, 251, 253); opacity: 0; transform: translateX(24px); transition: opacity 0.3s, transform 0.3s;}
.post-overlay-shell.comments-open .post-comments-drawer{display: grid; opacity: 1; transform: translateX(0px);}
.post-comments-head{display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line);}
.post-comments-head h3{margin: 0px; font: 500 25px Georgia, serif;}
.post-comments-head button{width: 34px; height: 34px; border: 0px; border-radius: 50%; background: rgb(238, 238, 238); font-size: 20px;}
.post-comments-list{overflow: auto; padding: 16px;}
.post-comment{display: grid; grid-template-columns: 39px 1fr; gap: 10px; margin-bottom: 18px;}
.post-comment-avatar{width: 39px; height: 39px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg,var(--purple),var(--pink)); color: rgb(255, 255, 255); font-weight: 900;}
.post-comment-avatar img{width: 100%; height: 100%; object-fit: cover;}
.post-comment-body p{margin: 4px 0px 7px; line-height: 1.45;}
.post-comment-meta{display: flex; gap: 12px; align-items: center; color: rgb(119, 119, 119); font-size: 12px;}
.post-comment-meta button{padding: 0px; border: 0px; background: transparent; color: inherit; font-size: 12px; font-weight: 850;}
.post-comment-meta button.active{color: rgb(85, 113, 255);}
.comment-replies{display: grid; gap: 11px; margin-top: 13px; padding-left: 10px; border-left: 2px solid rgb(230, 225, 255);}
.comment-reply .post-comment-avatar{width: 30px; height: 30px; font-size: 11px;}
.reply-form{display: none; gap: 7px; margin-top: 9px;}
.reply-form.open{display: flex;}
.reply-form input{min-width: 0px; flex: 1 1 0%; padding: 8px 10px; border: 1px solid rgb(204, 204, 204); border-radius: 999px;}
.reply-form button{padding: 0px 11px; border: 0px; border-radius: 999px; background: rgb(17, 17, 17); color: rgb(255, 255, 255); font-weight: 850;}
.post-comment-form{display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: rgb(255, 255, 255);}
.post-comment-form input{min-width: 0px; flex: 1 1 0%; padding: 11px 14px; border: 1px solid rgb(204, 204, 204); border-radius: 999px; font-size: 16px;}
.post-comment-form button{padding: 0px 15px; border: 0px; border-radius: 999px; background: rgb(17, 17, 17); color: rgb(255, 255, 255); font-weight: 900;}
.post-comments-empty{padding: 45px 15px; text-align: center; color: rgb(119, 119, 119);}
.post-comments-caption{display: grid; grid-template-columns: 39px 1fr; gap: 10px; padding: 0px 0px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line);}
.post-comments-caption .post-comment-avatar{width: 39px; height: 39px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg,var(--purple),var(--pink)); color: rgb(255, 255, 255); font-weight: 900;}
.post-comments-caption .post-comment-avatar img{width: 100%; height: 100%; object-fit: cover;}
.post-comments-caption p{margin: 4px 0px 0px; line-height: 1.45;}
@media (max-width: 850px){.post-overlay-shell:not(.normal-post-open), .post-overlay-shell.comments-open:not(.normal-post-open){height: min(760px, -20px + 100vh); grid-template-columns: 1fr;}
.post-overlay-shell.comments-open:not(.normal-post-open){grid-template-rows: minmax(280px, 0.8fr) minmax(300px, 1.2fr);}
.post-overlay-shell:not(.normal-post-open) .post-comments-drawer{border-left: 0px; border-top: 1px solid var(--line);}
.post-overlay-shell:not(.normal-post-open) .post-overlay-main{padding: 20px;}
.post-overlay-shell:not(.normal-post-open) .overlay-content{padding: 28px 5px 20px;}}
@media (max-width: 650px){.post-overlay-shell:not(.normal-post-open){max-height: 100dvh; border: 0px; inset: 0px !important; width: 100% !important; height: 100dvh !important; border-radius: 0px !important; transform: none !important;}
.post-overlay-shell.open:not(.normal-post-open){display: block !important;}
.post-overlay-shell.comments-open:not(.normal-post-open){width: 100% !important;}
.post-overlay-shell:not(.normal-post-open) .post-overlay-main{display: none;}
.post-overlay-shell:not(.normal-post-open) .overlay-content{position: absolute; inset: 0px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 0 76px calc(26px + env(safe-area-inset-bottom,0px)) 14px; background: linear-gradient(160deg, rgb(44, 36, 64), rgb(20, 16, 31));}
.post-overlay-shell:not(.normal-post-open) .overlay-content::after{content: ""; position: absolute; inset: auto 0px 0px; height: 60%; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); z-index: 1; pointer-events: none;}
.post-overlay-shell:not(.normal-post-open) .overlay-media-gallery, .post-overlay-shell:not(.normal-post-open) .overlay-media-main{z-index: 0; display: flex; align-items: center; justify-content: center; position: absolute !important; inset: 0px !important; width: 100% !important; height: 100% !important; aspect-ratio: auto !important; overflow: visible !important; border-radius: 0px !important; background: transparent !important;}
.post-overlay-shell:not(.normal-post-open) .overlay-media-main img, .post-overlay-shell:not(.normal-post-open) .overlay-media-main video{width: 100%; height: 100%; object-position: center center; object-fit: contain !important;}
.post-overlay-shell:not(.normal-post-open) .overlay-media-thumbs{position: relative; z-index: 2;}
.post-overlay-shell:not(.normal-post-open) .overlay-content h2, .post-overlay-shell:not(.normal-post-open) .overlay-content p, .post-overlay-shell:not(.normal-post-open) .overlay-tags, .post-overlay-shell:not(.normal-post-open) .overlay-read-more{position: relative; z-index: 2; color: rgb(255, 255, 255);}
.post-overlay-shell:not(.normal-post-open) .overlay-content .post-poll{position: relative; z-index: 2;}
.post-overlay-shell:not(.normal-post-open) .overlay-content h2{font-size: 19px; margin: 0px; max-height: 70px; overflow: hidden;}
.post-overlay-shell:not(.normal-post-open) .overlay-content p{font-size: 14px; color: rgb(238, 238, 238); margin: 0px; max-height: 60px; overflow: hidden;}
.post-overlay-shell:not(.normal-post-open) .overlay-author{position: relative; z-index: 2; flex: 0 0 auto; margin: 0px; padding-right: 0px; color: rgb(255, 255, 255);}
.post-overlay-shell:not(.normal-post-open) .overlay-author-copy small{color: rgb(221, 221, 221);}
.post-overlay-shell:not(.normal-post-open) .post-overlay-close{z-index: 4; background: rgba(0, 0, 0, 0.4); color: rgb(255, 255, 255);}
.post-overlay-shell:not(.normal-post-open) .overlay-actions{position: absolute; right: 8px; bottom: calc(90px + env(safe-area-inset-bottom,0px)); z-index: 3; flex-flow: column; gap: 16px; padding: 0px; border: 0px;}
.post-overlay-shell:not(.normal-post-open) .overlay-action{flex-direction: column; gap: 2px; min-width: 44px; padding: 8px 6px; border-radius: 16px; font-size: 10px; font-weight: 800; background: rgba(0, 0, 0, 0.34) !important; color: rgb(255, 255, 255) !important;}
.post-overlay-shell:not(.normal-post-open) .overlay-action span{display: none;}
.post-overlay-shell:not(.normal-post-open) .overlay-action img{width: 24px; height: 24px;}
.post-overlay-shell:not(.normal-post-open) .post-comments-drawer{position: absolute; inset: auto 0px 0px; z-index: 5; height: 70dvh; max-height: 70dvh; overflow: hidden; border-left: 0px; border-top: 1px solid var(--line); border-radius: 20px 20px 0px 0px; transform: translateY(105%); transition: transform 0.28s; display: grid;}
.post-overlay-shell.comments-open:not(.normal-post-open) .post-comments-drawer{transform: translateY(0px);}
.post-overlay-shell:not(.normal-post-open) .post-comments-list{min-height: 0px; padding-bottom: calc(80px + env(safe-area-inset-bottom,0px));}
.post-overlay-shell:not(.normal-post-open) .post-comment-form{position: absolute; inset: auto 0px 0px; z-index: 2; padding-bottom: calc(12px + env(safe-area-inset-bottom,0px));}}
.theme-dark .video-card-title, .theme-dark .post-card-title, .theme-dark .overlay-author, .theme-dark .story-name, .theme-dark #overlayPostTitle{color: rgb(247, 247, 247);}
.theme-dark .video-card-creator, .theme-dark .video-card-meta, .theme-dark .post-card-creator, .theme-dark .post-card-meta, .theme-dark .overlay-author-copy small, .theme-dark .post-comment-meta, .theme-dark .conversation-preview, .theme-dark .post-head small, .theme-dark .story-shelf-head small{color: rgb(167, 167, 167);}
.theme-dark .post-card-actions button, .theme-dark .overlay-action, .theme-dark .video-card-menu:hover{background: rgb(36, 36, 36); color: rgb(247, 247, 247);}
.theme-dark .post-card-actions button:hover, .theme-dark .post-card-actions button.active, .theme-dark .overlay-action:hover, .theme-dark .overlay-action.active{background: rgb(51, 43, 92); color: rgb(201, 190, 255);}
.theme-dark .modal-box, .theme-dark .post-overlay-shell, .theme-dark .messages-panel, .theme-dark .side-panel, .theme-dark .notification-panel{background: rgb(25, 25, 25); color: rgb(247, 247, 247);}
.theme-dark .post-overlay-close, .theme-dark .close-modal, .theme-dark .close-panel, .theme-dark .story-close, .theme-dark .post-comments-head button{background: rgb(41, 41, 41); color: rgb(247, 247, 247);}
.theme-dark .overlay-content p, .theme-dark .story-upload-box textarea{color: rgb(213, 213, 213);}
.theme-dark .post-comments-drawer{background: rgb(20, 20, 20); border-color: rgb(58, 58, 58);}
.theme-dark .post-comment-form, .theme-dark .chat-form, .theme-dark .panel-header, .theme-dark .conversation-column, .theme-dark .post-comments-head{background: rgb(25, 25, 25); border-color: rgb(58, 58, 58);}
.overlay-media img{max-width: 100%; max-height: 55vh; object-fit: contain; border-radius: 16px;}


.overlay-media-gallery{display: grid; gap: 10px;}
.overlay-media-gallery[hidden]{display: none;}
.overlay-media-main{position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: rgb(17, 17, 17);}
.overlay-media-main img, .overlay-media-main video, .overlay-media-main iframe{width: 100%; height: 100%; border: 0px; object-fit: contain; background: rgb(17, 17, 17);}
.overlay-media-thumbs{display: flex; align-items: center; gap: 8px;}
.overlay-media-thumbs-track{display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; padding: 2px;}
.overlay-media-thumbs-track::-webkit-scrollbar{display: none;}
.overlay-media-thumb{flex: 0 0 78px; width: 78px; height: 78px; padding: 0px; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: rgb(238, 238, 238); cursor: pointer;}
.overlay-media-thumb img{width: 100%; height: 100%; object-fit: cover;}
.overlay-media-thumb.active{border-color: var(--purple);}
.overlay-read-more{display: inline-block; margin-top: 8px; border: 0px; background: transparent; color: var(--purple); font-weight: 800; cursor: pointer; padding: 0px;}
@media (max-width: 650px){.post-overlay-shell.normal-post-open{max-height: calc(100dvh - 24px); inset: 12px !important; width: calc(-24px + 100vw) !important; height: calc(100dvh - 24px) !important; border-radius: 20px !important; transform: none !important;}
.post-overlay-shell.normal-post-open .post-overlay-main{min-height: 0px; padding: 16px 14px calc(14px + env(safe-area-inset-bottom,0px)); overflow: auto; background: var(--mp-surface,#fff); display: flex !important;}
.post-overlay-shell.normal-post-open .overlay-author{padding-right: 48px; color: var(--mp-text,#211b28);}
.post-overlay-shell.normal-post-open .overlay-author-copy small{color: var(--mp-muted,#777);}
.post-overlay-shell.normal-post-open .overlay-content{display: block; flex: 0 0 auto; padding: 18px 0px 14px;}
.post-overlay-shell.normal-post-open .overlay-content h2{margin: 0px 0px 10px; color: var(--mp-text,#211b28); font-size: clamp(20px, 6vw, 30px); line-height: 1.2; letter-spacing: -0.025em;}
.post-overlay-shell.normal-post-open .overlay-content p{margin: 0px; color: var(--mp-text,#444); font-size: 14px; line-height: 1.5; white-space: pre-wrap;}
.post-overlay-shell.normal-post-open .overlay-media-main{position: relative; inset: auto; width: 100%; height: min(52dvh, 480px); aspect-ratio: auto; border-radius: 16px; background: rgb(17, 17, 17); overflow: hidden;}
.post-overlay-shell.normal-post-open .overlay-media-main img, .post-overlay-shell.normal-post-open .overlay-media-main video, .post-overlay-shell.normal-post-open .overlay-media-main iframe{width: 100%; height: 100%; object-fit: contain;}
.post-overlay-shell.normal-post-open .overlay-actions{position: static; display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 6px; padding: 12px 0px 0px; border-top: 1px solid var(--mp-line,#e6e6e6);}
.post-overlay-shell.normal-post-open .overlay-action{justify-content: center; min-width: 0px; padding: 9px 5px; background: var(--mp-bg,#f3f3f3); color: var(--mp-text,#211b28); font-size: 10px;}
.post-overlay-shell.normal-post-open .overlay-action span{display: inline;}
.post-overlay-shell.normal-post-open .overlay-action img{width: 20px; height: 20px;}
.post-overlay-shell.normal-post-open .post-comments-drawer{position: absolute; inset: auto 0px 0px; z-index: 5; height: 68%; max-height: 68%; border-right: 0px; border-bottom: 0px; border-left: 0px; border-image: none; border-top: 1px solid var(--mp-line,#e6e6e6); border-radius: 18px 18px 0px 0px; display: grid; background: var(--mp-surface,#fff); transform: translateY(105%); transition: transform 0.25s;}
.post-overlay-shell.normal-post-open.comments-open .post-comments-drawer{transform: translateY(0px);}
.post-overlay-shell.normal-post-open .post-comments-list{min-height: 0px; overflow: auto; padding: 14px 14px calc(78px + env(safe-area-inset-bottom,0px));}
.post-overlay-shell.normal-post-open .post-comment-form{position: absolute; inset: auto 0px 0px; z-index: 2; padding: 10px 12px calc(10px + env(safe-area-inset-bottom,0px)); background: var(--mp-surface,#fff);}
.post-overlay-shell.normal-post-open .post-comment-form input{font-size: 16px;}}
.overlay-media-gallery{position: relative;}
.has-collab-context .post-overlay-main{padding-bottom: 160px;}
@media (max-width: 650px){.has-collab-context .post-overlay-main{padding-bottom: 260px;}}
















.overlay-media-gallery{position: relative;}
.has-collab-context .post-overlay-main{padding-bottom: 160px;}
@media (max-width: 650px){.has-collab-context .post-overlay-main{padding-bottom: 260px;}}









#postOverlay [hidden]{display:none!important}

/* Keep theme tokens and button metrics identical across both entry points. */
#postOverlay{--mp-surface:#fff;--mp-bg:#f3f3f3;--mp-text:#211b28;--mp-muted:#777;--mp-line:#e6e6e6}
.theme-dark #postOverlay{--mp-surface:#1e1c28;--mp-bg:#14131b;--mp-text:#f4f1fa;--mp-muted:#aba6b7;--mp-line:#393444}
#postOverlay .overlay-action{border:0;min-height:0}
#postOverlay .overlay-action img{width:24px;height:24px;min-width:24px;max-width:24px;flex:0 0 24px}
@media(max-width:650px){#postOverlay .overlay-action img{width:20px;height:20px;min-width:20px;max-width:20px;flex:0 0 20px}}
