/* The local account surface adopts the observed release's brand tokens. */
:root { --local-surface: white; --z-toast: 70; }
.local-auth-panel { display: grid; gap: 16px; padding-block: 24px; line-height: 1.8; color: var(--neutral-850, #292c32); }
.local-auth-panel p { margin: 0; }
.local-provider-note { margin: 6px 0 0; color: var(--neutral-650, #626770); font-size: 12px; line-height: 1.6; }
.local-auth-panel a, .local-auth-panel button { display: block; text-align: center; padding: 12px 20px; border: 1px solid var(--neutral-250, #ddd); border-radius: 8px; background: var(--local-surface); color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
.local-auth-panel .local-primary { background: var(--orange, #e96237); color: white; border-color: transparent; }
.studio-auth-content:has(.local-auth-panel) > :not(.modal-heading):not(.local-auth-panel) { display: none; }
.local-auth-panel :focus-visible, .local-environment:focus-visible { outline: 3px solid var(--orange, #e96237); outline-offset: 3px; }
.local-utilities { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-inline-start: var(--studio-sidebar-width, 0px); padding: 12px 32px 24px; }
.local-environment { font: 12px/1.6 system-ui, sans-serif; color: var(--neutral-650, #626770); padding: 5px 0; text-decoration: none; }
.local-tools { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 13px/1.5 system-ui, sans-serif; }
.local-tools a { display: inline-flex; align-items: center; min-height: 32px; color: var(--neutral-850, #292c32); text-decoration: none; }
.local-tools a:hover { color: var(--orange, #e96237); }
.local-tools a:focus-visible { outline: 3px solid var(--orange, #e96237); outline-offset: 3px; }
.local-account-page { --local-muted: var(--neutral-650, #626770); min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--neutral-100, #f5f6f8); color: var(--neutral-850, #292c32); font: 15px/1.8 'DM Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif; text-autospace: normal; }
.local-account { width: min(100%, 440px); background: var(--local-surface); padding: clamp(24px, 5vw, 44px); border: 1px solid var(--neutral-250, #ddd); border-radius: 16px; }
.local-account .brand { display: flex; gap: 10px; align-items: center; font-size: 24px; font-weight: 700; text-decoration: none; color: inherit; }
.local-account [hidden] { display: none; }
.local-account .brand img { width: 32px; height: 32px; }
.local-account h1 { margin-block: 26px 6px; font-size: 26px; line-height: 1.4; }
.local-account p { margin-block: 0 20px; color: var(--local-muted); }
.local-account label { display: grid; gap: 6px; margin-block: 14px; }
.local-account input { width: 100%; min-height: 46px; border: 1px solid var(--neutral-250, #ddd); background: var(--local-surface); border-radius: 8px; padding: 10px 12px; color: inherit; font: inherit; font-size: 16px; }
.local-account button, .local-account .button { width: 100%; min-height: 46px; border: 0; border-radius: 8px; background: var(--orange, #e96237); color: white; font: inherit; font-weight: 600; cursor: pointer; padding: 10px 16px; }
.local-account button:disabled { opacity: .55; cursor: wait; }
.local-account button.secondary { background: transparent; color: var(--local-muted); margin-block-start: 8px; border: 1px solid var(--neutral-250, #ddd); }
.local-account :focus-visible { outline: 3px solid var(--orange, #e96237); outline-offset: 3px; }
.local-account #feedback { color: var(--orange, #e96237); min-height: 28px; margin-block: 14px 0; overflow-wrap: anywhere; }
.local-account .footnote { font-size: 13px; margin-block: 18px 0; }
.local-account a { color: var(--orange, #e96237); }
@media (max-width: 820px) { .local-utilities { margin-inline-start: 0; padding-inline: 20px; } }
#studio-billing-dialog {
  box-sizing: border-box;
  width: min(1060px, calc(100% - 32px));
  height: min(820px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 28px 90px var(--color-shadow);
}
#studio-billing-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#studio-billing-dialog::backdrop { background: var(--color-scrim); }
#studio-billing-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px 8px; background: var(--color-paper); }
#studio-billing-dialog h2 { margin: 0; font: 650 var(--text-section)/1.4 var(--font-display); }
#studio-billing-dialog button { min-height: 36px; padding-inline: 12px; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-paper-3); color: inherit; cursor: pointer; }
#studio-billing-dialog button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
#studio-billing-dialog iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  #studio-billing-dialog { width: calc(100% - 16px); height: calc(100dvh - 20px); }
  #studio-billing-dialog header { padding: 10px 12px; }
}

.upscale-workspace .page-content:has(> .studio-upscale-frame) {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}
.upscale-workspace .main:has(.studio-upscale-frame) { display: flex; flex-direction: column; }
.upscale-workspace .main:has(.studio-upscale-frame) > .topbar { flex-shrink: 0; }
.upscale-workspace .page-content:has(> .studio-upscale-frame) > .page-heading { display: none; }
.studio-upscale-frame { flex: 1; display: block; width: 100%; min-height: 0; border: 0; }
