.sg-tool .sg-source { min-width: 0; flex: 1 1 145px; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.sg-tool .workspace-toolbar { flex-wrap: wrap; padding: 8px 0; }
.sg-tool .sg-stage, .sg-tool .sg-thumbnail { background-color: #f8f9f5; background-image: conic-gradient(#e8eddf 25%, transparent 0 50%, #e8eddf 0 75%, transparent 0); background-size: 20px 20px; }
.sg-tool .sg-stage { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; height: clamp(170px, 21vw, 240px); overflow: hidden; }
.sg-tool .sg-sheet-wrap { position: relative; cursor: crosshair; }
.sg-tool .sg-sheet-wrap canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.sg-tool .sg-grid, .sg-tool .sg-row-outline { position: absolute; pointer-events: none; left: 0; right: 0; }
.sg-tool .sg-grid { inset: 0; box-shadow: inset 0 0 0 1px #2d42394d; background-image: linear-gradient(to right, #2d42394d 1px, transparent 1px), linear-gradient(to bottom, #2d42394d 1px, transparent 1px); }
.sg-tool .sg-row-outline { box-shadow: inset 0 0 0 2px var(--green-dark); background-color: rgb(92 137 68 / 7%); }
.sg-tool .sg-note { color: var(--muted); line-height: 1.5; font-size: 13px; margin: 8px 0 16px; }
.sg-tool .sg-player { display: grid; grid-template-columns: minmax(80px, 132px) minmax(0,1fr); gap: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.sg-tool .sg-thumbnail { min-width: 0; min-height: 96px; display: grid; place-items: center; border-radius: 4px; }
.sg-tool .sg-thumbnail canvas { display: block; width: 100%; height: 112px; object-fit: contain; image-rendering: pixelated; }
.sg-tool .sg-controls { min-width: 0; }
.sg-tool .sg-play-heading, .sg-tool .sg-scrub, .sg-tool .sg-custom { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sg-tool .sg-play-heading strong { font-size: 14px; }
.sg-tool .sg-scrub { margin: 6px 0; }
.sg-tool .sg-scrub input { min-width: 0; width: 100%; accent-color: var(--green-dark); }
.sg-tool .sg-scrub span { font: 12px/1.4 'Space Mono', monospace; white-space: nowrap; }
.sg-tool .sg-custom { justify-content: flex-start; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sg-tool .sg-fields { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.sg-tool .sg-pair { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.sg-tool .sg-fields input, .sg-tool .sg-fields select, .sg-tool .sg-custom input { box-sizing: border-box; min-width: 0; width: 100%; margin-top: 4px; min-height: 38px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); font: inherit; font-size: 14px; line-height: 1.3; }
.sg-tool .sg-custom input { width: 85px; min-height: 32px; margin: 0; }
.sg-tool .settings-heading { margin-bottom: 17px; }
.sg-tool .sg-message { color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.sg-tool .sg-message:not(:empty) { margin-top: 9px; }
.sg-tool .upload-button, .sg-tool .download-button { font-size: 14px; }
.sg-tool button:disabled, .sg-tool input:disabled { opacity: .52; cursor: default; }
.sg-tool :focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.sg-tool [hidden] { display: none !important; }
@media (max-width: 450px) {
  .sg-tool .sg-player { padding: 9px; gap: 10px; grid-template-columns: 76px minmax(0,1fr); }
  .sg-tool .sg-thumbnail canvas { height: 90px; }
  .sg-tool .sg-stage { height: 165px; }
}
