.sgpro {
  --sg-yellow: #f7d438;
  --sg-panel: #202124;
  --sg-border: #5d5d63;
  background: #141416;
  color: #f7f7f7;
  color-scheme: dark;
  font: 16px/1.45 system-ui, sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 32px);
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.sgpro *, .sgpro *::before, .sgpro *::after { box-sizing: border-box; }
.sgpro h2, .sgpro h3, .sgpro p { color: inherit; margin: 0; font-family: inherit; }
.sgpro h2 { font-size: clamp(25px, 5vw, 44px); line-height: 1.1; }
.sgpro h3 { font-size: 17px; line-height: 1.4; }
.sgpro .sgpro-brand { color: var(--sg-yellow); font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.sgpro label { color: inherit; display: grid; min-width: 0; gap: 5px; font-size: 14px; }
.sgpro input:not([type=file]), .sgpro select, .sgpro button, .sgpro .sgpro-actions a {
  font: inherit;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--sg-border);
  border-radius: 7px;
  background: #2c2d30;
  color: #fff;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
}
.sgpro input:not([type=file]), .sgpro select { width: 100%; min-width: 0; }
.sgpro select { appearance: auto; }
.sgpro input[hidden] { display: none; }
.sgpro button, .sgpro .sgpro-actions a { cursor: pointer; text-decoration: none; text-align: center; }
.sgpro button:hover, .sgpro .sgpro-actions a:hover { border-color: var(--sg-yellow); color: var(--sg-yellow); }
.sgpro button[aria-pressed=true], .sgpro button.sgpro-primary {
  background: var(--sg-yellow);
  border-color: var(--sg-yellow);
  color: #161616;
  font-weight: 700;
}
.sgpro button:disabled { opacity: .5; cursor: default; }
.sgpro :focus-visible { outline: 2px solid var(--sg-yellow); outline-offset: 3px; }
.sgpro .sgpro-header, .sgpro .sgpro-sidebar, .sgpro .sgpro-fields,
.sgpro .sgpro-editor, .sgpro .sgpro-inspector, .sgpro .sgpro-footer { display: grid; gap: 12px; align-content: start; }
.sgpro .sgpro-header > label { max-width: 360px; }
.sgpro .sgpro-layout { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sgpro .sgpro-sidebar, .sgpro .sgpro-inspector, .sgpro .sgpro-footer {
  padding: 15px;
  background: var(--sg-panel);
  border-radius: 9px;
}
.sgpro .sgpro-sidebar h3:not(:first-child) { margin-top: 8px; }
.sgpro .sgpro-footer { margin-top: 16px; }
.sgpro .sgpro-status { min-height: 26px; color: var(--sg-yellow); margin: 8px 0; }
.sgpro .sgpro-actions, .sgpro .sgpro-layer-list, .sgpro .sgpro-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sgpro .sgpro-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sgpro .sgpro-area { color: var(--sg-yellow); font-size: 14px; }
.sgpro .sgpro-swatches button { width: 44px; }
.sgpro canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  touch-action: none;
  cursor: grab;
}
.sgpro canvas:active { cursor: grabbing; }
@media (max-width: 700px) {
  .sgpro .sgpro-layout { grid-template-columns: minmax(0, 1fr); }
}
.sgpro .sgpro-families { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 6px; }
@media (max-width: 700px) { .sgpro .sgpro-editor { grid-row: 1; } }
.sgpro .sgpro-film-swatches {display:flex;flex-wrap:wrap;gap:5px;max-height:120px;overflow:auto;padding:5px}.sgpro .sgpro-film-swatches button {width:38px;min-height:38px;border:2px solid #777}.sgpro .sgpro-film-swatches button[aria-pressed=true] {outline:3px solid #ffd700}.sgpro-film-panel label {margin-bottom:8px}
