/* Structural layout only: surfaces and accents continue to come from the selected theme. */
main { max-width:1380px; padding-top:32px; }
#view-compose>.page-heading { margin:0 0 18px; }
#view-compose>.page-heading h1 { font-size:clamp(27px,2.2vw,38px); line-height:1.15; margin:0 0 8px; }
#view-compose>.page-heading .eyebrow { margin-bottom:9px; }
#view-compose>.notice { margin-bottom:20px; }
.composer-layout { display:block; max-width:none; }
.form-column { min-width:0; }
.form-column>.connection,.form-column>.cloud-card,.form-column>.mode-switch,.form-column>.editor-card { margin:0; }
.form-column>.editor-card,.form-column>.destination-card,.form-column>.batch-card { min-width:0; }
.form-column>.action-row { margin:0; }
#view-history .history-item,#view-history .history-empty { width:100%; }
#view-preview .preview-column { max-width:540px; }
#view-preview .phone-preview { min-height:480px; }
.theme-toggle { width:40px;height:40px;min-width:40px;min-height:40px;aspect-ratio:1;flex:0 0 40px;box-sizing:border-box;border-radius:50%;padding:0; }
.display-select select { box-sizing:border-box;height:40px;min-height:40px; }
@media(min-width:1050px) {
 .form-column { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); grid-template-areas:'connection cloud' 'mode mode' 'editor destination' 'action destination' 'batch batch'; gap:16px 22px; align-items:start; }
 .form-column>.connection { grid-area:connection;min-height:84px;height:100%; }
 .form-column>.cloud-card { grid-area:cloud;min-height:84px;height:100%; }
 .form-column>.mode-switch { grid-area:mode; }
 .form-column>.editor-card { grid-area:editor; }
 .form-column>.destination-card { grid-area:destination;position:static; }
 .form-column>.batch-card { grid-area:batch;margin:0; }
 .form-column>.action-row { grid-area:action; }
 .editor-card textarea { min-height:240px; }
}
@media(max-width:1049px) {
 .form-column { display:flex;flex-direction:column;gap:14px; }
 .form-column>* { width:100%; }
 .form-column>.destination-card { position:static; }
}
@media(max-width:700px) {
 main { padding-top:24px; }
 #view-compose>.page-heading h1 { font-size:30px; }
 .form-column { gap:12px; }
 .form-column>.action-row { width:calc(100% + 10px);margin-left:-5px;margin-right:-5px; }
 .theme-toggle { width:40px;height:40px;min-width:40px;min-height:40px; }
}
/* Theme styles may set their own margins: keep layout geometry identical. */
html[data-theme] .form-column>.connection,html[data-theme] .form-column>.cloud-card,html[data-theme] .form-column>.mode-switch,html[data-theme] .form-column>.editor-card,html[data-theme] .form-column>.batch-card,html[data-theme] .form-column>.action-row { margin:0; }
@media(max-width:700px) { html[data-theme] .form-column>.action-row { margin-inline:-5px; } }
html[data-theme] #view-preview .preview-column { max-width:540px; }
html[data-theme] #view-preview .phone-preview { min-height:480px; }
@media(max-width:700px) { html[data-theme] #view-preview .preview-column { max-width:100%; } }
html[data-theme] .composer-layout { display:block;max-width:none; }
