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;
  resize: vertical;
  min-height: 220px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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);
}

.qr-colors {
  margin: 0 0 16px;
  padding: 0;
  border: none;
  min-inline-size: 0;
}

.qr-colors .field-label {
  padding: 0;
}

.qr-colors__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.qr-colors__picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.qr-colors__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}

.qr-colors__picker input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 2px;
  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;
}

.qr-colors__picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.qr-colors__picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--md-sys-shape-corner-medium) - 4px);
}

.qr-colors__picker input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: calc(var(--md-sys-shape-corner-medium) - 4px);
}

.qr-logo-field {
  margin: 0 0 16px;
}

.qr-logo-field__hint {
  margin-top: -4px;
  margin-bottom: 12px;
}

.qr-logo-field__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.qr-logo-drop-area {
  margin-bottom: 0;
}

.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;
}

.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);
}

.drop-area {
  position: relative;
  padding: 32px 24px;
  margin-bottom: 12px;
  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);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

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

.drop-area__icon {
  display: block;
  margin-bottom: 8px;
  font-size: 40px;
  color: var(--md-sys-color-primary);
}

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

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

.drop-area__note {
  margin-top: 8px;
}

.drop-area .file-input {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: none;
  margin: 0;
}

.qr-output {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
}

.qr-output img {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-output__placeholder {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9375rem;
}

@media (max-width: 600px) {
  .drop-area {
    padding: 28px 18px;
  }}
