.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  border-color: var(--accent);
}

.chip[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* Converter card */

.converter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.side {
  display: grid;
  grid-template-columns: 1fr minmax(0, 46%);
  gap: 8px 10px;
  align-items: center;
}

.side label {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.value-input,
.value-output,
.side select {
  min-height: 56px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  min-width: 0;
  width: 100%;
}

.value-input,
.value-output {
  padding: 8px 12px;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.value-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.value-output {
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--accent-soft);
  border-color: transparent;
  cursor: copy;
}

.side select {
  padding: 8px 10px;
  font-size: 1rem;
}

.swap {
  justify-self: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.3rem;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hint strong {
  color: var(--text);
}

.copied {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--accent);
}

/* All units list */

.all h2 {
  font-size: 1.1rem;
  margin: 28px 0 10px;
}

.all-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.all-list button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 16px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.all-list li:first-child button {
  border-top: none;
}

.all-list button:hover {
  background: var(--surface-2);
}

.all-list .is-from {
  color: var(--muted);
}

.all-list .is-to {
  background: var(--accent-soft);
}

.all-list .unit-name {
  color: var(--muted);
  font-size: 0.95rem;
}

.all-list .unit-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
