/* Patiyiz / 31 Ekim: compact story actions, touch-first DM and premium compose. */

/* Keep story controls thumb-friendly without covering the story. */
#story-overlay .pati-own-story-footer .story-viewers-button.pati-story-viewer-preview{
  display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
  flex:0 1 auto!important;width:auto!important;min-width:0!important;max-width:min(178px,52vw)!important;
  min-height:34px!important;padding:5px 9px!important;gap:5px!important;
  border-radius:13px!important;font-size:11px!important;line-height:1.15!important;
  box-sizing:border-box!important;
}
#story-overlay .pati-story-viewer-preview .pati-story-viewer-preview-stack{
  flex:none!important;max-width:41px!important;transform:scale(.82);transform-origin:left center;
}
#story-overlay .pati-story-viewer-preview .pati-story-viewer-preview-label{
  font-size:11px!important;line-height:1.2!important;white-space:nowrap!important;
}
#story-overlay .pati-story-viewer-preview .pati-story-viewer-preview-status{
  font-size:10px!important;line-height:1.15!important;max-width:64px!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
@media(max-width:390px){
  #story-overlay .pati-own-story-footer .pati-story-viewer-preview{max-width:142px!important;min-height:32px!important;padding:4px 7px!important}
  #story-overlay .pati-story-viewer-preview .pati-story-viewer-preview-status{max-width:42px!important}
}

/* Remove old always-visible buttons; reactions and options live on long press. */
#main-content .pati-dm-layout .pati-dm-msg-tools{display:none!important}
#main-content .pati-dm-layout .bubble-chat[data-message-id]{touch-action:pan-y;user-select:text;-webkit-user-select:text}
#main-content .pati-dm-layout .bubble-chat.pati-dm-swiping{
 transform:translate3d(var(--pati-dm-swipe-x,0),0,0)!important;
 transition:none!important;will-change:transform;
}
#main-content .pati-dm-layout .bubble-chat[data-message-id] .pati-dm-reaction-summary{
  pointer-events:none;
}
#message-options-form .pati-dm-press-emojis{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;
 gap:5px;padding:8px;background:rgba(128,128,128,.08);
 border:1px solid rgba(128,128,128,.16);border-radius:18px;margin-bottom:12px;
}
#message-options-form .pati-dm-press-emojis button{
 min-height:45px;border:0;border-radius:13px;background:transparent;color:inherit;
 font-size:26px;cursor:pointer;transition:transform .14s ease,background .14s ease;
}
#message-options-form .pati-dm-press-emojis button:hover,
#message-options-form .pati-dm-press-emojis button:focus-visible{
 transform:scale(1.09);background:rgba(128,128,128,.13);outline-offset:2px;
}
#message-options-form .pati-dm-press-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#message-options-form .pati-dm-press-actions button{
 border:1px solid rgba(128,128,128,.2);border-radius:12px;padding:12px 9px;
 color:inherit;background:rgba(128,128,128,.07);font-size:13px;font-weight:650;
}
#message-options-form .pati-dm-press-actions button.pati-msg-delete{color:#ef6868}
#message-options-form .pati-dm-press-hint{font-size:11px;opacity:.7;margin:11px 0 0;text-align:center}
#main-content .pati-dm-layout .pati-dm-reply-compose:not([hidden]){
 border-left:3px solid #888!important;border-radius:8px;
}

/* Reposted: white check, never red. */
#main-content [data-action="pati-repost"].active{
 color:#fff!important;-webkit-text-fill-color:#fff!important;position:relative!important;
}
#main-content [data-action="pati-repost"].active .pati-repost-symbol{
 color:#fff!important;stroke:#fff!important;
}
#main-content [data-action="pati-repost"].active::after{
 content:"✓";position:absolute;top:0;right:1px;
 width:14px;height:14px;display:grid;place-items:center;
 color:#fff!important;background:#16181c;border:1px solid rgba(255,255,255,.45);
 border-radius:50%;font-size:10px;font-weight:900;line-height:1;
 box-shadow:0 1px 5px rgba(0,0,0,.35);pointer-events:none;
}
#main-content .pati-reel-repost.active::after{right:0;top:0}
#main-content .pati-engagement-stats{
 display:flex;gap:5px 13px;align-items:center;flex-wrap:wrap;
 padding:3px 13px 7px;margin:0;color:var(--muted,#93979e);
 font-size:10px;line-height:1.4;font-weight:550;
}
#main-content .pati-engagement-metric{white-space:nowrap;letter-spacing:.01em}
#main-content .pati-reel-rail .pati-engagement-metric{
 display:block;font-size:10px;min-height:10px;line-height:1.1;
 color:#fff;font-variant-numeric:tabular-nums;
}
#main-content .pati-reel-rail .pati-reel-action{gap:1px!important}
#main-content .pati-video-frame .pati-video-heart-burst{
 position:absolute;z-index:7;inset:50% auto auto 50%;transform:translate(-50%,-50%);
 color:#fff;font-size:72px;text-shadow:0 3px 18px rgba(0,0,0,.5);
 opacity:0;pointer-events:none;
}

/* Premium but controlled color on the *icons*, rather than garish cards. */
#pati-create-sheet .pati-create-choices{gap:9px!important}
#pati-create-sheet .pati-create-choice{
 border-radius:16px!important;border:1px solid rgba(255,255,255,.11)!important;
 background:linear-gradient(116deg,#202126,#17181c)!important;
 min-height:71px!important;padding:11px 13px!important;
 box-shadow:0 5px 18px rgba(0,0,0,.12)!important;
}
#pati-create-sheet .pati-create-choice .pati-choice-icon{
 width:46px!important;height:46px!important;flex:0 0 46px!important;
 display:grid!important;place-items:center!important;border-radius:14px!important;
 color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;
 box-shadow:inset 0 1px 1px rgba(255,255,255,.15),0 5px 13px rgba(0,0,0,.21)!important;
}
#pati-create-sheet .pati-create-choice .pati-choice-icon svg{color:#fff!important;stroke:#fff!important;fill:none}
#pati-create-sheet .pati-create-choice[data-action="pati-create-post"] .pati-choice-icon{background:linear-gradient(145deg,#468cff,#5363e9)!important}
#pati-create-sheet .pati-create-choice[data-action="pati-create-text"] .pati-choice-icon{background:linear-gradient(145deg,#21b8ac,#12807f)!important}
#pati-create-sheet .pati-create-choice[data-action="pati-create-story"] .pati-choice-icon{background:linear-gradient(145deg,#f4846d,#cf5099)!important}
#pati-create-sheet .pati-create-choice[data-action="pati-create-reels"] .pati-choice-icon{background:linear-gradient(145deg,#be5af2,#eb618a)!important}
#pati-create-sheet .pati-create-choice[data-action="pati-create-question"] .pati-choice-icon{background:linear-gradient(145deg,#f0ac49,#db7142)!important}
#pati-create-sheet .pati-create-choice:hover{border-color:rgba(255,255,255,.3)!important;background:linear-gradient(110deg,#2b2c32,#222329)!important}
@media(prefers-reduced-motion:reduce){
 #pati-create-sheet .pati-create-choice,
 #message-options-form .pati-dm-press-emojis button{transition:none!important}
}


/* 31 Oct follow-up: iPhone selection handles are never part of message UI. */
#main-content .pati-dm-layout .bubble-chat[data-message-id],
#main-content .pati-dm-layout .bubble-chat[data-message-id] *,
#modal-root #message-options-form,
#modal-root #message-options-form *,
#pati-creator-dashboard,
#pati-creator-dashboard * {
 -webkit-user-select:none!important;
 user-select:none!important;
 -webkit-touch-callout:none!important;
}
#main-content .pati-dm-layout .bubble-chat[data-message-id]::selection,
#pati-creator-dashboard *::selection,
#modal-root #message-options-form *::selection{background:transparent!important;color:inherit!important}
#modal-root #message-options-form button,
#main-content .pati-dm-layout .bubble-chat button{touch-action:manipulation}
#pati-creator-dashboard input,
#pati-creator-dashboard textarea,
#modal-root #message-options-form input,
#modal-root #message-options-form textarea{
 -webkit-user-select:text!important;user-select:text!important;-webkit-touch-callout:default!important;
}
/* Only the main feed offers the global share plus. */
html[data-pati-view]:not([data-pati-view="home"]) #pati-header-share,
html[data-pati-view]:not([data-pati-view="home"]) #app-root .nav-create,
html[data-pati-view]:not([data-pati-view="home"]) #app-root .pati-desktop-action-button.primary[data-action="pati-create-open"],
#pati-header-share[hidden],
#app-root .nav-create[hidden]{display:none!important}
/* Invisible open target: single tap enters the already fullscreen vertical Reels player. */
#main-content .pati-feed-reel-card .pati-feed-reel-open{
 inset:0!important;position:absolute!important;z-index:6!important;
 width:100%!important;height:100%!important;border:0!important;border-radius:0!important;
 padding:0!important;display:block!important;
 background:transparent!important;box-shadow:none!important;
 backdrop-filter:none!important;color:transparent!important;
 -webkit-tap-highlight-color:transparent!important;
}
#main-content .pati-feed-reel-card .pati-feed-reel-open .pati-feed-reel-open-hit{display:none!important}
#main-content .pati-feed-reel-card .pati-video-sound{
 position:absolute!important;z-index:10!important;pointer-events:auto!important;
}
/* A quick, native-looking helpful / not-helpful choice, no duplicate shortcut. */
#main-content .pati-home-question .pati-home-question-actions,
#main-content .pati-community-card .pati-actionbar{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}
#main-content .pati-home-question .pati-home-question-actions>button,
#main-content .pati-community-card .pati-actionbar>button{
 min-height:40px!important;border-radius:12px!important;
 padding:8px 10px!important;line-height:1.15!important;font-size:12px!important;
}
#main-content .pati-home-question-actions>button[data-action="vote"],
#main-content .pati-home-question-actions>button[data-action="vote-negative"],
#main-content .pati-community-card .pati-actionbar>button[data-action="vote"],
#main-content .pati-community-card .pati-actionbar>button[data-action="vote-negative"]{
 display:inline-flex!important;align-items:center!important;gap:4px!important;
 border:1px solid var(--border,#ddd)!important;
 background:transparent!important;color:inherit!important;
 font-weight:730!important;transition:background .12s,border-color .12s,transform .12s!important;
}
#main-content button[data-action="vote"] svg,
#main-content button[data-action="vote-negative"] svg{width:17px!important;height:17px!important}
#main-content .pati-home-question button[data-action="vote"].active,
#main-content .pati-community-card button[data-action="vote"].active{
 color:#ed444f!important;border-color:rgba(237,68,79,.35)!important;
 background:rgba(237,68,79,.09)!important;
}
#main-content .pati-home-question button[data-action="vote-negative"].active,
#main-content .pati-community-card button[data-action="vote-negative"].active{
 color:var(--ink,#202020)!important;border-color:rgba(120,120,120,.4)!important;
 background:rgba(128,128,128,.13)!important;
}
#main-content .pati-home-question button[data-action="vote"]:disabled,
#main-content .pati-home-question button[data-action="vote-negative"]:disabled,
#main-content .pati-community-card button[data-action="vote"]:disabled,
#main-content .pati-community-card button[data-action="vote-negative"]:disabled{opacity:1!important}
#main-content .pati-home-question-actions>button[data-action="replies"]{margin-left:auto!important}
@media (prefers-reduced-motion:reduce){
 #main-content button[data-action="vote"],
 #main-content button[data-action="vote-negative"]{transition:none!important}
}


/* 31 Oct refinement: voting result majority and natural button counters. */
#main-content .pati-home-question button[data-action="vote"].active,
#main-content .pati-home-question button[data-action="vote"].pati-vote-leading,
#main-content .pati-community-card button[data-action="vote"].active,
#main-content .pati-community-card button[data-action="vote"].pati-vote-leading{
 color:#148447!important;
 border-color:rgba(19,150,83,.45)!important;
 background:rgba(24,167,93,.10)!important;
}
#main-content .pati-home-question button[data-action="vote-negative"].active,
#main-content .pati-home-question button[data-action="vote-negative"].pati-vote-leading,
#main-content .pati-community-card button[data-action="vote-negative"].active,
#main-content .pati-community-card button[data-action="vote-negative"].pati-vote-leading{
 color:#d93243!important;
 border-color:rgba(215,53,66,.4)!important;
 background:rgba(219,48,65,.09)!important;
}
#main-content .pati-question-vote-up.pati-vote-leading,
#main-content .pati-question-vote-down.pati-vote-leading{
 box-shadow:inset 0 0 0 1px currentColor!important;
}
#main-content .pati-social-actions{display:flex!important;align-items:center!important;gap:clamp(5px,1.7vw,14px)!important;flex-wrap:nowrap!important;min-width:0}
#main-content .pati-social-actions>button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;min-width:0!important;padding:6px 3px!important;font-variant-numeric:tabular-nums}
#main-content .pati-social-actions .pati-engagement-metric{
 display:inline!important;min-width:10px;font-size:11px!important;color:inherit!important;
 font-weight:650;line-height:1!important;white-space:nowrap;
}
#main-content .pati-social-actions>button svg{flex:none}
#main-content .pati-feed-card .pati-social-actions>button[data-action="save"]{margin-left:0!important}
@media(max-width:385px){#main-content .pati-social-actions>button{gap:3px!important;font-size:11px!important}}
/* Reply sheet reuses exactly the established post comments layout. */
#modal-root .pati-question-comments .pati-question-reply-summary{padding:12px 15px!important;margin:0!important}
#modal-root .pati-question-comments .pati-question-reply-summary h3{
 margin:0 0 5px!important;font-size:14px!important;font-weight:800!important;
 line-height:1.42!important;color:inherit!important
}
#modal-root .pati-question-comments .pati-question-reply-summary p{margin:0!important;font-size:12px!important;line-height:1.5!important;opacity:.78}
#modal-root .pati-question-comments .comment-list{flex:1!important;min-height:0!important;overflow-y:auto!important;padding:9px 14px 24px!important}
#modal-root .pati-question-comments .pati-question-reply-row{margin-bottom:14px!important;border:0!important;background:transparent!important}
#modal-root .pati-question-comments .pati-question-reply-row .pati-sheet-comment-main p{overflow-wrap:anywhere}
#modal-root .pati-question-comments .modal-footer{flex:none!important}
#modal-root .pati-question-comments .pati-comment-editor-row textarea{min-width:0!important;flex:1!important;resize:none!important}
/* The surface behind and beside the DM header is white, not black bands. */
html[data-pati-view="messages"] body,
html[data-pati-view="messages"] #app-root,
html[data-pati-view="messages"] #app-root .app-shell,
html[data-pati-view="messages"] #app-root .mobile-header,
html[data-pati-view="messages"] #main-content:has(.pati-dm-layout),
html[data-pati-view="messages"] #main-content .pati-dm-top,
html[data-pati-view="messages"] #main-content .pati-dm-layout,
html[data-pati-view="messages"] #main-content .pati-dm-layout .chat-window,
html[data-pati-view="messages"] #main-content .pati-dm-layout .chat-history,
html[data-pati-view="messages"] #main-content .pati-dm-layout .chat-people{
 background:#fff!important;background-image:none!important;
}
html[data-pati-view="messages"] #main-content .pati-dm-top,
html[data-pati-view="messages"] #main-content .pati-dm-title,
html[data-pati-view="messages"] #main-content .chat-window header,
html[data-pati-view="messages"] #main-content .chat-person-info,
html[data-pati-view="messages"] #main-content .pati-dm-list-row{color:#15171c!important}
html[data-pati-view="messages"] #main-content .chat-window header{background:#fff!important;border-color:#ebedf0!important}
html[data-pati-view="messages"] #main-content .pati-dm-layout .chat-form,
html[data-pati-view="messages"] #main-content .pati-dm-layout .chat-compose{background:#fff!important}
html[data-pati-view="messages"] #main-content .chat-people{border-color:#edf0f3!important}
@media(max-width:740px){
 html[data-pati-view="messages"] #main-content:has(.pati-dm-layout){padding-inline:0!important}
 html[data-pati-view="messages"] #main-content .pati-dm-top{padding-left:13px!important;padding-right:13px!important}
 html[data-pati-view="messages"] #main-content .pati-dm-layout{border:0!important;border-radius:0!important}
 html[data-pati-view="messages"] #main-content .chat-history{padding:13px 14px!important}
}
/* Gentle inset text and headers, without moving full-bleed videos or image cards. */
#main-content .pati-post-caption,
#main-content .pati-post-details,
#main-content .pati-feed-text-content,
#main-content .pati-home-question-author,
#main-content .pati-home-question h3,
#main-content .pati-home-question p,
#main-content .pati-ig-info{padding-left:clamp(3px,1.5vw,8px)!important}
#main-content .pati-post-details{padding-right:10px!important}
#main-content .pati-home-question .pati-home-question-actions{padding-left:3px!important}
/* Clear back navigation with the original single-back-per-page behavior. */
#pati-global-back:not([hidden]),#main-content>.pati-page-back{
 align-items:center!important;justify-content:center!important;gap:6px!important;
 border:1px solid #e8eaf0!important;border-radius:13px!important;
 background:#f3f5f7!important;color:#22272e!important;
 min-height:38px!important;padding:6px 10px!important;
 font-size:12px!important;font-weight:760!important;line-height:1!important;
 box-shadow:none!important;white-space:nowrap!important;
}
#pati-global-back svg,#main-content>.pati-page-back svg{display:block;width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:740px){
 #pati-global-back:not([hidden]){margin-left:8px!important;min-width:39px!important;min-height:39px!important;max-width:84px!important;position:relative!important;inset:auto!important}
}
html[data-pati-theme="dark"]:not([data-pati-view="messages"]) #pati-global-back:not([hidden]){
 background:#22252d!important;color:#f5f5f6!important;border-color:#343943!important;
}
/* Video shows play / pause feedback only after an explicit single tap. */
#main-content .pati-reel-item .pati-reel-play-feedback{
 display:grid!important;place-items:center!important;
 position:absolute!important;left:50%!important;top:48%!important;transform:translate(-50%,-50%) scale(.82);
 width:72px;height:72px;pointer-events:none!important;z-index:15!important;
 border-radius:50%;background:rgba(0,0,0,.47);color:#fff!important;
 font-size:39px;font-weight:720;line-height:1;opacity:0;
}
#main-content .pati-reel-item .pati-reel-play-feedback.pati-reel-play-flash{
 animation:patiReelPlaybackFlash .78s ease-out both;
}
@keyframes patiReelPlaybackFlash{
 0%{opacity:0;transform:translate(-50%,-50%) scale(.8)}
 24%{opacity:1;transform:translate(-50%,-50%) scale(1)}
 75%{opacity:1;transform:translate(-50%,-50%) scale(1)}
 100%{opacity:0;transform:translate(-50%,-50%) scale(1.08)}
}
@media(prefers-reduced-motion:reduce){
 #main-content .pati-reel-item .pati-reel-play-feedback.pati-reel-play-flash{
 animation:patiReelPlaybackFlash .15s linear both!important;
 }
}


/* 31 Oct Q&A, mobile and theme regression repair.
   One final, scoped cascade rather than more global overrides. */
html[data-pati-theme="light"]{
 --pati-repair-panel:#fff;--pati-repair-text:#20242a;
 --pati-repair-muted:#626b76;--pati-repair-line:#e7e9ee;
 --pati-repair-field:#f2f4f7;--pati-repair-quote:#f7f8fa;
}
html[data-pati-theme="dark"]{
 --pati-repair-panel:#1c1e24;--pati-repair-text:#f6f7f9;
 --pati-repair-muted:#b4b9c4;--pati-repair-line:#414550;
 --pati-repair-field:#292c35;--pati-repair-quote:#252832;
}
/* Both Q&A replies and post comments now use the same sheet surfaces. */
html[data-pati-theme] #modal-root .modal.pati-instagram-comments,
html[data-pati-theme] #modal-root .pati-instagram-comments :is(.modal-header,.modal-content,.modal-footer),
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form),
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) :is(.comment-list,.pati-comment-post-summary){
 background:var(--pati-repair-panel)!important;
 background-image:none!important;color:var(--pati-repair-text)!important;
}
html[data-pati-theme] #modal-root .pati-instagram-comments .modal-header,
html[data-pati-theme] #modal-root .pati-instagram-comments .modal-footer,
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-post-summary{
 border-color:var(--pati-repair-line)!important;
}
html[data-pati-theme] #modal-root .pati-instagram-comments .modal-header h2,
html[data-pati-theme] #modal-root .pati-instagram-comments .close-modal{
 color:var(--pati-repair-text)!important;
}
html[data-pati-theme] #modal-root .pati-instagram-comments .close-modal{
 background:var(--pati-repair-field)!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-post-summary :is(h3,p,strong,small),
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-post-user,
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment,
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment :is(p,strong),
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-profile-name{
 color:var(--pati-repair-text)!important;
 -webkit-text-fill-color:var(--pati-repair-text)!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) :is(.pati-sheet-comment-line time,.comment-actions button,.pati-comments-empty,.pati-question-reply-summary p,.pati-comment-post-summary>small){
 color:var(--pati-repair-muted)!important;
 -webkit-text-fill-color:var(--pati-repair-muted)!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .comment-actions button{
 background:none!important;border:0!important;
 font-size:11px!important;font-weight:700!important;
 padding:4px 0!important;min-height:28px;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .comment-actions{
 display:flex!important;align-items:center!important;flex-wrap:wrap!important;
 gap:4px 15px!important;margin:2px 0 0!important;padding:0!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .comment-list{
 flex:1 1 auto!important;min-height:0!important;
 overflow-y:auto!important;overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;
 padding:8px 14px 22px!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment{
 display:grid!important;grid-template-columns:35px minmax(0,1fr) 37px!important;
 gap:0 10px!important;align-items:start!important;
 border:0!important;margin-bottom:0!important;
 padding:12px 2px!important;box-sizing:border-box!important;min-width:0;
}
html[data-pati-theme] #modal-root #reply-form .pati-question-reply-row{
 grid-template-columns:35px minmax(0,1fr)!important;
 margin:0!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment-avatar .avatar{
 width:34px!important;height:34px!important;min-width:34px!important;
 border-radius:50%!important;object-fit:cover!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment-main{
 min-width:0!important;max-width:100%!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment-line{
 display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;gap:4px 8px!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-sheet-comment p{
 margin:4px 0 5px!important;line-height:1.46!important;
 font-size:14px!important;overflow-wrap:anywhere!important;white-space:pre-wrap;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-profile-name{
 background:none!important;border:0!important;text-align:left!important;
 font-size:13px!important;font-weight:800!important;min-width:0;
 padding:0!important;overflow-wrap:anywhere!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-post-user{
 display:flex;align-items:center;gap:9px;min-height:36px;margin-bottom:9px;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-post-summary{
 flex:none!important;max-height:30%!important;overflow-y:auto!important;
 padding:13px 16px!important;border-bottom:1px solid var(--pati-repair-line)!important;
}
html[data-pati-theme] #modal-root #reply-form .pati-question-reply-summary h3{
 margin:5px 0!important;line-height:1.4!important;font-weight:800!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-quick{
 display:flex!important;overflow-x:auto!important;gap:8px!important;
 flex-wrap:nowrap!important;scrollbar-width:none!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-quick>button{
 flex:0 0 35px!important;min-width:35px!important;min-height:35px!important;
 border:0!important;background:transparent!important;font-size:20px!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row{
 display:flex!important;align-items:center!important;min-width:0!important;width:100%!important;
 gap:8px!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row textarea{
 display:block!important;flex:1 1 0!important;min-width:0!important;
 min-height:44px!important;max-height:96px!important;
 font-size:16px!important;line-height:1.35!important;resize:none!important;
 padding:10px 12px!important;box-sizing:border-box!important;
 color:var(--pati-repair-text)!important;
 background:var(--pati-repair-field)!important;border:1px solid var(--pati-repair-line)!important;
 border-radius:21px!important;-webkit-text-fill-color:var(--pati-repair-text)!important;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row textarea::placeholder{
 color:var(--pati-repair-muted)!important;-webkit-text-fill-color:var(--pati-repair-muted)!important;opacity:1;
}
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row .pati-comment-send{
 flex:0 0 auto!important;min-height:42px!important;border:0!important;
 padding:8px 12px!important;border-radius:11px!important;
 color:#fff!important;background:#2377ef!important;
 -webkit-text-fill-color:#fff!important;
 font-size:12px!important;font-weight:800!important;
}
html[data-pati-theme] #modal-root .pati-instagram-comments .modal-footer{
 padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
}
html[data-pati-theme] #modal-root .pati-instagram-comments :is(#comment-form,#reply-form){
 display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;
}
html[data-pati-theme] #modal-root .modal.pati-instagram-comments{
 height:min(82dvh,860px)!important;
 max-height:calc(100dvh - var(--pati-keyboard-inset,0px) - 12px)!important;
}
html[data-pati-theme="light"] #modal-root #comment-form .pati-comment-heart svg.icon{stroke:#747984!important}
html[data-pati-theme="light"] #modal-root #comment-form .pati-comment-heart small{color:#747984!important}
html[data-pati-theme="light"] #modal-root #comment-form .pati-comment-reply-hint{
 background:#f1f3f7!important;color:#444b56!important;
}
/* The vote result is colored by the majority only. A minority selection gets a check, not a competing color. */
#main-content :is(.pati-home-question,.pati-community-card) button[data-action="vote"].active:not(.pati-vote-leading),
#main-content :is(.pati-home-question,.pati-community-card) button[data-action="vote-negative"].active:not(.pati-vote-leading){
 color:var(--ink,var(--pui-text,#3b414a))!important;
 border-color:var(--border,var(--pui-border,#aeb4bf))!important;
 background:var(--surface,var(--pui-raised,#e5e7eb))!important;
}
#main-content :is(.pati-home-question,.pati-community-card) button:is([data-action="vote"],[data-action="vote-negative"]).active:not(.pati-vote-leading)::after{
 content:"✓";font-size:11px;font-weight:900;line-height:1;
 margin-left:1px;color:inherit;
}
html[data-pati-theme="dark"] #main-content :is(.pati-home-question,.pati-community-card) button:is([data-action="vote"],[data-action="vote-negative"]).active:not(.pati-vote-leading){
 color:#e6e8ef!important;border-color:#646877!important;background:#383c46!important;
}
/* Dark mode respects the user's theme in chat and profile stats; no permanent white surfaces. */
html[data-pati-theme="dark"][data-pati-view="messages"] :is(body,#app-root,#main-content),
html[data-pati-theme="dark"][data-pati-view="messages"] #app-root :is(.app-shell,.mobile-header),
html[data-pati-theme="dark"][data-pati-view="messages"] #main-content :is(.pati-dm-top,.pati-dm-layout,.chat-window,.chat-history,.chat-people,.chat-compose,.chat-form),
html[data-pati-theme="dark"][data-pati-view="messages"] #main-content .chat-window header{
 background:var(--pati-repair-panel)!important;background-image:none!important;
 color:var(--pati-repair-text)!important;
}
html[data-pati-theme="dark"][data-pati-view="messages"] #main-content :is(.pati-dm-title,.pati-dm-top,.chat-person-info,.pati-dm-list-row){
 color:var(--pati-repair-text)!important;
}
html[data-pati-theme="dark"][data-pati-view="messages"] #main-content :is(.chat-window header,.chat-people){
 border-color:var(--pati-repair-line)!important;
}
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-profile-insights-preview{
 background:var(--pati-repair-panel)!important;background-image:none!important;
 border-color:var(--pati-repair-line)!important;color:var(--pati-repair-text)!important;
}
html[data-pati-theme="dark"] #main-content .pati-profile-insights-preview :is(strong,small,.pati-profile-insights-value,.pati-profile-insights-arrow){
 color:var(--pati-repair-text)!important;
}
/* Mobile layout: no clipped action rows, sheets, menus or keyboard composer. */
@media(max-width:740px){
 html[data-pati-theme] #modal-root .modal.pati-instagram-comments{
  width:100%!important;max-width:none!important;
  height:min(83dvh,850px)!important;max-height:calc(100dvh - var(--pati-keyboard-inset,0px) - 8px)!important;
  border-radius:22px 22px 0 0!important;
 }
 html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .comment-list{
  padding:6px 12px 15px!important;
 }
 html[data-pati-theme] #modal-root .pati-instagram-comments .modal-footer{
  padding:8px 10px calc(12px + env(safe-area-inset-bottom,0px))!important;
 }
 #main-content .pati-feed-card .pati-social-actions{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:nowrap!important;gap:clamp(1px,1vw,7px)!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  box-sizing:border-box!important;padding:5px 6px!important;
 }
 #main-content .pati-feed-card .pati-social-actions>button{
  flex:0 1 auto!important;min-width:0!important;min-height:42px!important;
  padding:5px 2px!important;gap:2px!important;margin:0!important;
 }
 #main-content .pati-feed-card .pati-social-actions>button svg{
  width:clamp(17px,4.4vw,21px)!important;height:clamp(17px,4.4vw,21px)!important;
 }
 #main-content .pati-feed-card .pati-social-actions :is(span,.pati-engagement-metric){
  font-size:clamp(10px,2.7vw,12px)!important;white-space:nowrap!important;
 }
 #main-content .pati-home-question-actions{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;
 }
 #main-content .pati-home-question-actions>button{
  margin:0!important;min-width:0!important;justify-content:center!important;
  padding:8px 5px!important;white-space:normal!important;
 }
 #main-content .pati-home-question-actions>button[data-action="replies"]{
  grid-column:1/-1!important;
 }
 #app-root .mobile-header{min-width:0;gap:5px;box-sizing:border-box}
 #app-root .mobile-header .brand{min-width:0;flex:0 1 auto}
 #app-root .mobile-header .brand-word,
 #app-root .mobile-header .brand-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #modal-root:has(#tools-form) .modal,
 #modal-root:has(#tools-form) #tools-form{min-width:0!important}
 #modal-root:has(#tools-form) .modal-content{overflow-x:hidden!important}
 #main-content .pati-dm-layout :is(.chat-people,.chat-window,.chat-history,.chat-compose,.chat-input-area){
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
 }
 #main-content .pati-dm-layout .bubble-chat{max-width:min(85vw,380px)!important;overflow-wrap:anywhere!important}
}
@media(max-width:360px){
 html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row{gap:5px!important}
 html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row .pati-comment-me{display:none}
 html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-comment-editor-row .pati-comment-send{padding-inline:8px!important}
 #main-content .pati-feed-card .pati-social-actions>button{padding-inline:1px!important}
}
@media(prefers-reduced-motion:reduce){
 #main-content :is(.pati-home-question,.pati-community-card) button:is([data-action="vote"],[data-action="vote-negative"]){transition:none!important}
}

/* Preserve visible mentions and follow controls in the light comment sheet. */
html[data-pati-theme] #modal-root :is(#comment-form,#reply-form) .pati-mention-link{
 color:#2377ef!important;-webkit-text-fill-color:#2377ef!important;
}
html[data-pati-theme="light"] #modal-root #comment-form .pati-comment-follow{
 color:#262b33!important;-webkit-text-fill-color:#262b33!important;
 border-color:#9ca3ae!important;
}
html[data-pati-theme="light"] #main-content [data-action="pati-repost"].active{
 color:#252931!important;-webkit-text-fill-color:#252931!important;
}
html[data-pati-theme="light"] #main-content [data-action="pati-repost"].active .pati-repost-symbol{
 color:#252931!important;stroke:#252931!important;
}
html[data-pati-theme="light"] #main-content [data-action="pati-repost"].active::after{
 color:#fff!important;-webkit-text-fill-color:#fff!important;
}
html[data-pati-theme="dark"][data-pati-view="messages"] #main-content :is(.pati-dm-top,.pati-dm-title,.chat-person-info,.pati-dm-list-row) :is(strong,small){
 color:var(--pati-repair-text)!important;
}
