/* P108-A2 source-authority cleanup carried forward from P107.
   Auth remains accepted. Studio group/body/field wrappers are flat by source;
   real controls and intentional media/temporary surfaces retain boundaries. */

/* Login / auth in light mode: keep the window readable and calm. */
html[data-sh-theme="light"] body.sh-app-page .auth-window{
  background:rgba(255,255,255,.97)!important;
  border-color:#d8dfeb!important;
  color:#172033!important;
  box-shadow:0 26px 64px rgba(15,23,42,.11)!important;
}
html[data-sh-theme="light"] body.sh-app-page .window-bar{
  background:#f3f6fb!important;
  border-bottom-color:#d8dfeb!important;
}
html[data-sh-theme="light"] body.sh-app-page .window-title{color:#7a8698!important;}
html[data-sh-theme="light"] body.sh-app-page .auth-content{
  background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(245,247,251,.96))!important;
  color:#172033!important;
}
html[data-sh-theme="light"] body.sh-app-page .auth-content h1,
html[data-sh-theme="light"] body.sh-app-page .auth-content .lead{color:#172033!important;}
html[data-sh-theme="light"] body.sh-app-page .auth-content .lead{color:#5f6b80!important;}
html[data-sh-theme="light"] body.sh-app-page .google-btn{
  background:#ffffff!important;
  border-color:#ccd5e2!important;
  color:#172033!important;
  box-shadow:0 14px 34px rgba(15,23,42,.08)!important;
}
html[data-sh-theme="light"] body.sh-app-page .google-btn span{color:#172033!important;}
html[data-sh-theme="light"] body.sh-app-page .google-btn:hover{border-color:#b9c5d8!important;box-shadow:0 18px 42px rgba(15,23,42,.12)!important;}
html[data-sh-theme="light"] body.sh-app-page .back-link{color:#5b6678!important;}
html[data-sh-theme="light"] body.sh-app-page .back-link:hover{color:#a91451!important;}
html[data-sh-theme="light"] body.sh-app-page .taskbar-hint{
  background:rgba(255,255,255,.82)!important;
  border-color:#d6deea!important;
  color:#5b6678!important;
  box-shadow:0 18px 40px rgba(15,23,42,.09)!important;
}
html[data-sh-theme="light"] body.sh-app-page .taskbar-mark{background:#eef2f7!important;}

/* Soft, consistent field surfaces across Studio / Dashboard edit flows. */
html[data-sh-theme="dark"] body.sh-app-workspace-page .studio-page.workspace-frame,
html[data-sh-theme="dark"] body.sh-workspace-body .studio-page.workspace-frame{
  --p107-field-shell:#121a2b;
  --p107-field-soft:#151d2f;
  --p107-field:#1b2336;
  --p107-control:#10182a;
  --p107-control-hover:#141e31;
  --p107-line:#2e3749;
  --p107-line-strong:#404c63;
  --p107-text:#f8fbff;
  --p107-muted:#a6b0c2;
  --p107-dim:#7c889d;
  --p107-summary:#1b2132;
  --p107-summary-open-start:rgba(190,24,93,.17);
  --p107-summary-open-end:rgba(190,24,93,.08);
  --p107-summary-line:rgba(232,144,182,.26);
  --p107-raised:#222a3d;
  --p107-warn-bg:rgba(190,24,93,.10);
  --p107-warn-line:rgba(232,144,182,.26);
}
html[data-sh-theme="light"] body.sh-app-workspace-page .studio-page.workspace-frame,
html[data-sh-theme="light"] body.sh-workspace-body .studio-page.workspace-frame{
  --p107-field-shell:#f2f5f9;
  --p107-field-soft:#f7f9fc;
  --p107-field:#e6ecf3;
  --p107-control:#ffffff;
  --p107-control-hover:#fbfcfe;
  --p107-line:#c7d0dc;
  --p107-line-strong:#b2bdcd;
  --p107-text:#172033;
  --p107-muted:#4f5d72;
  --p107-dim:#5f6d82;
  --p107-summary:#f7e8ef;
  --p107-summary-open-start:#f6dde7;
  --p107-summary-open-end:#faf2f5;
  --p107-summary-line:#e2abc0;
  --p107-raised:#dde5ee;
  --p107-warn-bg:#fff1f5;
  --p107-warn-line:#e8adc1;
}

html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool{
  background:transparent!important;
  border-color:var(--p107-line)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool>summary{
  background:var(--p107-summary)!important;
  border-color:var(--p107-summary-line)!important;
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold[open]>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel[open]>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool[open]>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold[open]>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel[open]>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool[open]>summary{
  background:linear-gradient(90deg,var(--p107-summary-open-start),var(--p107-summary-open-end))!important;
  border-bottom-color:var(--p107-summary-line)!important;
  box-shadow:inset 4px 0 var(--sh-ui-accent)!important;
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel-title,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel-status,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-title,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-status,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel-title,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel-status,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-title,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-status{
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold[open]>summary .studio-group-status,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel[open]>summary .studio-panel-status,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold[open]>summary .studio-group-status,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel[open]>summary .studio-panel-status{
  background:var(--p107-field-soft)!important;
  border-color:var(--p107-summary-line)!important;
  color:var(--sh-ui-accent)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-body,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel-body,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool-body,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-body,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel-body,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool-body{
  background:transparent!important;
  background-image:none!important;
  color:var(--p107-text)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .form-field,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box>div,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .public-link-preview,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .maps-link-helper,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .gradient-color-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-box,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-grid,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .form-field,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box>div,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .public-link-preview,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .maps-link-helper,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .gradient-color-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-box,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-grid{
  background:transparent!important;
  background-image:none!important;
  color:var(--p107-text)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-link-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-trigger,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-popover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-current-card,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-direct-signature__fallback,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-reusable-signature__current,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sr-pdf-manager,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-link-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-trigger,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-popover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-current-card,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-direct-signature__fallback,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-reusable-signature__current,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sr-pdf-manager{
  background:var(--p107-field)!important;
  border-color:var(--p107-line)!important;
  color:var(--p107-text)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame label,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box strong,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-box strong,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame label,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box strong,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-box strong{
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .small,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .schema-note,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .upload-rule-note,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-label,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .public-link-preview,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .small,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .schema-note,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .upload-rule-note,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-label,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .public-link-preview{
  color:var(--p107-muted)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]),
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame textarea,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame select,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]),
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame textarea,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame select{
  background:var(--p107-control)!important;
  border-color:var(--p107-line-strong)!important;
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]):hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame textarea:hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame select:hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]):hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame textarea:hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame select:hover{
  background:var(--p107-control-hover)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input::placeholder,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame textarea::placeholder,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input::placeholder,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame textarea::placeholder{
  color:var(--p107-dim)!important;
  opacity:1!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input[type="file"],
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input[type="file"]{
  background:var(--p107-control)!important;
  border-color:var(--p107-line-strong)!important;
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input[type="file"]::file-selector-button,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input[type="file"]::-webkit-file-upload-button,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input[type="file"]::file-selector-button,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input[type="file"]::-webkit-file-upload-button{
  background:var(--p107-raised)!important;
  border-color:var(--p107-line)!important;
  color:var(--p107-text)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-tool-button,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-tool-button{
  background:var(--p107-raised)!important;
  border:1px solid var(--p107-line-strong)!important;
  color:var(--p107-text)!important;
  opacity:1!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-tool-button:hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-tool-button:focus-visible,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-tool-button:hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-tool-button:focus-visible{
  background:var(--p107-control)!important;
  border-color:var(--sh-ui-accent)!important;
  color:var(--sh-ui-accent)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-tool-button svg *,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-tool-button svg *{
  stroke:currentColor!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-row,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-row{
  color:var(--p107-text)!important;
  border-color:var(--p107-line)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-row:hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-row:focus,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-row:hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-row:focus{
  background:var(--p107-control)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .font-preview-row.is-selected,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .font-preview-row.is-selected{
  background:var(--p107-summary-open-start)!important;
  color:var(--sh-ui-accent)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-clear-control,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-clear-control{
  background:var(--p107-warn-bg)!important;
  border-color:var(--p107-warn-line)!important;
  color:var(--sh-ui-accent)!important;
}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-clear-control span,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-clear-control span{color:var(--sh-ui-accent)!important;}
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-agree,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-agree span,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-agree,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-agree span{
  background:var(--p107-summary-open-start)!important;
  border-left-color:var(--sh-ui-accent)!important;
  color:var(--p107-muted)!important;
}

/* Standard application pages that reuse Studio-ish blocks follow the same family. */
html[data-sh-theme="light"] body.sh-app-standard-page .locked-template-box,
html[data-sh-theme="light"] body.sh-app-standard-page .locked-template-box>div,
html[data-sh-theme="light"] body.sh-app-standard-page .public-link-preview{
  background:#e9edf3!important;
  border-color:#cbd4df!important;
  color:#172033!important;
}

/* === P107R1 — Auth dark + flat Studio surface + mobile density closure ===
   This revision closes the three hosting QA remnants after P107:
   dark-auth washout, nested legacy card surfaces, and oversized mobile headers.
   Scope remains application/workspace chrome only; invitation canvases are excluded. */

/* 1) Dark auth must be genuinely dark and the Google CTA must never inherit white text. */
html[data-sh-theme="dark"] body.sh-auth-page .auth-window{
  background:#151d31!important;
  border-color:#344057!important;
  color:#f8fbff!important;
  box-shadow:0 30px 72px rgba(0,0,0,.34)!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .window-bar{
  background:#1b2438!important;
  border-bottom-color:#344057!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .window-title{color:#d2d9e5!important;}
html[data-sh-theme="dark"] body.sh-auth-page .auth-content{
  background:linear-gradient(180deg,#1b2438 0%,#151d31 52%,#101729 100%)!important;
  color:#f8fbff!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .auth-content h1{color:#f8fbff!important;}
html[data-sh-theme="dark"] body.sh-auth-page .auth-content .lead{color:#aab4c4!important;}
html[data-sh-theme="dark"] body.sh-auth-page .google-btn{
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
  color:#172033!important;
  box-shadow:0 14px 32px rgba(0,0,0,.20)!important;
  opacity:1!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .google-btn span,
html[data-sh-theme="dark"] body.sh-auth-page .google-btn strong{
  color:#172033!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .google-btn:hover{
  background:#ffffff!important;
  border-color:#e2e8f0!important;
  box-shadow:0 18px 40px rgba(0,0,0,.26)!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .back-link{color:#d2d9e5!important;}
html[data-sh-theme="dark"] body.sh-auth-page .back-link:hover{color:#ffffff!important;}
html[data-sh-theme="dark"] body.sh-auth-page .taskbar-hint{
  background:rgba(21,29,49,.92)!important;
  border-color:#344057!important;
  color:#aab4c4!important;
}
html[data-sh-theme="dark"] body.sh-auth-page .taskbar-mark{background:#0d1425!important;}

/* 2) One section surface, not card-inside-card. Neutralize legacy plum slabs. */
html[data-sh-theme="dark"] body.sh-workspace-body .studio-page.workspace-frame,
html[data-sh-theme="dark"] body.sh-app-workspace-page .studio-page.workspace-frame{
  --p107r1-head:#151d31;
  --p107r1-head-open:#1b2438;
  --p107r1-line:#344057;
  --p107r1-line-strong:#526079;
  --p107r1-text:#f8fbff;
  --p107r1-muted:#aab4c4;
  --p107r1-control:#1b263b;
  --p107r1-control-hover:#202b40;
  --p107r1-accent-soft:rgba(190,24,93,.12);
}
html[data-sh-theme="light"] body.sh-workspace-body .studio-page.workspace-frame,
html[data-sh-theme="light"] body.sh-app-workspace-page .studio-page.workspace-frame{
  --p107r1-head:#eef2f7;
  --p107r1-head-open:#e7ecf3;
  --p107r1-line:#c7d1df;
  --p107r1-line-strong:#9eacbe;
  --p107r1-text:#172033;
  --p107r1-muted:#4f5d72;
  --p107r1-control:#ffffff;
  --p107r1-control-hover:#f8fafc;
  --p107r1-accent-soft:#f8e3ec;
}

html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool{
  background:transparent!important;
  border-color:var(--p107r1-line)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool>summary{
  background:var(--p107r1-head)!important;
  background-image:none!important;
  border-color:var(--p107r1-line)!important;
  color:var(--p107r1-text)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold[open]>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel[open]>summary,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool[open]>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold[open]>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel[open]>summary,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool[open]>summary{
  background:var(--p107r1-head-open)!important;
  background-image:none!important;
  border-bottom-color:var(--p107r1-line)!important;
  color:var(--p107r1-text)!important;
  box-shadow:inset 3px 0 var(--sh-color-accent)!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold[open]>summary .studio-group-status,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel[open]>summary .studio-panel-status,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold[open]>summary .studio-group-status,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel[open]>summary .studio-panel-status{
  background:transparent!important;
  border-color:transparent!important;
  color:var(--sh-color-accent)!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-body,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel-body,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-quiet-tool-body,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-body,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel-body,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-quiet-tool-body{
  background:transparent!important;
  color:var(--p107r1-text)!important;
  box-shadow:none!important;
}

/* Field rows become flat rows with separators. Inputs remain real controls. */
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .form-field,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .form-field{
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--p107r1-line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  color:var(--p107r1-text)!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .form-field:last-child,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .form-field:last-child{
  border-bottom-color:transparent!important;
}

/* Legacy helper/media slabs are flattened too. */
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box>div,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .public-link-preview,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .maps-link-helper,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-link-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .gradient-color-panel,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-current-card,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-direct-signature__fallback,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-reusable-signature__current,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-box,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-grid,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box>div,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .public-link-preview,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .maps-link-helper,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-link-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .gradient-color-panel,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-current-card,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-direct-signature__fallback,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-reusable-signature__current,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-box,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-grid{
  background:transparent!important;
  border-color:var(--p107r1-line)!important;
  box-shadow:none!important;
  color:var(--p107r1-text)!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-current-card,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .media-current,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-current-card{
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .sh-media-clear-control,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .sh-media-clear-control{
  background:transparent!important;
  border:0!important;
  border-left:2px solid var(--sh-color-accent)!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* Design picker: remove the remaining old-color slabs in both modes. */
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame #studio-desain .studio-theme-picker,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain .studio-theme-picker{
  background:transparent!important;
  border-color:var(--p107r1-line)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame #studio-desain .studio-theme-choice,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain .studio-theme-choice{
  background:transparent!important;
  border-color:var(--p107r1-line)!important;
  color:var(--p107r1-text)!important;
  box-shadow:none!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame #studio-desain .studio-theme-choice.is-selected,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain .studio-theme-choice.is-selected{
  background:var(--p107r1-accent-soft)!important;
  color:var(--p107r1-text)!important;
  box-shadow:inset 3px 0 var(--sh-color-accent)!important;
}

/* Controls stay distinct without becoming another full card layer. */
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]),
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame textarea,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame select,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]),
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame textarea,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame select{
  background:var(--p107r1-control)!important;
  border-color:var(--p107r1-line-strong)!important;
  color:var(--p107r1-text)!important;
}
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]):hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame textarea:hover,
html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame select:hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame input:not([type="checkbox"]):not([type="radio"]):hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame textarea:hover,
html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame select:hover{
  background:var(--p107r1-control-hover)!important;
}

/* 3) Mobile: stop desktop typography/surface geometry leaking into the narrow editor. */
@media (max-width:820px){
  html[data-sh-theme] body.sh-workspace-body .workspace-frame>.workspace-header h1,
  html[data-sh-theme] body.sh-workspace-body .workspace-frame .workspace-header h1,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame>.workspace-header h1,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame .workspace-header h1{
    font-size:clamp(30px,7.2vw,40px)!important;
    line-height:1.04!important;
    letter-spacing:-.035em!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  html[data-sh-theme] body.sh-workspace-body .workspace-frame>.workspace-header,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame>.workspace-header{
    gap:12px!important;
    margin-bottom:18px!important;
    padding-bottom:16px!important;
  }
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-fold>summary,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel>summary,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-fold>summary,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel>summary{
    padding:13px 12px!important;
  }
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-group-body,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .studio-panel-body,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-group-body,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .studio-panel-body{
    padding-left:12px!important;
    padding-right:12px!important;
  }
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .form-field,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .form-field{
    margin:0!important;
    padding:14px 0!important;
  }
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .responsible-grid,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .responsible-grid{
    margin-left:0!important;
    margin-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
  }
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .locked-template-box>div,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .locked-template-box>div{
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
  }
}
@media (max-width:520px){
  html[data-sh-theme] body.sh-workspace-body .workspace-frame>.workspace-header h1,
  html[data-sh-theme] body.sh-workspace-body .workspace-frame .workspace-header h1,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame>.workspace-header h1,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame .workspace-header h1{
    font-size:clamp(28px,8.4vw,34px)!important;
  }
}


/* Narrow hard guard for the Design section seen in mobile QA. */
html[data-sh-theme] body.sh-workspace-body #studio-desain>summary,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain>summary{
  background:var(--p107r1-head)!important;
  background-image:none!important;
  border-color:var(--p107r1-line)!important;
  color:var(--p107r1-text)!important;
  box-shadow:inset 3px 0 var(--sh-color-accent)!important;
}
html[data-sh-theme] body.sh-workspace-body #studio-desain>summary *,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain>summary *{
  color:inherit!important;
}
html[data-sh-theme] body.sh-workspace-body #studio-desain .studio-panel-body,
html[data-sh-theme] body.sh-workspace-body #studio-desain .studio-group-body,
html[data-sh-theme] body.sh-workspace-body #studio-desain .locked-template-box,
html[data-sh-theme] body.sh-workspace-body #studio-desain .locked-template-box>div,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain .studio-panel-body,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain .studio-group-body,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain .locked-template-box,
html[data-sh-theme] body.sh-app-workspace-page #studio-desain .locked-template-box>div{
  background:transparent!important;
  background-image:none!important;
  color:var(--p107r1-text)!important;
  box-shadow:none!important;
}

@media (max-width:820px){
  html[data-sh-theme] body.sh-workspace-body .workspace-frame>h1,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame>h1,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .workspace-title,
  html[data-sh-theme] body.sh-workspace-body .studio-page.workspace-frame .page-title,
  html[data-sh-theme] body.sh-app-workspace-page .workspace-frame>h1,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame>h1,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .workspace-title,
  html[data-sh-theme] body.sh-app-workspace-page .studio-page.workspace-frame .page-title{
    font-size:clamp(30px,7.2vw,40px)!important;
    line-height:1.04!important;
    letter-spacing:-.035em!important;
    overflow-wrap:anywhere!important;
  }
}

:root{--sh-p107r1-closure-version:"P107R1"}

/* P108-A2: source ownership is now flat in P104/P103/P107 itself; no late card-bleed override is required. */
:root{--sh-p108a2-studio-surface-authority:"P108-A2"}

/* P108-A3 — Theme exploration category select native-paint authority.
   Real Android QA showed #studio-category could keep a dark UA/native menulist
   surface while the surrounding Studio was already in light mode. Keep the
   control native, but bind its color-scheme and foreground/background to the
   active Silahadir mode. Scope is intentionally only the category selector. */
html[data-sh-theme="light"] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain #studio-category,
html[data-sh-theme="light"] body.sh-workspace-body .studio-page.workspace-frame #studio-desain #studio-category{
  color-scheme:light!important;
  appearance:auto!important;
  -webkit-appearance:menulist!important;
  background-color:#ffffff!important;
  background-image:none!important;
  border-color:#9eacbe!important;
  color:#172033!important;
  -webkit-text-fill-color:#172033!important;
  box-shadow:none!important;
}
html[data-sh-theme="light"] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain #studio-category:focus,
html[data-sh-theme="light"] body.sh-workspace-body .studio-page.workspace-frame #studio-desain #studio-category:focus{
  background-color:#ffffff!important;
  border-color:#be185d!important;
  color:#172033!important;
  -webkit-text-fill-color:#172033!important;
  outline:2px solid rgba(190,24,93,.18)!important;
  outline-offset:1px!important;
}
html[data-sh-theme="light"] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain #studio-category option,
html[data-sh-theme="light"] body.sh-workspace-body .studio-page.workspace-frame #studio-desain #studio-category option{
  color-scheme:light!important;
  background:#ffffff!important;
  color:#172033!important;
}
html[data-sh-theme="dark"] body.sh-app-workspace-page .studio-page.workspace-frame #studio-desain #studio-category,
html[data-sh-theme="dark"] body.sh-workspace-body .studio-page.workspace-frame #studio-desain #studio-category{
  color-scheme:dark!important;
  appearance:auto!important;
  -webkit-appearance:menulist!important;
  background-color:#1b263b!important;
  border-color:#526079!important;
  color:#f8fbff!important;
  -webkit-text-fill-color:#f8fbff!important;
}
:root{--sh-p108a3-category-select-authority:"P108-A3"}
