/* Targeted layout correction. Keep native app chrome and existing modal layers. */
html:root:not(.benty-native) .forum-main--web-detail .forum-detail-intro{width:min(100%,780px);max-width:780px;margin-inline:auto;align-self:center}
html:root:not(.benty-native) .forum-main--web-detail .forum-detail-intro h1{width:100%;max-width:100%;margin:0;font-size:clamp(24px,2.4vw,34px);line-height:1.22;font-weight:650;letter-spacing:-.025em;text-wrap:pretty;overflow-wrap:anywhere}
@media(max-width:760px){
 html:root:not(.benty-native) .forum-main--web-detail .forum-topic-detail-surface{padding:20px 16px;gap:20px;border-radius:24px 24px 0 0}
 html:root:not(.benty-native) .forum-main--web-detail .forum-replies{padding:20px 16px 100px;gap:0}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-intro{gap:16px;min-width:0}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-intro h1{max-width:100%;font-size:24px;line-height:1.25;letter-spacing:-.02em;text-wrap:pretty;overflow-wrap:anywhere}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-description{width:100%;max-width:100%;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-description p{line-height:inherit}
 html:root:not(.benty-native) .forum-main--web-detail .forum-thread-actions-bar{margin-inline:0;padding:12px 0}
 html:root:not(.benty-native) .forum-main--web-detail .forum-moderation-toolbar{display:flex;gap:6px;flex-wrap:wrap}
 html:root:not(.benty-native) .forum-main--web-detail .forum-moderation-toolbar-button{min-height:44px;padding:8px 10px;font-size:12px;line-height:1.3;gap:6px;flex:0 1 auto}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-metrics{flex-wrap:wrap;gap:12px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply{padding-block:18px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-replies-title{margin-bottom:12px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply+.forum-reply{margin-top:0;padding-top:18px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-identity{position:relative;display:block;min-width:0}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-avatar{position:absolute;top:0;left:0;width:36px;height:36px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-identity>div>p:first-child{min-height:40px;padding-left:46px;display:flex;align-content:center;align-items:center;flex-wrap:wrap;gap:3px 8px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-identity time{font-size:12px;line-height:1.4;white-space:normal}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-body{width:100%;font-size:15px;line-height:1.55;overflow-wrap:anywhere}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-actions{margin-top:4px;padding:4px 0 0;gap:12px;flex-wrap:wrap}
 html:root:not(.benty-native) .forum-main--web-detail .forum-reply-actions button{min-width:44px;min-height:44px}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-code{max-width:100%;overflow-x:auto}
 html:root:not(.benty-native) .forum-main--web-detail .forum-detail-description :is(img,video){max-width:100%;height:auto}
}
:root .settings-profile-form{grid-template-columns:minmax(0,1fr)}
:root .settings-profile-form>*{min-width:0;max-width:100%}
:root .settings-section-body{min-width:0;box-sizing:border-box;border:0;margin:0}
:root .settings-profile-preview strong,:root .settings-profile-preview-handle,:root .settings-profile-preview p{max-width:100%;overflow-wrap:anywhere}
:root .settings-profile-preview{padding:30px 18px 18px}
:root .settings-profile-preview-avatar{width:52px;height:52px;margin-bottom:4px}
:root .settings-profile-preview p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
:root .settings-profile-form input.settings-avatar-input{width:1px;height:1px;padding:0;border:0}
:root .settings-profile-form label,:root .settings-handle-input{min-width:0}
:root .settings-profile-form textarea{max-height:240px}
:root .settings-avatar-actions{flex-wrap:wrap}
:root .settings-avatar-upload,:root .settings-avatar-remove{min-height:40px}
:root .settings-content-header>div{min-width:0}
:root .settings-content-header h2,:root .settings-content-header p{overflow-wrap:anywhere}
html:root:not(.benty-native) .settings-workspace .settings-content-header{height:auto;min-height:74px;flex:0 0 auto;padding:16px 64px 16px 24px}
:root .settings-page .settings-navigation p,:root .settings-page .settings-content-header p,:root .settings-row small,:root .settings-avatar-copy small,:root .settings-accent-picker>p,:root .settings-profile-form label>span{color:#a4adbb}
:root .settings-loading{line-height:1.5}
:root .settings-loading button{display:block;margin-top:12px}
:root .settings-row{padding-block:12px;min-height:64px}
:root .settings-row>span:first-child{overflow-wrap:anywhere}
:root .settings-row select{max-width:100%;flex-shrink:0}
:root .settings-status{line-height:1.5;overflow-wrap:anywhere}
:root .settings-close{width:36px;height:36px;top:18px;right:18px}
:root .settings-page :is(button,select,input,textarea):focus-visible{outline:2px solid #9bc6ff;outline-offset:3px}
:root .settings-switch{height:28px;border-radius:16px}
:root .settings-switch span{top:5px}
:root .settings-switch::after{content:'';position:absolute;inset:-8px 0}
:root .settings-person-row{flex-wrap:wrap;padding-block:12px}
:root .settings-person-row>button{min-height:40px}
:root .settings-person-row>span{overflow-wrap:anywhere}
:root .appearance-editor{gap:20px}
:root .appearance-intro>img{width:88px;height:88px}
:root .appearance-intro h3{font-size:22px}
:root .appearance-preview{padding:20px}
:root .appearance-preview-label{margin-bottom:14px}
:root .appearance-premium-note{margin:20px 0 18px;padding:8px 0}
:root .appearance-choice img{width:30px;height:30px}
:root .appearance-actions{padding-bottom:4px}
:root .profile-hero h1,:root .profile-hero>p,:root .forum-topic-profile-identity strong{max-width:100%;overflow-wrap:anywhere}
:root .profile-relationship-actions{min-width:0}
:root .profile-relationship-actions>button{min-width:0}
:root .profile-badges,:root .forum-topic-profile-badges{flex-wrap:wrap}
:root .profile-badge{max-width:100%;height:auto;min-height:30px}
:root .profile-badge>span{min-width:0;overflow-wrap:anywhere}
:root .forum-topic-profile-identity{min-width:0;max-width:100%}
:root .forum-topic-profile-actions{flex-wrap:wrap}
:root .forum-topic-profile-actions>button{min-height:40px}
:root .benty-signature{overflow-wrap:anywhere}
/* Feedback stays on the control, without moving surrounding content. */
:root .forum-detail-author{align-items:flex-start;gap:12px;flex-wrap:wrap}
:root .forum-detail-author>div:first-child{display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:10px;row-gap:3px;min-width:0;flex:1 1 190px}
:root .forum-detail-author>div:first-child>img{width:32px;height:32px;grid-row:1/3;align-self:center}
:root .forum-detail-author .forum-author-name{min-width:0;max-width:100%;text-align:left;overflow-wrap:anywhere;line-height:1.3}
:root .forum-detail-author time{grid-column:2;font-size:12px;line-height:1.4;white-space:normal}
:root .forum-detail-context{max-width:100%;min-width:0}
:root .forum-detail-context span{max-width:100%;overflow-wrap:anywhere;white-space:normal}
:root .forum-reply-identity>div{min-width:0}
:root .forum-reply-identity>div>p:first-child{flex-wrap:wrap;gap:4px 8px}
:root .forum-reply-identity .forum-author-name{max-width:100%;overflow-wrap:anywhere;text-align:left}
:root .forum-reply-body{overflow-wrap:anywhere}
:root .forum-reply-actions button{min-height:36px}
:root .forum-thread-actions-bar{min-width:0}
:root .forum-moderation-toolbar{flex-wrap:wrap;gap:6px}
:root .forum-moderation-toolbar-button{max-width:100%;min-height:40px}
:root .settings-navigation-item,:root .settings-close,:root .settings-avatar-upload,:root .settings-avatar-remove,:root .settings-primary-action,:root .appearance-actions>button{transition:background-color 140ms ease,opacity 140ms ease,transform 100ms ease}
:root .settings-page button:not(:disabled):active{transform:scale(.98)}
:root .settings-page button:disabled{cursor:default}
:root .settings-section-body{scroll-margin-top:16px}
@media(max-width:1000px) and (min-width:761px){
 html:root:not(.benty-native) .settings-workspace .settings-page{grid-template-columns:220px minmax(0,1fr)}
 :root .settings-avatar-row{display:grid;grid-template-columns:48px minmax(0,1fr)}
 :root .settings-avatar-preview{width:48px;height:48px}
 :root .settings-avatar-actions{grid-column:1/-1}
 :root .settings-row:has(select){align-items:flex-start;flex-direction:column;gap:10px}
 :root .settings-row select{width:100%}
}
@media(max-width:760px){
 html:root:not(.benty-native) .profile-avatar-edit{top:80px;left:calc(50% + 24px);width:36px;height:36px}
 :root .settings-avatar-row{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px}
 :root .settings-avatar-preview{width:48px;height:48px}
 :root .settings-avatar-actions{grid-column:1/-1;display:flex;gap:8px;min-width:0}
 :root .settings-avatar-actions>button{flex:1;justify-content:center;min-width:0;min-height:44px;padding:0 10px}
 :root .settings-row:has(select){align-items:stretch;flex-direction:column;gap:10px}
 :root .settings-row select{width:100%;min-width:0;min-height:44px}
 :root .settings-row{gap:12px;min-height:66px}
 :root .settings-page input:not([type=radio]):not([type=checkbox]),:root .settings-page textarea,:root .settings-row select{font-size:16px}
 :root .settings-close{top:12px;right:12px;width:44px;height:44px}
 :root .settings-navigation{padding-top:16px}
 :root .settings-navigation header{padding-right:42px;padding-bottom:10px}
 :root .settings-navigation h1{font-size:18px}
 :root .settings-navigation header>p{display:none}
 :root .settings-navigation nav{scroll-padding-inline:8px;overscroll-behavior-inline:contain}
 :root .settings-navigation-item{min-height:44px;flex-shrink:0}
 html:root:not(.benty-native) .settings-workspace .settings-content-header{min-height:68px;padding:14px 18px}
 :root .settings-session-device strong{overflow-wrap:anywhere}
 :root .settings-session-device small,:root .settings-session-activity small{white-space:normal;overflow-wrap:anywhere}
 :root .settings-session-revoke{width:44px;height:44px}
 :root .settings-session{column-gap:10px}
 :root .settings-primary-action,:root .settings-cache-clear{max-width:100%;min-height:44px;height:auto;padding:10px 14px;justify-content:center;text-align:center}
 :root .settings-profile-form>.settings-primary-action{width:100%}
 :root .appearance-intro>img{width:60px;height:60px}
 :root .appearance-intro h3{font-size:20px}
 :root .appearance-preview{padding:16px}
 :root .appearance-preview .benty-signature{margin-top:12px;padding-top:12px}
 :root .appearance-identity{gap:10px}
 :root .appearance-identity>img{width:40px;height:40px}
 :root .appearance-limit{gap:8px}
}
@media(prefers-reduced-motion:reduce){
 :root .settings-page *, :root .appearance-editor *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 :root .settings-page button:not(:disabled):active{transform:none}
}
