/* Keep Russian text readable without squeezing letters or hiding overflow. */
main :is(h1,h2,h3,p,li,summary,.breadcrumbs){overflow-wrap:anywhere}
main :is(button,.primary-button,.secondary-button){max-width:100%;overflow-wrap:anywhere}
main :is(input,select,textarea){min-width:0;max-width:100%}
main :is(.panel,.field-grid>*,.work-card-body,.pattern-card-body,.admin-row>a,.admin-row>span){min-width:0}
.workspace-title .create-page-title{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:clamp(28px,3.45vw,46px)!important;letter-spacing:-.025em;line-height:1.2}
.auth-content h1{line-height:1.25;letter-spacing:-.02em}
.auth-content .field-hint{display:block;color:var(--muted);font-size:12px;font-weight:400;line-height:1.5;margin-top:7px}
.ru-create :is(#brand,#bead-size){font-size:13px}
.ru-create .compact-choice-row button{flex-direction:column;min-width:0;height:auto;padding:10px 6px}
.ru-create .compact-choice-row span{text-align:center;max-width:100%}
.ru-create .compact-choice-row b{white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.4}
.ru-create .compact-choice-row small{display:block;white-space:normal;overflow:visible;text-overflow:clip;font-size:9px;line-height:1.4}
.gallery-card small,.work-card-body h2,.work-card-author b,.conversation-list>button small,.layer-name{white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;height:auto}
.gallery-card small{font-size:11px;line-height:1.5}
.work-card-body h2{line-height:1.4}
.work-card-author{min-width:0;flex-wrap:wrap}
.work-card-author b{min-width:0;flex:1}
.work-avatar{flex-shrink:0}
.message-list article,.message-list p,.message-thread>header>div,.conversation-list b{min-width:0;overflow-wrap:anywhere}
.message-list{overflow-x:hidden}
.conversation-list>button small{line-height:1.5;margin-top:5px}
.message-thread>header>div{flex:1}
.message-thread>header button{flex-shrink:0}
.profile-avatar-wrap>div{min-width:0;overflow-wrap:anywhere}
.profile-links a{grid-template-columns:minmax(0,1fr) auto;column-gap:12px}
.admin-row>a,.admin-row>span{overflow-wrap:anywhere;flex:1}
.ru-editor .layer-name{line-height:1.4;text-align:left}
.ru-editor .layer>button:not(.layer-name){flex-shrink:0}
.ru-editor .color-list-panel{overflow-y:auto;overscroll-behavior:contain}
.ru-editor .color-list-panel>:not(#materials){flex-shrink:0}
.ru-editor .color-list-panel #materials{flex:1 0 120px;min-height:120px;max-height:320px}
.ru-editor .layers-panel{overflow-y:auto;overscroll-behavior:contain}
.ru-editor .layers-panel>*{flex-shrink:0}
.ru-editor .manual-layer-toolbar{overflow-y:auto;overscroll-behavior:contain}
.bean-dialog{overflow-wrap:anywhere;max-height:calc(100dvh - 24px)}
.bean-dialog :is(button,input,textarea,select){max-width:100%;min-width:0}
.bean-dialog h2{line-height:1.3;overflow-wrap:anywhere}
.bean-dialog canvas{max-width:100%;height:auto;display:block}
#toast{width:max-content;max-width:calc(100vw - 28px);overflow-wrap:anywhere;line-height:1.5}
@media(min-width:981px) and (max-width:1250px){
 .site-header-inner{gap:12px}
 .desktop-nav{gap:2px;min-width:0}
 .desktop-nav a{padding-inline:8px;font-size:13px;white-space:nowrap}
 .header-profile{flex:none}
 .header-profile em{display:none}
 .language-switcher{flex:none}
}
@media(max-width:600px){
 .ru-create .compact-choice-row{grid-template-columns:1fr}
 .ru-create .compact-choice-row button{flex-direction:row;justify-content:flex-start;gap:12px;padding:10px 12px}
 .ru-create .compact-choice-row span{text-align:left}
 .ru-create .compact-choice-row b{font-size:13px}
 .ru-create .compact-choice-row small{font-size:11px}
 .comment-tools{flex-wrap:wrap;gap:12px}
 .comment-tools>.primary-button{width:100%;justify-content:center}
 .work-card-author time{flex-basis:100%;margin-left:0}
 .message-thread>header{padding:12px}
 .message-reply textarea{flex-basis:100%}
 .message-reply>.primary-button{margin-left:auto}
 .auth-content .code-field{flex-wrap:wrap}
 .auth-content .code-field input{flex:1 1 100px}
 .auth-content .code-field button{flex:0 1 auto}
}
@media(max-width:360px){
 .manual-config .board-shape-grid{grid-template-columns:1fr}
 .manual-config .board-shape-grid button{display:grid;grid-template-columns:32px minmax(0,1fr);text-align:left;column-gap:12px;padding:10px 12px}
 .manual-config .board-shape-grid .ru-shape-icon{grid-row:1/3}
 .manual-config .board-shape-grid small{grid-column:2}
}
