/* Iris Post Detail — authoritative layout. */
html.iris-post-thread-open .shell>.top{display:none!important}
html.iris-post-thread-open,body.iris-post-thread-open{height:100%;overflow:hidden}
body.iris-post-thread-open{min-height:0;overscroll-behavior:none;background:var(--iris-bg,#fff)}
body.iris-post-thread-open .shell{width:min(100%,620px);height:100dvh;min-height:0;margin:0 auto;padding:0;overflow:hidden}
body.iris-post-thread-open .shell>#app{display:flex;height:100%;min-height:0;flex-direction:column;overflow:hidden}
.post-thread-pane{flex:1 1 auto;height:100%;min-height:0;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden;background:var(--iris-bg,#fff)!important}
.post-thread-screen{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;min-height:0;padding:0;overflow:hidden;box-sizing:border-box;background:var(--iris-bg,#fff);color:var(--iris-text,#211e25)}
.post-thread-header{position:relative;z-index:3;display:grid;grid-template-columns:80px 1fr 80px;align-items:center;min-width:0;min-height:calc(58px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0;background:color-mix(in srgb,var(--iris-bg,#fff) 96%,transparent);border-bottom:1px solid var(--iris-line,#ece8ef);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.post-thread-header h1{margin:0;text-align:center;font-size:18px;letter-spacing:-.3px}
.post-thread-back{min-height:44px;padding:0;border:0;background:transparent;color:var(--iris-accent,#7052e7);font:inherit;font-weight:700;text-align:left}
.post-thread-scroll{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;background:var(--iris-bg,#fff)}
.post-thread-post.home-post.feed-item{margin:0;border-bottom:1px solid var(--iris-line,#ece8ef);background:var(--iris-bg,#fff)}
/* Shared X-inspired, count-free action row; no global theme overrides. */
.home-post .post-actions.home-social-actions{display:flex!important;justify-content:space-between;align-items:center;gap:0;margin:2px 0 0}
.home-post .post-actions.home-social-actions>button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;margin:0!important;border:0;background:transparent;box-shadow:none;color:var(--iris-muted,#817a87);flex:0 0 44px;font-size:0}
.home-social-actions svg{display:block;width:24px;height:24px}
.home-post .post-actions.home-social-actions>.home-like::before,.home-post .post-actions.home-social-actions>.home-replies::before{width:24px;height:24px}
html[data-iris-theme] .home-post .post-actions.home-social-actions>button[aria-pressed="true"]{color:var(--iris-accent,#7052e7)!important}
.home-social-actions>.home-save[aria-pressed="true"] svg{fill:currentColor}
.home-post .post-actions.home-social-actions>button:focus-visible{outline:2px solid var(--iris-accent,#7052e7);outline-offset:1px;border-radius:8px}
.home-reposted-post{display:block;width:100%;min-width:0;padding:12px;border:1px solid var(--iris-line,#ece8ef);border-radius:14px;background:transparent;color:var(--iris-text,#211e25);font:inherit;text-align:left}
.home-repost-handle{color:var(--iris-muted,#817a87);font-size:13px}
.home-repost-caption{margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.home-reposted-post img{display:block;width:100%;height:auto;border-radius:10px}
.home-post .post-caption{overflow-wrap:anywhere}
.post-thread-post.home-post.feed-item{display:block;padding:18px 16px 0}
.post-thread-post .home-post-heading{display:flex;gap:12px;align-items:center;margin:0 0 20px;min-height:48px}
.post-thread-post .home-avatar-button,.post-thread-post .home-avatar{width:48px;height:48px;min-width:48px}
.post-thread-post .home-author{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:3px 5px;flex:1;font-size:16px}
.post-thread-post .home-author strong{max-width:calc(100% - 32px)}
.post-thread-post .home-author .muted{flex:0 0 100%;font-size:14px;line-height:1.4}
.post-thread-post .post-caption{width:100%;margin:0 0 18px;font-size:18px;font-weight:400;line-height:1.5;white-space:pre-wrap}
.post-thread-post .carousel-frame,.post-thread-post .external-video-card{width:100%;margin:0 0 18px}
.post-thread-date{display:block;margin:16px 0 10px;color:var(--iris-muted,#817a87);font-size:13px}
.post-thread-post .post-actions.home-social-actions{padding:5px 0 9px;margin:0;border-top:1px solid var(--iris-line,#ece8ef)}
.post-thread-options{justify-self:end;margin:0;align-self:center}
.post-thread-options .home-post-menu-items{top:44px}
.post-thread-post .post-edited{font-size:12px;color:var(--iris-muted,#817a87)}


.thread-comments{padding:18px 16px 24px}
.thread-comments>h2{margin:0 0 14px;font-size:16px}
.thread-comment-list,.thread-replies{display:grid;gap:0}
.thread-comment-group{position:relative}
.thread-comment{display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;width:100%;margin-left:0;padding:12px 0;border:0}
.thread-comment.is-root{padding-top:14px;padding-bottom:8px}
.thread-comment.is-reply{grid-template-columns:30px minmax(0,1fr);width:calc(100% - 54px);margin-left:54px;padding:9px 0 4px}
.thread-comment.is-root>.inbox-avatar{width:36px;height:36px;min-width:36px;flex-basis:36px}
.thread-comment.is-reply>.inbox-avatar{width:30px;height:30px;min-width:30px;flex-basis:30px}
.thread-comment-body{min-width:0}
.thread-comment-head{display:flex;align-items:baseline;gap:4px;min-width:0}
.thread-comment-author{min-width:0;padding:0;border:0;background:transparent;color:var(--iris-text,#211e25);font:inherit;font-size:13px;font-weight:760;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-comment-badge{width:15px!important;height:15px!important;flex:none}
.thread-comment.is-reply .thread-comment-badge{width:14px!important;height:14px!important}
.thread-comment-handle,.thread-comment-time{color:var(--iris-muted,#817a87);font-size:11px;white-space:nowrap}
.thread-comment-time{margin-left:0}
.thread-comment-text{margin:3px 0;font-size:14px;line-height:1.42;white-space:pre-wrap;overflow-wrap:anywhere}
.thread-comment.is-reply .thread-comment-text{font-size:13.5px}
.thread-comment-image{display:block;width:min(100%,180px);max-height:220px;margin-top:6px;object-fit:cover;border-radius:12px;border:1px solid var(--iris-line,#ece8ef);background:var(--iris-surface-2,#f6f5f8)}
.thread-comment-actions{display:flex;align-items:center;gap:18px;margin-top:3px}
.thread-comment-reply,.thread-comment-delete,.thread-comment-like,.thread-comment-report{min-height:26px;padding:0;border:0;background:transparent;font:inherit;font-size:11px;font-weight:650}
.thread-comment-reply,.thread-comment-like,.thread-comment-report{color:var(--iris-muted,#817a87)}
.thread-comment-delete{color:#b24e5d}
.thread-comment-like{display:inline-flex;align-items:center;gap:4px}
.thread-comment-like-heart{font-size:17px;line-height:1;transform:translateY(-.5px)}
.thread-comment-like.liked{color:var(--iris-accent,#7052e7)}
.thread-comment-like:disabled{opacity:.7}
.thread-replies-toggle{position:relative;display:inline-flex;align-items:center;min-height:30px;margin:1px 0 3px 54px;padding:0 0 0 48px;border:0;background:transparent;color:var(--iris-muted,#817a87);font:inherit;font-size:11px;font-weight:650}
.thread-replies-toggle::before{content:"";position:absolute;left:0;top:50%;width:34px;height:1px;background:var(--iris-line,#d9d5dd)}
.thread-replies .thread-replies-toggle{margin-left:44px}
.thread-comment-deleted-author{color:var(--iris-muted,#817a87);font-size:12px;font-weight:700}
.thread-comment-deleted{margin:3px 0 2px;color:var(--iris-muted,#817a87);font-size:13px;font-style:italic}
.thread-comment-mention{display:inline;padding:0;border:0;background:transparent;color:var(--iris-accent,#7052e7);font:inherit;font-weight:700;line-height:inherit;vertical-align:baseline;cursor:pointer}
.thread-comment-mention:focus-visible{outline:2px solid color-mix(in srgb,var(--iris-accent,#7052e7) 45%,transparent);outline-offset:2px;border-radius:4px}

.thread-comment-form{position:relative;z-index:4;width:100%;min-width:0;margin:0;padding:9px 14px calc(9px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--iris-bg,#fff) 97%,transparent);border-top:1px solid var(--iris-line,#ece8ef);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-sizing:border-box}
.thread-reply-context{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 8px;color:var(--iris-muted,#817a87);font-size:11px}
.thread-reply-context[hidden]{display:none}
.thread-reply-context button{padding:0;border:0;background:transparent;color:var(--iris-accent,#7052e7);font:inherit;font-size:11px;font-weight:700}
.thread-comment-composer{display:flex;gap:8px;align-items:end;width:100%;min-width:0}
.thread-comment-composer.without-gif{grid-template-columns:none}
.thread-comment-input{width:100%;min-width:0;height:44px;min-height:44px;max-height:120px;padding:10px 13px;border:1px solid var(--iris-line,#ece8ef);border-radius:14px;background:var(--iris-surface,#fff);color:var(--iris-text,#211e25);font:inherit;font-size:16px;line-height:22px;resize:none;overflow-y:hidden;box-sizing:border-box}
.thread-comment-input:focus{outline:2px solid var(--iris-accent,#7052e7);outline-offset:0;border-color:var(--iris-accent,#7052e7);box-shadow:none;caret-color:var(--iris-accent,#7052e7)}
.thread-comment-photo,.thread-comment-gif-button{display:grid;place-items:center;width:42px;min-width:42px;max-width:42px;height:42px;padding:0;border:1px solid var(--iris-line,#ece8ef);border-radius:50%;background:var(--iris-surface,#fff);color:var(--iris-accent,#7052e7);font:inherit}
.thread-comment-photo{font-size:20px}
.thread-comment-photo svg{display:block;width:21px;height:21px}
.thread-comment-gif-button{font-size:11px;font-weight:800}
.thread-comment-send{width:auto;min-width:68px;min-height:42px;max-width:max-content;padding:0 15px;border:0;border-radius:999px;background:var(--iris-accent,#7052e7);color:#fff;font:inherit;font-size:13px;font-weight:700;white-space:nowrap}
.thread-comment-preview{padding:8px 50px 0}
.thread-comment-preview:empty{display:none}
.thread-comment-preview img{display:block;width:88px;height:88px;object-fit:cover;border-radius:12px;border:1px solid var(--iris-line,#ece8ef)}
.thread-loading{padding:40px 20px;text-align:center;color:var(--iris-muted,#817a87)}

body.iris-comment-focus #bottom-nav,
body.iris-comment-keyboard-open #bottom-nav{display:none!important}
body.iris-post-thread-open.iris-comment-keyboard-open .post-thread-screen{position:fixed;top:0;right:0;bottom:var(--iris-comment-keyboard-height,0px);left:0;width:min(100%,620px);height:auto;min-height:0;margin:0 auto;padding-bottom:0}
body.iris-post-thread-open.iris-comment-keyboard-open .thread-comment-form{padding-bottom:9px}

@media(max-width:430px){
  .thread-comments{padding-left:14px;padding-right:14px}
  .thread-comment.is-reply{width:calc(100% - 46px);margin-left:46px}
  .thread-replies-toggle{margin-left:46px}
}
@media(max-width:390px){
  .thread-comment-composer{gap:7px}
  .thread-comment-send{min-width:64px;padding-inline:13px}
}
/* Both web and native reserve a real grid row for the floating pill. */
html body #app .post-thread-screen>.thread-comment-form{position:relative!important;inset:auto!important;bottom:auto!important;width:100%!important;margin:0!important}
/* Roomy conversation rows with connected replies, using the active Iris palette. */
.thread-comments{padding:0 16px 24px}
.thread-comments>h2{margin:0;padding:16px 0;font-size:14px;color:var(--iris-muted,#817a87);border-bottom:1px solid var(--iris-line,#ece8ef)}
.thread-comment,.thread-comment.is-root,.thread-comment.is-reply{grid-template-columns:44px minmax(0,1fr);gap:12px;width:100%;margin-left:0;padding:16px 0 4px}
.thread-comment-avatar{display:grid;place-items:center;align-self:start;width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit}
.thread-comment-avatar>.inbox-avatar{width:44px;height:44px;min-width:44px;flex-basis:44px}
.thread-comment-head{align-items:center;gap:4px}
.thread-comment-author{flex-shrink:1;font-size:15px}
.thread-comment-handle{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.thread-comment-time{flex:none;font-size:12px}
.thread-comment-text,.thread-comment.is-reply .thread-comment-text{margin:5px 0 2px;font-size:16px;line-height:1.45}
.thread-comment-actions{justify-content:space-between;gap:12px;margin:0}
.thread-comment-reply,.thread-comment-like{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin-left:-10px}
.thread-comment-actions svg{width:22px;height:22px;display:block}
.thread-comment-like-heart{transform:none}
.thread-comment-like.liked svg{fill:currentColor}
.thread-comment-delete,.thread-comment-report{min-height:44px;font-size:12px}
.thread-comment-list>.is-root-group{border-bottom:1px solid var(--iris-line,#ece8ef)}
.thread-replies{position:relative}
.thread-replies::before{position:absolute;content:"";top:-10px;bottom:38px;left:21px;width:2px;background:var(--iris-line,#ece8ef)}
.thread-replies .thread-replies{margin-left:28px}
.thread-replies-toggle{margin:0 0 0 56px;padding:0;min-height:32px;font-size:12px}
.thread-replies-toggle::before{display:none}
.thread-replies .thread-replies-toggle{margin-left:56px}
.thread-comment-image{width:min(100%,280px);max-height:360px;object-fit:contain}
.thread-empty{margin:20px 0;color:var(--iris-muted,#817a87);font-size:14px}
@media(max-width:359px){
  .post-thread-post.home-post.feed-item,.thread-comments{padding-left:12px;padding-right:12px}
  .post-thread-post .post-caption{font-size:17px}
  .thread-comment,.thread-comment.is-root,.thread-comment.is-reply{grid-template-columns:38px minmax(0,1fr);gap:10px}
  .thread-comment-avatar,.thread-comment-avatar>.inbox-avatar{width:38px;height:38px;min-width:38px;flex-basis:38px}
  .thread-comment-author{font-size:14px}.thread-comment-handle{font-size:12px}.thread-comment-text{font-size:15px}
  .thread-replies::before{left:18px}.thread-replies-toggle{margin-left:48px}
}
@media(min-width:700px){
  .post-thread-screen{border-right:1px solid var(--iris-line,#ece8ef);border-left:1px solid var(--iris-line,#ece8ef)}
  .post-thread-post.home-post.feed-item{padding-inline:22px}.thread-comments{padding-inline:22px}
}

.thread-comment-pin{flex:0 0 16px;margin-left:auto}.thread-comment{touch-action:pan-y;-webkit-touch-callout:none}.thread-comment-menu .inbox-chat-action{justify-content:flex-start}
