.field-group {
  min-width: 0;
  margin-bottom: 18px;
}

.visually-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.drop-zone {
  margin-top: 8px;
  margin-bottom: 24px;
  padding: 28px 20px;
  border: 2px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-large);
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 35%, white);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.04s ease, box-shadow 0.15s ease;
}

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

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

.drop-zone__icon {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--md-sys-color-primary);
}

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

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

.selected-file {
  margin-top: -12px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.input-help {
  margin-top: 14px;
  margin-bottom: 22px;
}

input,
textarea {
  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;
  min-height: 52px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  line-height: 1.7;
  font-family: "Roboto", "Noto Sans JP", sans-serif;
}

input:focus,
textarea: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);
}

.tool-actions {
  margin-top: 18px;
}

.result-summary {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.result-item__label {
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.result-item__value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--md-sys-color-on-surface-variant);
}

.result-item__value--primary {
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.tool-help h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

@media (max-width: 600px) {
  input,
  textarea {
    min-height: 48px;
    padding: 12px 10px;
    font-size: 0.875rem;
  }

  .tool-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .result-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }}
