/* Fısıltın V17 — native mobile shell */
:root{--app-h:100dvh;--safe-bottom:max(env(safe-area-inset-bottom),8px)}
*{box-sizing:border-box}
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}
a,button{-webkit-tap-highlight-color:transparent}
img{max-width:100%}

/* CHAT: use VisualViewport height, composer is guaranteed visible */
body.page-chat{height:var(--app-h)!important;min-height:0!important;overflow:hidden!important;background:#f8f6fb!important}
body.page-chat .shell{height:var(--app-h)!important;min-height:0!important;max-height:var(--app-h)!important;overflow:hidden!important}
body.page-chat main{
 height:var(--app-h)!important;min-height:0!important;max-height:var(--app-h)!important;
 display:grid!important;grid-template-rows:68px 36px minmax(0,1fr) max-content!important;
 padding:0!important;overflow:hidden!important
}
body.page-chat .chat-head{height:68px!important;min-height:68px!important}
body.page-chat .privacy-chip{height:28px!important;max-width:calc(100vw - 24px)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.page-chat .messages{
 min-height:0!important;height:auto!important;max-height:none!important;
 overflow-y:auto!important;overscroll-behavior:contain!important;
 padding:12px 12px 18px!important
}
body.page-chat .composer{
 position:relative!important;inset:auto!important;
 width:100%!important;min-height:66px!important;max-height:170px!important;
 padding:8px 9px var(--safe-bottom)!important;margin:0!important;
 border-top:1px solid rgba(53,27,82,.08)!important;
 box-shadow:0 -10px 30px rgba(40,18,68,.07)!important
}
body.page-chat .composer-tools{align-self:end!important}
body.page-chat .composer-main{align-self:end!important}
body.page-chat .composer textarea{
 appearance:none!important;-webkit-appearance:none!important;
 resize:none!important;border:1px solid rgba(80,55,100,.10)!important;
 background:#f6f2f9!important;font-size:16px!important
}
body.page-chat .bubble{max-width:min(82%,420px)!important}
body.page-chat .bubble:has(.message-photo){max-width:min(78vw,360px)!important}
body.page-chat .message-photo{width:100%!important;max-width:100%!important}
body.page-chat .message-photo img{width:100%!important;height:auto!important;max-height:42dvh!important;object-fit:cover!important}

/* PUBLIC PROFILE — app-like, no giant decorative dead space */
.public-profile{padding:0!important;margin:0!important;width:100%!important}
.public-profile .profile-cover{
 height:112px!important;border-radius:26px 26px 0 0!important;margin:0!important;
 background:linear-gradient(135deg,#33175e,#7b39d8 58%,#bd49bd)!important
}
.public-profile .profile-main{
 margin:-1px 0 0!important;padding:0 18px 22px!important;border-radius:0 0 28px 28px!important;
 background:#fff!important;box-shadow:0 16px 38px rgba(42,20,66,.08)!important;
 display:flex!important;flex-direction:column!important;align-items:center!important
}
.public-profile .profile-main>.avatar.xl{
 width:104px!important;height:104px!important;margin-top:-52px!important;
 border:5px solid #fff!important;box-shadow:0 8px 24px rgba(50,25,75,.16)!important
}
.public-profile .profile-main>h1{margin:12px 0 3px!important;font-size:28px!important}
.public-profile .profile-main>p:not(.profile-bio):not(.privacy-note){margin:0 0 14px!important;text-align:center!important}
.public-profile .profile-gallery{
 width:100%!important;margin:6px 0 14px!important;display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important
}
.public-profile .profile-gallery img{
 width:100%!important;aspect-ratio:1/1!important;height:auto!important;object-fit:cover!important;
 border-radius:16px!important;margin:0!important
}
.public-profile .profile-bio{width:100%!important;text-align:center!important;margin:3px 0 15px!important}
.public-profile .profile-stats{width:100%!important;margin:0 0 14px!important}
.public-profile .profile-buttons{
 width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important
}
.public-profile .profile-buttons .primary{grid-column:1/-1!important;width:100%!important}
.public-profile .profile-buttons form,.public-profile .profile-buttons button{width:100%!important;margin:0!important}
.public-profile .profile-buttons .danger-button{grid-column:auto!important}
.public-profile .privacy-note{width:100%!important;margin:12px 0 0!important;text-align:center!important}

/* OWN PROFILE */
.profile-card.modern{padding:22px 16px!important;border-radius:28px!important}
.profile-card.modern>.avatar.xl{width:104px!important;height:104px!important}
.profile-card.modern .profile-stats{width:100%!important}
.wallet-row,.settings-row{width:100%!important}

/* app controls */
input,textarea,select,button{font:inherit}
@media(max-width:390px){
 .public-profile .profile-main{padding-left:12px!important;padding-right:12px!important}
 .public-profile .profile-buttons{grid-template-columns:1fr!important}
 .public-profile .profile-buttons .primary{grid-column:auto!important}
 body.page-chat .bubble:has(.message-photo){max-width:84vw!important}
}
