/* 2026-10-29 • Final photo editor / private insights mobile repairs.
   Deliberately uses existing secure Supabase metrics; no fabricated profile activity. */
.pati-full-crop-dialog{overscroll-behavior:contain;overflow:hidden!important}
.pati-full-crop-shell{min-height:0;height:100dvh;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto}
.pati-full-crop-head{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:12px;background:var(--pui-paper,#f9f9fa);z-index:1;min-width:0}
.pati-full-crop-head>strong{overflow:hidden;text-overflow:ellipsis}
.pati-full-crop-stage{min-height:0;width:100%;padding:clamp(8px,2vw,18px);overflow:hidden;aspect-ratio:auto!important;background:#242528!important}
.pati-full-crop-stage canvas{
 width:auto!important;height:auto!important;
 max-width:min(100%,720px)!important;max-height:100%!important;
 object-fit:contain!important;touch-action:none!important;
 box-sizing:border-box!important;user-select:none;
 box-shadow:0 0 0 3px #fff9,0 8px 35px #0006!important
}
.pati-full-crop-guide{border:0!important}
.pati-full-crop-controls{
 background:var(--pui-paper,#fafafa);
 min-height:0;max-height:min(43dvh,390px);
 overscroll-behavior:contain;
 gap:10px;padding-bottom:max(15px,env(safe-area-inset-bottom));
}
.pati-crop-top-controls button{flex:0 1 110px;min-width:64px;max-width:110px}
.pati-crop-ratios{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.pati-crop-ratios button{scroll-snap-align:center}
.pati-full-crop-zoom input{min-width:0}
.pati-crop-status:not(:empty){color:#a13631;font-weight:750;text-align:center}
.pati-creator-dashboard{isolation:isolate;overscroll-behavior:contain}
.pati-creator-dashboard .pati-creator-scroll{scrollbar-gutter:stable;touch-action:pan-y}
.pati-creator-dashboard .pati-creator-container{max-width:760px}
.pati-creator-dashboard .pati-creator-ranges button,
.pati-creator-dashboard .pati-creator-tabs button{cursor:pointer}
.pati-creator-dashboard .pati-creator-stat,
.pati-creator-dashboard .pati-creator-profile-moves button{transition:background .15s ease}
.pati-creator-dashboard .pati-creator-stat:hover,
.pati-creator-dashboard .pati-creator-profile-moves button:hover{background:var(--pui-raised,#f2f3f5)}
.pati-creator-dashboard .pati-creator-stat:focus-visible,
.pati-creator-dashboard .pati-creator-visitor:focus-visible{outline:3px solid #6486cb;outline-offset:2px}
.pati-creator-dashboard .pati-creator-visitor{min-width:0;flex-wrap:wrap}
.pati-creator-dashboard .pati-creator-visitor time{white-space:nowrap}
.pati-profile-insights-preview{width:calc(100% - 24px)!important;margin:13px 12px!important;min-width:0!important}
.pati-profile-insights-preview .pati-profile-insights-value{white-space:nowrap}
.pati-profile-insights-preview .pati-profile-insights-arrow.increase{color:#15945b!important}
.pati-profile-insights-preview .pati-profile-insights-arrow.decrease{color:#d33e48!important}
html[data-pati-theme="dark"] .pati-full-crop-head,
html[data-pati-theme="dark"] .pati-full-crop-controls{background:#17181e!important;color:#f8f8fa!important}
html[data-pati-theme="dark"] .pati-full-crop-stage{background:#090a0d!important}
html[data-pati-theme="dark"] .pati-creator-dashboard .pati-creator-scroll,
html[data-pati-theme="dark"] .pati-creator-dashboard .pati-creator-head,
html[data-pati-theme="dark"] .pati-creator-dashboard{background:#17181e!important;color:#f8f8fa!important}
html[data-pati-theme="dark"] .pati-creator-dashboard :is(.pati-creator-stat,.pati-creator-detail-grid article,.pati-creator-audience-count,.pati-creator-breakdown){
 background:#252730!important;color:#f8f8fa!important;border-color:#444752!important}
html[data-pati-theme="dark"] .pati-creator-dashboard :is(h2,h3,strong,.pati-creator-detail-head button){
 color:#f8f8fa!important}
html[data-pati-theme="dark"] .pati-creator-dashboard :is(p,small,.pati-creator-footnote,.pati-creator-private){
 color:#c7c9d4!important}
@media(max-width:600px){
 .pati-full-crop-dialog{width:100vw!important;max-width:100vw!important}
 .pati-full-crop-head{min-height:58px;gap:7px;padding-inline:12px}
 .pati-full-crop-head button{padding:8px 11px;min-height:40px;flex-shrink:0}
 .pati-full-crop-stage{padding:7px}
 .pati-full-crop-controls{max-height:44dvh;padding:10px 13px max(14px,env(safe-area-inset-bottom));gap:8px}
 .pati-crop-top-controls{gap:7px}
 .pati-crop-top-controls button{min-height:48px}
 .pati-creator-dashboard .pati-creator-container{padding:12px 12px max(48px,env(safe-area-inset-bottom))}
 .pati-creator-dashboard .pati-creator-kpis,.pati-creator-dashboard .pati-creator-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pati-creator-dashboard .pati-creator-stat{min-width:0}
}
@media(max-height:610px) and (orientation:landscape){
 .pati-full-crop-controls{max-height:39dvh;gap:5px;padding-block:6px}
 .pati-crop-top-controls button{min-height:35px;font-size:17px}
 .pati-crop-ratios button{min-height:34px;padding:6px 12px}
 .pati-full-crop-controls>p:not(.pati-crop-status){display:none}
}


/* 2026-10-30: publish buttons must remain reachable on every phone height. */
#modal-root .pati-mobile-full-page-form:has(#post-form),
#modal-root .pati-mobile-full-page-form:has(#story-form){min-height:0!important;max-height:100dvh!important}
#modal-root .pati-mobile-full-page-form #post-form .modal-footer,
#modal-root .pati-mobile-full-page-form #story-form .modal-footer{
 display:flex!important;visibility:visible!important;opacity:1!important;
 flex:0 0 auto!important;position:relative!important;
 min-height:72px!important;padding:10px 14px max(13px,env(safe-area-inset-bottom,0px))!important;
 z-index:20!important;background:var(--pui-paper,#fff)!important;
}
#modal-root #post-form .modal-footer button[type="submit"],
#modal-root #story-form .modal-footer button[type="submit"]{
 display:inline-flex!important;visibility:visible!important;opacity:1!important;
 min-width:110px!important;min-height:49px!important;
 align-items:center!important;justify-content:center!important;
 font-size:16px!important;font-weight:800!important;
 background:#17191d!important;color:#fff!important;border-radius:13px!important;
}
#modal-root #post-form .modal-footer button[type="submit"]::after{
 content:none!important;display:none!important
}
#patiyiz-system-media .pati-system-head{
 position:relative;top:auto;z-index:15;padding:8px 10px;
 background:#f7f7f8;box-sizing:border-box;max-width:100%;
}
#patiyiz-system-media .pati-system-head .pati-system-head-publish{
 display:inline-flex;align-items:center;justify-content:center;
 width:auto!important;max-width:112px;min-width:70px;height:auto!important;min-height:43px!important;
 padding:8px 10px!important;border:0!important;border-radius:12px!important;
 background:#fff!important;color:#17181b!important;font-size:13px!important;font-weight:850!important;
 text-align:center;white-space:normal;line-height:1.2!important;
}
#patiyiz-system-media .pati-system-head .pati-system-head-publish[hidden]{display:none!important}
#patiyiz-system-media .pati-system-head .pati-system-head-publish:disabled{opacity:.5!important;cursor:wait}
#patiyiz-system-media .pati-system-publish-actions{
 position:sticky!important;bottom:0!important;z-index:12!important;
 background:#f7f7f8!important;
 margin:12px 0 0!important;padding:12px 8px max(12px,env(safe-area-inset-bottom,0px))!important;
 border-top:1px solid #42444c!important;box-sizing:border-box!important;
}
#patiyiz-system-media #pati-system-publish{
 display:flex!important;align-items:center!important;justify-content:center!important;
 visibility:visible!important;min-height:50px!important;
 background:#fff!important;color:#17181b!important;
}
#patiyiz-system-media #pati-system-publish:disabled{opacity:.55!important}
html[data-pati-theme="dark"] #modal-root .pati-mobile-full-page-form :is(#post-form,#story-form) .modal-footer{
 background:#17191d!important;
}
html[data-pati-theme="dark"] #modal-root :is(#post-form,#story-form) .modal-footer button[type="submit"]{
 background:#f5f6f8!important;color:#17191d!important;border-color:#f5f6f8!important;
}
/* One timeline: vaccination, veterinarian and ordinary care tasks. */
.pati-care-calendar{
 margin:14px 12px 20px;padding:15px 12px 12px;
 border:1px solid var(--pui-border,#e6e6ec);border-radius:17px;
 background:var(--pui-raised,#f8f8fa);color:var(--pui-text,#17191d);
 box-sizing:border-box;min-width:0;
}
.pati-care-calendar-head{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:8px;margin-bottom:13px}
.pati-care-calendar-head strong{text-align:center;text-transform:capitalize;font-size:15px;font-weight:850}
.pati-care-calendar-head button{
 width:42px;height:42px;border:1px solid var(--pui-border,#d8d8df);border-radius:12px;
 background:var(--pui-paper,#fff);color:inherit;font-size:25px;cursor:pointer;
}
.pati-care-calendar-days,.pati-care-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.pati-care-calendar-days span{text-align:center;font-size:10px;font-weight:800;opacity:.7;padding:4px 0 8px}
.pati-care-calendar-grid button{
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:1px;min-width:0;min-height:48px;padding:3px 1px;
 border:1px solid transparent;background:transparent;color:inherit;border-radius:12px;
 font-size:12px;font-weight:740;cursor:pointer;
}
.pati-care-calendar-grid button.is-outside{opacity:.35}
.pati-care-calendar-grid button.is-today{border-color:var(--pui-border,#babcc6)}
.pati-care-calendar-grid button.is-selected{
 background:#20232a!important;color:white!important;border-color:#20232a!important;
}
.pati-care-calendar-grid button i{
 display:grid;place-items:center;width:18px;height:17px;border-radius:7px;
 background:#e2e5f5;color:#1c233a;font-size:10px;font-weight:850;font-style:normal;
}
.pati-care-calendar-foot{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:12px}
.pati-care-calendar-foot small{font-size:10px;line-height:1.5;color:var(--pui-secondary,#747780)}
.pati-care-calendar-foot button{
 flex:0 0 auto;min-height:35px;padding:7px 12px;border-radius:10px;border:1px solid var(--pui-border,#ddd);
 background:var(--pui-paper,#fff);color:inherit;font-size:12px;font-weight:750;
}
html[data-pati-theme="dark"] .pati-care-calendar{background:#24262d!important;border-color:#444751!important;color:#f6f7f9!important}
html[data-pati-theme="dark"] .pati-care-calendar-head button,
html[data-pati-theme="dark"] .pati-care-calendar-foot button{background:#181a20!important;color:#f6f7f9!important;border-color:#4c505b!important}
@media(max-width:390px){
 .pati-care-calendar{margin-inline:7px;padding-inline:7px}
 .pati-care-calendar-grid{gap:2px}
 .pati-care-calendar-grid button{min-height:43px}
 .pati-care-calendar-grid button i{width:16px;height:15px}
}

/* Own story hearts: visible above delete, without covering activity or swipe controls. */
#story-overlay .pati-story-like.pati-story-like-own{
 position:absolute!important;
 right:14px!important;
 bottom:calc(78px + env(safe-area-inset-bottom,0px))!important;
 z-index:14!important;
 width:45px!important;height:45px!important;
 display:grid!important;place-items:center!important;
 background:#15171dbb!important;color:#fff!important;
 border:1px solid #ffffff88!important;border-radius:50%!important;
 font-size:30px!important;line-height:1!important;
}
#story-overlay .pati-story-like.pati-story-like-own.active{
 color:#ff335d!important;background:#fff!important;
}
#story-overlay.pati-story-viewers-open .pati-story-like-own{display:none!important}


/* 30 Oct 2026 — story/reels composer layout repair.
 * One Share action in the lower control card, never a second action in the header.
 * This layer is intentionally scoped to the OS gallery/camera composer only. */
#patiyiz-system-media{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;
  padding:max(14px,env(safe-area-inset-top,0px)) clamp(12px,3.2vw,22px)
    max(20px,env(safe-area-inset-bottom,0px))!important;
}
#patiyiz-system-media .pati-system-panel{
  width:min(100%,580px)!important;
  min-height:100%!important;
  max-height:none!important;
  overflow:visible!important;
  padding-inline:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:clamp(12px,2.2vw,18px)!important;
}
#patiyiz-system-media .pati-system-head{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr) 48px!important;
  align-items:center!important;
  gap:8px!important;
  min-height:58px!important;
  padding:7px 2px 10px!important;
  margin:0!important;
  background:#f7f7f8!important;
  border-bottom:1px solid #e4e5e9!important;
}
#patiyiz-system-media .pati-system-head strong{
  color:#17191d!important;
  text-align:center!important;
  font-size:clamp(17px,4.5vw,21px)!important;
  line-height:1.2!important;
  letter-spacing:-.03em!important;
  white-space:normal!important;
}
#patiyiz-system-media .pati-system-head [data-system="close"]{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  line-height:1!important;
  font-size:33px!important;
  padding:0!important;
  text-align:center!important;
}
#patiyiz-system-media .pati-system-head-spacer{
  display:block!important;width:44px!important;height:44px!important;
}
#patiyiz-system-media .pati-system-head .pati-system-head-publish{
  display:none!important;
}
#patiyiz-system-media #pati-system-preview{
  width:100%!important;
  min-width:0!important;
  display:flex;
  flex-direction:column;
  gap:13px;
}
#patiyiz-system-media #pati-system-preview[hidden]{display:none!important}
#patiyiz-system-media .pati-system-preview-wrap{
  flex:none!important;
  width:100%!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:#15161b!important;
}
#patiyiz-system-media .pati-system-preview-media{
  border-radius:18px!important;
  background:#15161b!important;
  overscroll-behavior-x:contain;
}
#patiyiz-system-media[data-mode="story"] .pati-system-preview-media,
#patiyiz-system-media[data-mode="reels"] .pati-system-preview-media{
  width:min(100%,355px)!important;
  max-width:100%!important;
  max-height:min(49dvh,550px)!important;
  margin-inline:auto!important;
}
#patiyiz-system-media .pati-system-preview-media :is(img,video){
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  background:#15161b!important;
}
#patiyiz-system-media .pati-system-summary{
  margin:1px 0!important;
  color:#b8bbc4!important;
  text-align:center!important;
  line-height:1.4!important;
  font-size:13px!important;
}
#patiyiz-system-media .pati-system-edit-panel{
  width:100%;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:13px;
  border:1px solid #e2e4e9;
  background:#fff;
  border-radius:20px;
  padding:clamp(12px,3vw,18px);
  margin:2px 0 0;
  box-shadow:none;
}
#patiyiz-system-media .pati-system-crop-entry{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  min-height:53px!important;
  margin:0!important;
  padding:13px 14px!important;
  border:1px solid #dfe2e7!important;
  border-radius:14px!important;
  background:#f7f7f8!important;
  color:#17191d!important;
  font-size:clamp(13px,3.7vw,15px)!important;
  font-weight:750!important;
  line-height:1.3!important;
  white-space:normal!important;
  text-align:left!important;
  overflow-wrap:anywhere;
}
#patiyiz-system-media .pati-system-crop-entry[hidden]{display:none!important}
#patiyiz-system-media .pati-system-crop-chevron{
  font-size:26px;
  font-weight:400;
  line-height:1;
  margin-inline-start:auto;
  color:#adb1bb;
  flex:none;
}
#patiyiz-system-media .pati-system-edit-panel :is(.pati-system-audience,.pati-system-caption-label){
  margin:0!important;
  max-width:100%;
}
#patiyiz-system-media .pati-system-edit-panel .pati-system-audience{
  display:grid;
  gap:7px;
  line-height:1.35;
}
#patiyiz-system-media .pati-system-edit-panel :is(#pati-system-caption,.pati-system-audience select){
  width:100%!important;
  max-width:100%;
  min-width:0;
  margin:0!important;
  border-radius:12px!important;
}
#patiyiz-system-media .pati-system-publish-actions{
  position:static!important;
  bottom:auto!important;
  z-index:auto!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  gap:12px!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#patiyiz-system-media[data-mode="story"] .pati-system-publish-actions,
#patiyiz-system-media[data-mode="reels"] .pati-system-publish-actions{
  grid-template-columns:minmax(0,1fr)!important;
}
#patiyiz-system-media[data-mode="story"] .pati-system-publish-actions button,
#patiyiz-system-media[data-mode="reels"] .pati-system-publish-actions button{
  grid-column:1 / -1!important;
}
#patiyiz-system-media .pati-system-publish-actions button{
  min-height:52px!important;
  margin:0!important;
  padding:13px 14px!important;
  font-size:14px!important;
  font-weight:750!important;
  border-radius:14px!important;
  white-space:normal!important;
}
#patiyiz-system-media .pati-system-publish-actions [data-system="rechoose"]{
  background:#f2f3f5!important;
  color:#17191d!important;
  border:1px solid #dfe1e6!important;
}
#patiyiz-system-media #pati-system-publish{
  min-height:56px!important;
  border:0!important;
  background:#17191d!important;
  color:#fff!important;
  font-size:16px!important;
  font-weight:850!important;
}
#patiyiz-system-media .pati-system-modes{
  flex:none!important;
  position:static!important;
  display:flex!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  width:100%!important;
  margin-top:auto!important;
  padding:17px 0 max(12px,env(safe-area-inset-bottom,0px))!important;
}
#patiyiz-system-media .pati-system-modes button{
  min-height:44px!important;
  padding:10px 14px!important;
  border-radius:999px!important;
}
@media(max-width:420px){
 #patiyiz-system-media .pati-system-panel{
   padding-inline:0!important;
   overflow:visible!important;
 }
 #patiyiz-system-media .pati-system-edit-panel{gap:11px;padding:12px}
 #patiyiz-system-media .pati-system-publish-actions button{
   font-size:14px!important;
 }
 #patiyiz-system-media[data-mode="story"] .pati-system-preview-media,
 #patiyiz-system-media[data-mode="reels"] .pati-system-preview-media{
   max-height:43dvh!important;
 }
}
@media(max-height:680px){
 #patiyiz-system-media .pati-system-panel{overflow:visible!important}
 #patiyiz-system-media[data-mode="story"] .pati-system-preview-media,
 #patiyiz-system-media[data-mode="reels"] .pati-system-preview-media{max-height:34dvh!important}
}

/* Story visibility control — white, readable labels on the dark media composer.
 * Applies to the existing selector; access rules and publish behavior stay unchanged. */
#patiyiz-system-media[data-mode="story"] .pati-system-edit-panel label.pati-system-audience{
  color:#ffffff!important;
  font-weight:750!important;
  font-size:14px!important;
  line-height:1.45!important;
}
#patiyiz-system-media[data-mode="story"] .pati-system-edit-panel #pati-system-audience{
  color:#ffffff!important;
  background:#272a32!important;
  border:1px solid #555964!important;
  padding:11px 13px!important;
  min-height:46px!important;
  color-scheme:dark;
  font:inherit!important;
}
#patiyiz-system-media[data-mode="story"] #pati-system-audience option{
  background:#272a32;
  color:#ffffff;
}
html[data-pati-theme="dark"] #modal-root #post-form .pati-field:has(select[name="story_audience"]) label,
html[data-pati-theme="dark"] #modal-root #story-form .pati-field:has(select[name="story_audience"]) label{
  color:#ffffff!important;
}
html[data-pati-theme="dark"] #modal-root #post-form select[name="story_audience"],
html[data-pati-theme="dark"] #modal-root #story-form select[name="story_audience"]{
  color:#fff!important;background:#272a32!important;border-color:#555964!important;color-scheme:dark;
}


/* 30 Oct 2026 | True circle-fill avatars, without a double inset frame. */
#main-content .pati-ig-profile .pati-ig-avatar{
 padding:0!important;
 overflow:visible!important;
 border-radius:50%!important;
 box-sizing:border-box!important;
}
#main-content .pati-ig-profile .pati-ig-avatar.pati-profile-story-seen{
 padding:0!important;
 border:2px solid #a6a9af!important;
}
#main-content .pati-ig-profile .pati-ig-avatar.pati-profile-has-story{
 padding:0!important;
}
#main-content .pati-ig-profile .pati-ig-avatar > .avatar,
#main-content .pati-ig-profile .pati-ig-avatar > .pati-profile-story-view,
#main-content .pati-ig-profile .pati-ig-avatar .pati-profile-story-view > .avatar{
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 min-width:0!important;
 aspect-ratio:1/1!important;
 padding:0!important;
 margin:0!important;
 box-sizing:border-box!important;
 border:0!important;
 border-radius:50%!important;
 overflow:hidden!important;
}
#main-content .pati-ig-profile .pati-ig-avatar .avatar img,
#main-content .pati-ig-profile .pati-ig-avatar .pati-profile-story-view img{
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 border-radius:50%!important;
 border:0!important;
 object-fit:cover!important;
 object-position:center!important;
 transform:none!important;
}
/* Profile editor follows the same framing. */
#modal-root .pati-profile-edit-modal .pati-edit-avatar{
 display:grid;place-items:center;
 border-radius:50%!important;overflow:hidden!important;
 padding:0!important;
}
#modal-root .pati-profile-edit-modal .pati-edit-avatar img{
 display:block;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;
 border-radius:50%!important;
}

/* 30 Oct 2026 | Story photo extends fully to the bottom action, never a black unused strip. */
#story-overlay .story-player .story-big-photo,
#story-overlay .story-player .story-big-video{
 display:block!important;
 width:100%!important;
 height:100%!important;
 object-fit:cover!important;
 object-position:center!important;
 background:#08090c!important;
}
#story-overlay.pati-story-own .story-player::after{
 content:'';
 position:absolute;
 inset:auto 0 0;
 height:min(47%,420px);
 background:linear-gradient(transparent,rgba(0,0,0,.2) 35%,rgba(0,0,0,.58));
 pointer-events:none;
 z-index:7;
}
/* Actual story actions live in a single ordered vertical container.
   Override previously absolute-positioned caption / viewer / heart / delete styles. */
#story-overlay.pati-story-own .pati-own-story-stack{
 position:absolute!important;
 z-index:19!important;
 /* Raise neither caption nor activity: shift the stack down while
    respecting iPhone's home-indicator safe area and keeping Sil visible. */
 bottom:calc(4px + env(safe-area-inset-bottom,0px))!important;
 left:14px!important;
 right:14px!important;
 box-sizing:border-box!important;
 display:flex!important;
 flex-direction:column!important;
 align-items:stretch!important;
 gap:6px!important;
 max-height:min(53dvh,470px);
 pointer-events:none;
}
#story-overlay.pati-story-own .pati-own-story-stack > *,
#story-overlay.pati-story-own .pati-own-story-stack button{pointer-events:auto}
#story-overlay.pati-story-own .pati-own-story-stack > .story-caption{
 position:relative!important;
 top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
 width:100%!important;
 box-sizing:border-box!important;
 margin:0!important;
 padding:13px 17px!important;
 text-align:center!important;
 font-size:14px!important;
 line-height:1.5!important;
 border-radius:17px!important;
 color:white!important;
 background:#090a0bc7!important;
 max-height:min(18dvh,138px)!important;
 overflow-y:auto!important;
 overflow-wrap:anywhere!important;
 white-space:pre-wrap!important;
 flex:0 1 auto;
}
#story-overlay.pati-story-own .pati-own-story-stack > .pati-story-shared-source{
 position:relative!important;
 inset:auto!important;
 margin:0!important;
 width:100%!important;
 max-width:none!important;
 flex:0 0 auto;
}
#story-overlay.pati-story-own .pati-own-story-actions{
 display:flex!important;
 align-items:flex-end!important;
 justify-content:space-between!important;
 gap:12px!important;
 min-width:0!important;
 flex:0 0 auto;
}
#story-overlay.pati-story-own .pati-own-story-actions > .story-viewers-button,
#story-overlay.pati-story-own .pati-own-story-actions > .pati-story-like-own{
 position:relative!important;
 top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
 z-index:20!important;
 margin:0!important;
 float:none!important;
 transform:none!important;
}
#story-overlay.pati-story-own .pati-own-story-actions > .story-viewers-button{
 display:flex!important;
 flex-direction:column!important;
 align-items:flex-start!important;
 gap:5px!important;
 width:min(64vw,180px)!important;
 min-width:0!important;
 min-height:110px!important;
 max-height:155px!important;
 padding:12px 14px!important;
 box-sizing:border-box!important;
 flex:0 1 auto;
 border-radius:22px!important;
 background:rgba(15,15,20,.78)!important;
 color:#fff!important;
}
#story-overlay.pati-story-own .pati-own-story-actions > .pati-story-like-own{
 flex:0 0 52px!important;
 display:grid!important;
 place-items:center!important;
 width:52px!important;height:52px!important;
 border-radius:50%!important;
 align-self:flex-end!important;
}
#story-overlay.pati-story-own .pati-own-story-footer{
 display:flex!important;
 justify-content:flex-end!important;
 flex:0 0 auto;
}
#story-overlay.pati-story-own .pati-own-story-footer > .story-delete{
 position:relative!important;
 inset:auto!important;
 margin:0!important;
 z-index:20!important;
 min-height:48px!important;
 min-width:104px!important;
 border-radius:22px!important;
}
#story-overlay.pati-story-viewers-open .pati-own-story-stack{display:none!important}
@media(max-height:690px){
 #story-overlay.pati-story-own .pati-own-story-stack{gap:5px!important;max-height:54dvh}
 #story-overlay.pati-story-own .pati-own-story-actions > .story-viewers-button{min-height:82px!important}
 #story-overlay.pati-story-own .pati-own-story-stack > .story-caption{max-height:12dvh!important}
}

/* 30 Oct 2026 | Real square editor: 4 resizable corners, image pan and pinch zoom. */
body.pati-avatar-crop-open{overflow:hidden!important}
#pati-avatar-crop-overlay{
 position:fixed;inset:0;z-index:260000;
 background:#0c0d10;color:#fff;
 display:flex;justify-content:center;align-items:stretch;
 overflow:hidden;overscroll-behavior:contain;
}
#pati-avatar-crop-overlay *{box-sizing:border-box}
#pati-avatar-crop-overlay .pati-avatar-crop-panel{
 width:min(100%,680px);
 height:100dvh;min-height:0;
 display:flex;flex-direction:column;
 padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);
 background:#111216;
}
#pati-avatar-crop-overlay header{
 display:grid;grid-template-columns:80px 1fr 80px;
 align-items:center;gap:5px;
 min-height:66px;padding:10px 12px;
 border-bottom:1px solid #303136;
}
#pati-avatar-crop-overlay header strong{font-size:15px;text-align:center;line-height:1.35}
#pati-avatar-crop-overlay header button{
 border:0;color:#fff;background:transparent;
 min-height:42px;padding:8px 5px;
 border-radius:10px;font:inherit;font-size:14px;
}
#pati-avatar-crop-overlay header .pati-avatar-crop-save{
 background:#fff;color:#131417;font-weight:800;
}
#pati-avatar-crop-overlay header button:disabled{opacity:.55}
#pati-avatar-crop-overlay .pati-avatar-crop-help{
 margin:0;padding:12px 24px 14px;
 text-align:center;color:#b9bcc4;
 font-size:12px;line-height:1.5;
}
#pati-avatar-crop-overlay .pati-avatar-crop-stage{
 position:relative;flex:1 1 auto;min-height:170px;min-width:0;
 background:#0c0d0f;
 overflow:hidden;touch-action:none;
 user-select:none;-webkit-user-select:none;
}
#pati-avatar-crop-overlay canvas{
 width:100%;height:100%;
 display:block;touch-action:none;
}
#pati-avatar-crop-overlay .pati-avatar-crop-square{
 position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
 border:2px solid #fff;outline:1px solid #151515;
 box-shadow:0 0 0 100vmax rgba(0,0,0,.48);
 pointer-events:none;touch-action:none;
}
#pati-avatar-crop-overlay .pati-avatar-crop-grid{
 position:absolute;inset:0;
 background:linear-gradient(to right,transparent calc(33.333% - .5px),#ffffff70 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff70 66.666%,transparent calc(66.666% + .5px)),
 linear-gradient(to bottom,transparent calc(33.333% - .5px),#ffffff70 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff70 66.666%,transparent calc(66.666% + .5px));
}
#pati-avatar-crop-overlay .pati-avatar-crop-square .corner{
 position:absolute;width:32px;height:32px;
 border:4px solid #fff;
 pointer-events:auto;touch-action:none;
 border-radius:2px;
}
#pati-avatar-crop-overlay .corner.top-left{top:-4px;left:-4px;border-right:0;border-bottom:0}
#pati-avatar-crop-overlay .corner.top-right{top:-4px;right:-4px;border-left:0;border-bottom:0}
#pati-avatar-crop-overlay .corner.bottom-left{bottom:-4px;left:-4px;border-top:0;border-right:0}
#pati-avatar-crop-overlay .corner.bottom-right{bottom:-4px;right:-4px;border-top:0;border-left:0}
#pati-avatar-crop-overlay footer{
 flex:0 0 auto;
 display:grid;gap:9px;
 padding:18px 20px max(18px,env(safe-area-inset-bottom,0px));
 font-size:13px;color:#e8e9eb;
}
#pati-avatar-crop-overlay footer input{width:100%;height:28px;accent-color:#fff}
#pati-avatar-crop-overlay footer small{color:#a8acb5;font-size:11px}
@media(max-height:650px){
 #pati-avatar-crop-overlay header{min-height:51px}
 #pati-avatar-crop-overlay .pati-avatar-crop-help{padding:7px 18px}
 #pati-avatar-crop-overlay footer{padding-block:10px}
}
@media(prefers-reduced-motion:reduce){#pati-avatar-crop-overlay *{animation:none!important;transition:none!important}}

/* 30 Oct 2026 | Own-story bottom-left activity aligned with the Sil action.
   The personal story has no like button; other people's heart stays as before. */
#story-overlay.pati-story-own .pati-own-story-footer{
 display:flex!important;
 flex-direction:row!important;
 align-items:flex-end!important;
 justify-content:space-between!important;
 gap:12px!important;
 width:100%!important;
 min-width:0!important;
}
#story-overlay.pati-story-own .pati-own-story-footer > .story-viewers-button{
 position:relative!important;
 inset:auto!important;
 transform:none!important;
 float:none!important;
 margin:0!important;
 display:flex!important;
 flex:0 1 min(50vw,190px)!important;
 flex-direction:column!important;
 align-items:flex-start!important;
 justify-content:center!important;
 gap:6px!important;
 width:min(50vw,190px)!important;
 min-width:0!important;
 max-width:190px!important;
 min-height:104px!important;
 max-height:144px!important;
 overflow:hidden!important;
 box-sizing:border-box!important;
 padding:12px 13px!important;
 background:rgba(13,13,18,.78)!important;
 color:#fff!important;
 border:1px solid rgba(255,255,255,.44)!important;
 border-radius:21px!important;
 z-index:20!important;
 text-align:left!important;
}
#story-overlay.pati-story-own .pati-own-story-footer > .story-viewers-button .pati-story-viewer-preview-label{
 font-size:16px!important;
 font-weight:800!important;
 line-height:1.2!important;
}
#story-overlay.pati-story-own .pati-own-story-footer > .story-viewers-button .pati-story-viewer-preview-status{
 font-size:12px!important;
 line-height:1.3!important;
}
#story-overlay.pati-story-own .pati-own-story-footer > .story-delete{
 align-self:flex-end!important;
 flex:0 0 auto!important;
}
#story-overlay.pati-story-own .pati-own-story-stack > .story-caption{
 margin-bottom:6px!important;
}
#story-overlay.pati-story-own .pati-story-like-own{display:none!important}
@media(max-width:350px){
 #story-overlay.pati-story-own .pati-own-story-footer{gap:8px!important}
 #story-overlay.pati-story-own .pati-own-story-footer > .story-viewers-button{
  width:min(49vw,170px)!important;
  min-height:88px!important;
  padding:9px 10px!important;
 }
 #story-overlay.pati-story-own .pati-own-story-footer > .story-delete{min-width:88px!important}
}
