textarea,
.text-input,
.select-input,
.file-input {
  width: 100%;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 0.9375rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

textarea:focus,
.text-input:focus,
.select-input:focus,
.file-input:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.panel-header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.color-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-input {
  width: 64px;
  min-width: 64px;
  height: 48px;
  padding: 4px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  cursor: pointer;
}

.text-input--mono {
  font-family: "Roboto", monospace;
}

.range-input {
  width: 100%;
  accent-color: var(--md-sys-color-primary);
}

.canvas-wrap {
  overflow: auto;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  padding: 12px;
}

#thumbnail-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #ffffff;
  cursor: default;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.preview-meta {
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}

.file-input--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 45%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent);
}

.drop-zone.is-dragover {
  border-color: var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 70%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
  transform: scale(1.01);
}

.drop-zone__icon {
  font-size: 42px;
  color: var(--md-sys-color-primary);
}

.drop-zone__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.drop-zone__desc,
.drop-zone__file-name {
  margin: 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

#object-list {
  min-height: 200px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .color-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .color-input {
    width: 100%;
    min-width: 0;
  }

  .drop-zone {
    min-height: 180px;
    padding: 20px;
  }}
