/* Trace a picture dialog (logo-trace.js). Uses the studio's dark tokens; the fallbacks keep it readable on its own. */
.mt-open-line{margin:8px 0 0}
.ms-trace{width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--card-line,#26406a);border-radius:14px;background:var(--card,#0f1b2f);color:var(--ink,#f0f4fa);box-shadow:0 24px 64px #000a;overflow:auto}
.ms-trace::backdrop{background:#02060fd9}
.mt-form{display:grid;gap:14px;padding:18px 20px 20px}
.mt-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mt-head h2{margin:0;font-size:22px;line-height:1.2}
.mt-x{font-size:22px;line-height:1;padding:4px 12px}
.mt-intro,.mt-tip{margin:0;color:var(--muted,#96a6be);max-width:72ch;line-height:1.5}
.mt-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.mt-pane{margin:0;display:grid;gap:6px;min-width:0}
.mt-pane figcaption{font-size:13px;color:var(--muted,#96a6be)}
.mt-frame{border:1px solid var(--card-line,#26406a);border-radius:10px;height:min(40vh,340px);overflow:hidden;display:grid;place-items:center;background:#0b1424}
.mt-frame canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto}
.mt-checker{background:conic-gradient(#cfd5de 25%,#fff 0 50%,#cfd5de 0 75%,#fff 0) 0 0/16px 16px}
.mt-status{margin:0;font-size:14px;color:var(--muted,#96a6be);min-height:1.4em}
.mt-warn{color:var(--warn,#ffb547)}
.mt-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px 22px}
.mt-row{display:grid;gap:5px;align-content:start;font-size:15px}
.mt-row output{font-variant-numeric:tabular-nums;color:var(--muted,#96a6be);margin-left:4px}
.mt-row input[type=range]{width:100%}
.mt-row select{width:100%}
.mt-row small{color:var(--muted,#96a6be);font-size:13px}
.mt-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.mt-spacer{flex:1 1 auto}
.mt-actions button:disabled{opacity:.5;cursor:not-allowed}
.ms-trace.mt-msg{width:min(440px,calc(100vw - 24px))}
.ms-trace.mt-msg form{display:grid;gap:14px;padding:18px 20px}
.ms-trace.mt-msg p{margin:0}
@media (max-width:640px){
  .mt-stage{grid-template-columns:minmax(0,1fr)}
  .mt-frame{height:min(26vh,220px)}
  .mt-form{padding:14px 14px 120px}   /* room under the buttons for the floating Privacy choices button the studio puts in open dialogs */
  .mt-actions .primary{order:-1;flex:1 1 100%}   /* the main button first and full width on a phone */
  .mt-spacer{display:none}
}
