/* Shared action layout: text stays inside its surface at narrow widths and zoom. */
:is(.primary-button,.secondary-button,.danger-button,.account-submit,.account-link-button,.account-recovery-button,.public-button,.billing-confirmation-submit,.paywall-select) {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-width:0;max-width:100%;min-height:44px;height:auto;
  line-height:1.35;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;text-align:center;
}
:is(.form-actions,.editor-actions,.account-email-actions,.goal-reward-actions,.space-member-actions,.proposal-create-actions) {
  flex-wrap:wrap;min-width:0;gap:10px;
}
:is(.form-actions,.editor-actions,.account-email-actions,.goal-reward-actions,.space-member-actions,.proposal-create-actions)>:is(button,a) {
  min-width:0;max-width:100%;height:auto;min-height:44px;
  white-space:normal;line-height:1.35;overflow-wrap:normal;word-break:normal;hyphens:none;
}
.request-actions { display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;min-width:0; }
:is(.page-request,.request-compact)>.request-actions { margin-top:20px; }
.request-actions button,
.request-compact .request-actions button,
.page-request .request-actions button,
.proposal-page .request-actions button,
.editor .proposal-conflict-grid~.request-actions button {
  display:flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;
  flex:1 1 max-content;min-width:0;max-width:100%;height:auto;min-height:44px;
  padding:10px 9px;line-height:1.35;font-size:14px;white-space:normal;text-align:center;
}
.request-actions button>span { min-width:0;overflow-wrap:normal;word-break:normal; }
.request-actions button>.icon { flex:none;width:20px;height:20px; }
:is(.primary-button,.secondary-button,.danger-button,.account-submit)>:is(.icon,svg,img) { flex-shrink:0; }
.page-heading :is(.primary-button,.secondary-button,.danger-button),
.space-group-heading .secondary-button { min-height:44px;height:auto;white-space:normal;line-height:1.35; }
.account-center-card .account-submit,
.account-center-card #accountForm[data-mode] .account-submit { height:auto;min-height:55px;padding-block:12px;line-height:1.35; }
/* Fit action groups to their available column rather than splitting words. */
.page-heading { flex-wrap:wrap; }
.page-heading>h1 { min-width:0;max-width:100%; }
.page-heading>:is(.primary-button,.secondary-button) { flex-shrink:0; }
.proposal-heading { align-items:flex-start; }
.proposal-create-actions {
  display:grid;flex:0 1 520px;width:100%;max-width:520px;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));
}
.proposal-create-actions>.proposal-action { min-width:0;max-width:100%;flex:none; }
.proposal-action :is(strong,small) { overflow-wrap:normal;word-break:normal;hyphens:none;text-wrap:pretty; }
.proposal-action strong { font-size:14px;line-height:1.35; }
.proposal-action small { line-height:1.4; }
@media(max-width:480px) {
  .form-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :is(.form-actions,.editor-actions,.account-email-actions,.goal-reward-actions,.proposal-create-actions)>:is(button,a) { flex:1 1 120px; }
  :is(.event-reuse-actions,.conflict-choice-actions) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .event-reuse-actions { grid-template-columns:minmax(0,1fr); }
  .request-actions button,.request-compact .request-actions button,.page-request .request-actions button,.proposal-page .request-actions button { font-size:13px; }
}
@media(max-width:1100px) {
  .proposal-create-actions { flex-basis:auto; }
}

/* Keep the member action intact and let its explanation use the whole row. */
.space-members-panel { container:space-members / inline-size; }
.space-members-panel>.space-group-heading {
  display:grid;grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;gap:8px 12px;
}
.space-members-panel>.space-group-heading>div { display:contents; }
.space-members-panel>.space-group-heading h2 { grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere; }
.space-members-panel>.space-group-heading .space-members-hint { grid-column:1/-1;grid-row:2;margin:0!important; }
.space-members-panel>.space-group-heading>.secondary-button {
  grid-column:2;grid-row:1;justify-self:end;flex:none;
  min-height:44px;white-space:nowrap;
}
@container space-members (max-width:340px) {
  .space-members-panel>.space-group-heading { grid-template-columns:minmax(0,1fr); }
  .space-members-panel>.space-group-heading>.secondary-button { grid-column:1;grid-row:3;justify-self:start; }
}
