/* Shared workspace typography and control alignment. Public pages are intentionally excluded. */
:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) {
  font-weight:400;
}

:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) :where(a,button,label,span,p,small,b,strong,td,li,input,select,textarea,summary,legend) {
  font-weight:400!important;
}

:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) :where(h1,h2,h3,h4,h5,h6,th),
:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) :where(h1,h2,h3,h4,h5,h6,th) *,
:is(.cabinet-shell,.admin-shell) :where(.cabinet-brand,.admin-brand,.cabinet-sidebar nav a,.admin-sidebar nav a,.admin-nav-group summary,.settings-spoiler summary,.keywords-tabs button,.keyword-admin-tabs a),
.cabinet-shell :where(.my-pins-campaign-title,.history-name strong,.result-copy h2,.keyword-folder-name,.account-identity h2,.account-board-copy strong),
.account-modal :where(.keyword-dialog-head h2,.keyword-detail-section h3) {
  font-weight:700!important;
}

:is(.cabinet-shell,.admin-shell,.pin-modal,.account-modal) :where(.btn,button,[role="button"]),
:is(.cabinet-shell,.admin-shell) :where(.status,.badge,.nav-badge,.tab-badge) {
  font-weight:500!important;
}

:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) :where(button,[role="button"],.btn) {
  text-align:center;
}

:is(.cabinet-shell,.admin-shell,.pin-modal,.gallery-modal,.account-modal) :where(button,[role="button"],.btn) > svg {
  display:block;
  flex:0 0 auto;
  margin:auto;
  pointer-events:none;
}

:where(.pin-icon-button,.reference-remove,.preset-reference-remove,.preset-reference-preview,.brief-prompt-upload,.history-open,.history-tools .secondary-button,.history-tools .danger-button,.pin-select,.pin-download,.pin-regenerate,.pin-delete,.pin-favorite,.copy-button,.pin-text-regenerate,.pin-dialog-close,.gallery-close,.gallery-nav,.gallery-favorite,.account-modal-close) {
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  line-height:0!important;
  text-indent:0;
}

:where(.pin-icon-button,.reference-remove,.preset-reference-remove,.preset-reference-preview,.brief-prompt-upload,.history-open,.history-tools .secondary-button,.history-tools .danger-button,.pin-select,.pin-download,.pin-regenerate,.pin-delete,.pin-favorite,.copy-button,.pin-text-regenerate,.pin-dialog-close,.gallery-close,.gallery-nav,.gallery-favorite,.account-modal-close) > svg {
  width:1em;
  height:1em;
  overflow:visible;
  stroke:currentColor;
}

.gallery-close {
  top:max(18px,env(safe-area-inset-top))!important;
  right:max(18px,env(safe-area-inset-right))!important;
}

.gallery-close > svg {
  width:20px;
  height:20px;
}

.pin-card-actions :where(.pin-download,.pin-regenerate,.pin-delete) > svg,
.history-tools button > svg,
.history-open > svg {
  width:15px;
  height:15px;
}

.pin-card-actions .pin-favorite > svg {
  width:17px;
  height:17px;
}

.result-copy-actions button > svg {
  width:14px;
  height:14px;
}

.pin-dialog-close > svg,
.account-modal-close > svg {
  width:18px;
  height:18px;
}

.gallery-nav > svg,
.gallery-favorite > svg {
  width:22px;
  height:22px;
}

:is(.pin-favorite,.gallery-favorite).is-active > svg {
  fill:currentColor;
}

@media(max-width:760px) {
  .gallery-close {
    top:max(10px,env(safe-area-inset-top))!important;
    right:max(10px,env(safe-area-inset-right))!important;
  }
}
