.tool-workspace {
  padding-top: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.workspace-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.feature-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  padding-left: 20px;
}

.json-controls {
  display: grid;
  grid-template-columns: minmax(150px, 170px) repeat(3, minmax(90px, 1fr));
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.json-controls .button {
  width: 100%;
  min-height: 44px;
}

.json-indent-control {
  display: grid;
  grid-template-columns: auto minmax(76px, 1fr);
  align-items: center;
  min-width: 0;
  color: var(--muted);
}

.json-indent-control select {
  min-height: 44px;
}

.shadow-preview-wrap {
  display: grid;
  min-height: 340px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  background:
    linear-gradient(45deg, rgba(14, 124, 123, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(14, 124, 123, 0.08) 25%, transparent 25%),
    var(--surface-strong);
  background-size: 28px 28px;
}

.shadow-preview {
  display: grid;
  width: min(260px, 80%);
  aspect-ratio: 1.35;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 900;
}

.shadow-preview.is-text-mode {
  border: 0;
  background: transparent;
  font-size: 3rem;
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
}

.reference-table th,
.reference-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.drop-zone {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 2px dashed var(--line);
  background: var(--surface-strong);
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.image-preview {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.text-stats-panel {
  padding: clamp(18px, 4vw, 34px);
}

.text-stats-input {
  min-height: 360px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 1rem;
}

.text-stats-input::placeholder {
  color: #98a2b3;
  font-weight: 750;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stats-grid article {
  display: grid;
  min-height: 116px;
  place-items: center;
  border: 1px solid rgba(222, 216, 205, 0.65);
  background: #f7f8fa;
  padding: 18px 12px;
  text-align: center;
}

.stats-grid strong {
  color: #0b83c7;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 850;
}

.text-stats-actions {
  gap: clamp(12px, 4vw, 34px);
}

.text-stats-actions .button {
  min-width: 130px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
