
.cc-signin .cc-signin-languages {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-end: clamp(16px, 4vw, 40px);
  display: flex;
  gap: 4px;
}
.cc-signin-languages button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #595d61;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
}
.cc-signin-languages button:hover,
.cc-signin-languages button[aria-pressed="true"] {
  background: #f1f2f3;
  color: #232527;
}
.cc-signin-languages button:focus-visible {
  outline: 2px solid #232527;
  outline-offset: 2px;
}
#root .p-console.p-customer {
  --page-gutter: clamp(24px, 3vw, 36px);
  --page-top: 28px;
  --page-section-gap: 20px;
}

#root .p-console.p-customer main,
#root .p-console.p-customer main:has(.studio-dashboard),
#root .p-console.p-customer main:has(.pa-settings),
#root .p-console.p-customer main:has(.pg-page) {
  padding: var(--page-top) var(--page-gutter) 38px;
  max-width: none;
}

#root .p-console.p-customer main :is(.studio-dashboard, .pa-settings, .preview-analytics, .customer-models, .customer-workspace, .customer-integrated-billing) {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

#root .p-console.p-customer main :is(.preview-analytics, .pv-api-workspace, .preview-account) {
  padding-top: 0;
}

#root .p-console.p-customer main :is(.st-heading, .pm-heading, .pv-analytics-heading, .pa-page-heading, .pv-api-heading, .pg-page > .p-console-heading) {
  margin-block: 0 var(--page-section-gap);
}

#root .p-console.p-customer main :is(.customer-integrated-billing .preview-billing-tabs, .pv-api-tabs, .av-toolbar) {
  margin-bottom: var(--page-section-gap);
}

#root .p-console.p-customer main :is(h1, .pg-editor-heading > strong) {
  font-family: inherit;
  letter-spacing: -.4px;
}

#root .p-console.p-customer main :is(.pa-page-heading, .preview-analytics, .pm-heading, .st-heading, .customer-integrated-billing, .pv-api-heading, .pg-page > .p-console-heading) h1 {
  font-size: var(--type-page, 26px) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
}

#root .p-console.p-customer main .pg-page > .p-console-heading {
  display: flex;
}

#root .p-console.p-customer .pg-workspace {
  min-height: calc(100dvh - var(--page-top) - 38px - 54px);
}

@media (max-width: 900px) {
  #root .p-console.p-customer {
    --page-gutter: 18px;
    --page-top: 59px;
    --page-section-gap: 16px;
  }
}

/* Keep the generation action in the viewport while long settings can scroll. */
#root .p-console.p-customer .p-console-main > main.p-console-content:has(> .pg-page) {
  --playground-top-inset: 0px;
  padding: var(--playground-top-inset) 0 0 !important;
}
#root .p-console.p-customer .pg-page > .p-console-heading.pg-heading { display: none !important; }
#root .p-console.p-customer .pg-page .pg-input {
  height: calc(100dvh - var(--playground-top-inset));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#root .p-console.p-customer .pg-page .pg-creative-form {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
#root .p-console.p-customer .pg-editor-fields {
  display: grid;
  flex: 1 1 0;
  align-content: start;
  min-height: 0;
  gap: 14px;
  padding: 18px 22px;
  overflow-y: auto;
}
#root .p-console.p-customer .pg-creative-form .generation-main { gap: 12px; }
#root .p-console.p-customer .pg-creative-form .generation-settings { gap: 12px 14px; padding-top: 12px; }
#root .p-console.p-customer .pg-page .pg-create-footer {
  flex: none;
  gap: 6px;
  margin: 0;
  padding: 10px 22px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--night-border, #e8e8e8);
  background: var(--night-canvas, #fff);
}
@media (min-width: 901px) {
  #root .p-console.p-customer .pg-page .pg-workspace { height: 100dvh; min-height: 0; overflow: hidden; }
  #root .p-console.p-customer .pg-page .pg-output { position: static; height: 100%; min-height: 0; overflow: auto; }
}
@media (max-width: 900px) {
  #root .p-console.p-customer .p-console-main > main.p-console-content:has(> .pg-page) {
    --playground-top-inset: 59px;
  }
}
@media (max-height: 820px) {
  #root .p-console.p-customer .pg-page .pg-creative-form .generation-main > .field textarea {
    height: clamp(96px, 17dvh, 140px);
    min-height: 96px;
  }
  #root .p-console.p-customer .pg-page .pg-creative-form .field :is(input, select) { height: 38px; min-height: 38px; }
  #root .p-console.p-customer .pg-page .pg-image-fields .upload-area,
  #root .p-console.p-customer .pg-page .pg-tail-upload { min-height: 80px; }
  #root .p-console.p-customer .pg-page .pg-image-fields .image-preview { height: 80px; }
  #root .p-console.p-customer .pg-page .fablun-tail-frame:has(.image-preview) .pg-tail-upload { min-height: 28px; }
}
@media (max-height: 720px) {
  #root .p-console.p-customer .pg-page .pg-editor-fields { padding: 12px 16px; }
  #root .p-console.p-customer .pg-page .pg-advanced { padding-top: 8px; }
  #root .p-console.p-customer .pg-page:has(.pg-image-fields:not([hidden])) .generation-main > .field textarea {
    height: 96px;
    min-height: 96px;
  }
}
