/* Buchee mobile UX refinements — 2026-11-02.
   Source images: close-friends list, story archive, compact profile. */
#pati-close-picker{position:fixed!important;inset:0!important;height:100dvh!important;width:100vw!important;background:#090e12!important;color:#f8fafc!important;z-index:2147483600!important;overflow:hidden!important}
#pati-close-picker .pati-close-picker-shell{display:flex!important;flex-direction:column!important;max-width:680px!important;width:100%!important;height:100%!important;padding:0 16px!important;background:#090e12!important;overflow:hidden!important;box-sizing:border-box!important}
#pati-close-picker .pati-close-picker-shell>header{position:relative!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) 48px!important;align-items:center!important;flex:none!important;min-height:64px!important;padding:calc(env(safe-area-inset-top,0px) + 11px) 0 11px!important;background:#090e12!important;border-bottom:1px solid #1e242a!important;box-sizing:content-box!important}
#pati-close-picker .pati-close-picker-shell>header strong{text-align:center!important;font-size:18px!important;letter-spacing:-.3px!important;color:#fff!important;font-weight:780!important}
#pati-close-picker [data-cf-action="cancel"]{display:grid!important;place-items:center!important;min-width:44px!important;width:44px!important;min-height:44px!important;height:44px!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#f9fafb!important;font-size:36px!important;font-weight:300!important;line-height:1!important;touch-action:manipulation!important}
#pati-close-picker .buchee-cf-header-spacer{width:44px!important;height:44px!important}
#pati-close-picker .pati-close-info{flex:none!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:10px!important;text-align:center!important;padding:16px 6px 18px!important;background:#090e12!important}
#pati-close-picker .pati-close-info p{max-width:440px!important;font-size:13px!important;line-height:1.5!important;color:#9ea5b0!important;margin:0!important}
#pati-close-picker #pati-close-count{background:#21272d!important;color:#e2e7ee!important;border-radius:999px!important;padding:5px 14px!important;font-size:12px!important;font-weight:700!important}
#pati-close-picker .buchee-cf-search-wrap{margin:0 0 18px!important;flex:none!important}
#pati-close-picker #pati-close-search{box-sizing:border-box!important;display:block!important;width:100%!important;min-height:50px!important;height:50px!important;padding:0 16px 0 43px!important;border:1px solid #292f35!important;border-radius:28px!important;background:#252a30!important;color:white!important;font-size:16px!important;outline-color:#596cf8!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:15px center!important;-webkit-appearance:none!important}
#pati-close-picker #pati-close-search::placeholder{color:#aab2bf!important}
#pati-close-picker .buchee-cf-section-title{display:block!important;flex:none!important;margin:0 0 10px!important;padding:0 2px!important;color:#f9fafb!important;font-size:15px!important;font-weight:780!important}
#pati-close-picker .pati-close-people{display:block!important;flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;padding:0!important;margin:0!important;border:0!important;background:#090e12!important}
#pati-close-picker .pati-close-person{box-sizing:border-box!important;display:flex!important;align-items:center!important;gap:13px!important;min-height:72px!important;width:100%!important;padding:9px 2px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#fff!important;text-align:left!important;touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important}
#pati-close-picker .pati-close-person[aria-pressed="true"]{background:transparent!important}
#pati-close-picker .pati-close-person .avatar{flex:0 0 50px!important;width:50px!important;height:50px!important;border-radius:50%!important;overflow:hidden!important}
#pati-close-picker .pati-close-person>span:not(:first-child){display:flex!important;flex:1 1 auto!important;flex-direction:column!important;gap:4px!important;min-width:0!important}
#pati-close-picker .pati-close-person strong{color:#f9fafb!important;font-size:14px!important;font-weight:750!important;line-height:1.2!important}
#pati-close-picker .pati-close-person small{color:#a0a8b5!important;font-size:13px!important;line-height:1.3!important}
#pati-close-picker .pati-close-person>b{box-sizing:border-box!important;display:grid!important;place-items:center!important;flex:0 0 26px!important;width:26px!important;height:26px!important;border:2px solid #8c969f!important;border-radius:50%!important;background:transparent!important;color:transparent!important;font-size:16px!important}
#pati-close-picker .pati-close-person[aria-pressed="true"]>b{border-color:#fff!important;background:#fff!important;color:#0a0e12!important}
#pati-close-picker .pati-close-error{color:#ffabb8!important;font-size:12px!important;flex:none!important;margin:8px 0!important}
#pati-close-picker .pati-close-error[hidden]{display:none!important}
#pati-close-picker .buchee-cf-footer{box-sizing:border-box!important;flex:0 0 auto!important;padding:13px 0 max(15px,env(safe-area-inset-bottom,0px))!important;border-top:1px solid #252b33!important;background:#090e12!important}
#pati-close-picker .buchee-cf-footer .pati-close-confirm{display:block!important;width:100%!important;min-height:49px!important;border:0!important;border-radius:13px!important;padding:9px 16px!important;background:#475cf8!important;color:white!important;font-size:16px!important;font-weight:800!important;touch-action:manipulation!important}
#pati-close-picker .buchee-cf-footer .pati-close-confirm:disabled{opacity:.6!important}
@media(max-height:660px){#pati-close-picker .pati-close-info{padding:7px 6px!important;gap:5px!important}#pati-close-picker .buchee-cf-search-wrap{margin-bottom:8px!important}#pati-close-picker .pati-close-person{min-height:59px!important}}
/* The profile actions occupy one comfortable row, not two stacked panels. */
#main-content .pati-ig-profile .pati-own-profile-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;width:100%!important;align-items:stretch!important;margin:10px 0 12px!important;padding:0 14px!important;box-sizing:border-box!important}
#main-content .pati-ig-profile .pati-own-profile-actions>.soft-btn,
#main-content .pati-ig-profile .pati-own-profile-actions>.pati-profile-insights-preview{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:100%!important;min-height:44px!important;height:44px!important;margin:0!important;padding:9px 10px!important;box-sizing:border-box!important;border-radius:12px!important;border:1px solid #e8e9ed!important;box-shadow:none!important;background:#f0f1f4!important;color:#22262c!important;font-size:13px!important;font-weight:780!important;line-height:1.2!important}
#main-content .pati-ig-profile .pati-own-profile-actions>.pati-profile-insights-preview{gap:6px!important;flex-direction:row!important;text-align:center!important}
#main-content .pati-ig-profile .pati-own-profile-actions>.pati-profile-insights-preview>span:first-child{display:inline-flex!important;flex:0 1 auto!important;align-items:center!important;justify-content:center!important;min-width:0!important}
#main-content .pati-ig-profile .pati-own-profile-actions .pati-profile-insights-preview strong{font-size:13px!important;color:#22262c!important;white-space:nowrap!important}
#main-content .pati-ig-profile .pati-own-profile-actions .pati-profile-insights-preview small,
#main-content .pati-ig-profile .pati-own-profile-actions .pati-profile-insights-arrow{display:none!important}
#main-content .pati-ig-profile .pati-own-profile-actions .pati-profile-insights-value{font-size:11px!important;color:#7437c0!important;line-height:1!important;margin:0!important;white-space:nowrap!important}
#main-content .pati-ig-profile .pati-ig-summary{padding-bottom:4px!important}
#main-content .pati-ig-profile .buchee-highlights{margin-top:6px!important}
/* A real 3-column selection gallery, respecting the iPhone notch and home indicator. */
#modal-root .modal-backdrop:has(#highlight-archive-form),
#modal-root .modal-backdrop:has(#highlight-album-add-form){position:fixed!important;inset:0!important;z-index:30000!important;display:flex!important;align-items:stretch!important;justify-content:center!important;padding:0!important;margin:0!important;width:100vw!important;height:100dvh!important;background:#fff!important;overflow:hidden!important}
#modal-root .modal:has(#highlight-archive-form),
#modal-root .modal:has(#highlight-album-add-form){position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;width:100%!important;max-width:680px!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;margin:0 auto!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;background:#fff!important;overflow:hidden!important}
#modal-root .modal:has(#highlight-archive-form)>.modal-header,
#modal-root .modal:has(#highlight-album-add-form)>.modal-header{position:relative!important;z-index:4!important;display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;min-height:58px!important;padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px!important;border-bottom:1px solid #eff0f3!important;background:#fff!important;box-sizing:content-box!important}
#modal-root .modal:has(#highlight-archive-form) .modal-header h2,
#modal-root .modal:has(#highlight-album-add-form) .modal-header h2{font-size:17px!important;font-weight:820!important;color:#141820!important;text-align:center!important;margin:0!important;padding:0 55px!important}
#modal-root .modal:has(#highlight-archive-form) .modal-header .close-modal,
#modal-root .modal:has(#highlight-album-add-form) .modal-header .close-modal{position:absolute!important;left:12px!important;top:calc(env(safe-area-inset-top,0px) + 10px)!important;right:auto!important;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;background:transparent!important;border:0!important;color:#1c2228!important;font-size:32px!important;line-height:1!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form){display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form)>.modal-content{flex:1 1 auto!important;min-height:0!important;max-height:none!important;padding:12px 0!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
#modal-root .buchee-archive-intro{padding:5px 16px 12px!important;margin:0!important;font-size:12px!important;color:#737a86!important;line-height:1.5!important}
#modal-root .buchee-archive-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;width:100%!important;padding:0!important;margin:0!important}
#modal-root .buchee-archive-story{position:relative!important;display:block!important;aspect-ratio:0.59!important;min-width:0!important;overflow:hidden!important;border-radius:3px!important;background:#191c22!important;cursor:pointer!important}
#modal-root .buchee-archive-story>input{position:absolute!important;z-index:5!important;inset:0!important;width:100%!important;height:100%!important;opacity:0!important;cursor:pointer!important;margin:0!important}
#modal-root .buchee-archive-thumb{position:absolute!important;inset:0!important;display:block!important;overflow:hidden!important}
#modal-root .buchee-archive-thumb img{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important}
#modal-root .buchee-archive-thumb .buchee-highlight-cover-empty{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;color:#b3bcc9!important}
#modal-root .buchee-archive-date{position:absolute!important;top:10px!important;left:8px!important;display:block!important;border-radius:8px!important;padding:7px!important;background:#13171bed!important;color:#fff!important;font-size:11px!important;font-weight:760!important;max-width:70%!important}
#modal-root .buchee-archive-video{position:absolute!important;left:8px!important;bottom:8px!important;color:#fff!important;font-size:12px!important;text-shadow:0 1px 3px #000!important}
#modal-root .buchee-archive-check{position:absolute!important;top:9px!important;right:9px!important;display:grid!important;place-items:center!important;width:27px!important;height:27px!important;border:2px solid white!important;border-radius:50%!important;color:transparent!important;background:#0002!important;box-shadow:0 0 0 1px #0004!important}
#modal-root .buchee-archive-story>input:checked~.buchee-archive-check{border-color:#485fff!important;background:#485fff!important;color:white!important}
#modal-root .buchee-archive-story>input:checked~.buchee-archive-thumb:after{content:""!important;position:absolute!important;inset:0!important;border:3px solid #485fff!important}
#modal-root .buchee-archive-story>input:focus-visible~.buchee-archive-check{outline:3px solid #fff!important;outline-offset:2px!important}
#modal-root .buchee-archive-loading,#modal-root .buchee-archive-empty{margin:35px 15px!important;text-align:center!important;color:#747b86!important;font-size:14px!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form)>.modal-footer{position:relative!important;z-index:3!important;display:flex!important;flex:0 0 auto!important;justify-content:flex-end!important;gap:10px!important;margin:0!important;padding:12px 15px max(13px,env(safe-area-inset-bottom,0px))!important;border-top:1px solid #e7e9ec!important;background:white!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form)>.modal-footer button{height:44px!important;min-height:44px!important;touch-action:manipulation!important;border-radius:12px!important;font-size:14px!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form)>.modal-footer button.primary-btn{background:#475cf8!important;color:#fff!important;border:0!important;min-width:110px!important}
#modal-root :is(#highlight-archive-form,#highlight-album-add-form)>.modal-footer button:disabled{opacity:.4!important}
/* Question answers back arrow always remains on top of the comment sheet. */
#modal-root .pati-question-comments .modal-header{position:sticky!important;top:0!important;z-index:80!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) 40px!important;align-items:center!important;min-height:56px!important;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 8px!important;background:#fff!important;border-bottom:1px solid #e6e8eb!important;visibility:visible!important;opacity:1!important}
#modal-root .pati-question-comments .modal-header .buchee-question-back{display:grid!important;position:relative!important;grid-column:1!important;grid-row:1!important;place-items:center!important;width:44px!important;height:44px!important;min-height:44px!important;border:0!important;border-radius:10px!important;padding:0!important;background:#f0f1f3!important;color:#111822!important;font-size:27px!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;touch-action:manipulation!important}
#modal-root .pati-question-comments .modal-header h2{grid-column:2!important;grid-row:1!important;min-width:0!important;text-align:center!important;color:#15181d!important;font-size:17px!important;margin:0!important}
#modal-root .pati-question-comments .modal-header .close-modal{grid-column:3!important;grid-row:1!important;position:relative!important;inset:auto!important;width:40px!important;height:44px!important;min-height:44px!important;color:#555d67!important}
#main-content .pati-settings-v2 .pati-settings-icon svg{display:block!important;width:23px!important;height:23px!important;stroke:currentColor!important}
#main-content .pati-settings-v2 .pati-safety-buttons button{min-height:48px!important;touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;cursor:pointer!important;transition:background-color .08s ease,color .08s ease!important}
#main-content .pati-settings-v2 .pati-safety-buttons button:active{transform:scale(.98)!important}
.pati-dm-top-actions .buchee-dm-group-glyph svg{width:29px!important;height:29px!important}
@media(max-width:390px){#main-content .pati-ig-profile .pati-own-profile-actions{gap:7px!important;padding:0 10px!important}#main-content .pati-ig-profile .pati-own-profile-actions>.soft-btn,#main-content .pati-ig-profile .pati-own-profile-actions>.pati-profile-insights-preview{font-size:12px!important}#main-content .pati-ig-profile .pati-own-profile-actions .pati-profile-insights-preview strong{font-size:12px!important}}
