.converter .panel-body > * + * {
  margin-top: var(--space-4);
}

.converter-drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: var(--space-8) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-large);
  background: var(--background-subtle);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.converter-drop[hidden] {
  display: none;
}

.converter-drop strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.converter-drop .button {
  margin-top: var(--space-2);
}

.converter-drop:hover,
.converter.dragging .converter-drop,
.converter.dragging .file-card {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.converter-drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-small);
}

.file-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--background-subtle);
}

.file-card[hidden] {
  display: none;
}

.file-card-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.file-card-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.file-card-text strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-text small {
  color: var(--text-muted);
  font-size: 12px;
}

.converter-examples .chip {
  font-weight: 500;
}

.converter-privacy {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
  font-size: 12.5px;
}

.spectrum-select[hidden] {
  display: none;
}

.spectrum-select .input {
  width: auto;
  max-width: 260px;
  height: 30px;
}

.converter-preview {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.converter-preview .result-empty {
  height: 100%;
  min-height: 0;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.format-grid legend {
  margin-bottom: var(--space-2);
  padding: 0;
}

.format-option {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
}

.format-option input {
  position: absolute;
  opacity: 0;
}

.format-option > span {
  display: grid;
  flex: 1;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.format-option:hover > span {
  border-color: var(--border-strong);
}

.format-option input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.format-option input:focus-visible + span {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.format-option strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.format-option small {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
}

.format-option em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.decimal-comma {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.decimal-comma[hidden] {
  display: none;
}

.decimal-comma input {
  accent-color: var(--accent);
}

.converter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.converter-facts dd {
  white-space: pre-line;
}

.converter-labels > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.converter-labels[open] > summary {
  margin-bottom: var(--space-3);
}

.converter-labels dt {
  font-family: var(--font-mono);
  font-size: 12px;
}

.converter-facts > div {
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
}

@media (max-width: 560px) {
  .converter-preview {
    height: 240px;
  }

  .converter-actions .button {
    width: 100%;
  }
}
