.address-main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.address-title {
  margin-bottom: 24px;
}

.address-title p {
  margin: 0 0 6px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.address-title p:last-child {
  margin-top: 6px;
}

.address-title a {
  color: inherit;
  text-decoration: none;
}

.address-title a:hover {
  color: var(--color-primary);
}

.address-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.address-tool {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.address-field {
  display: grid;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.address-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-control);
  color: var(--color-text);
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  padding: 8px 10px;
}

.address-field small {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 400;
}

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

.address-actions {
  display: flex;
  gap: 10px;
}

.address-button,
.result-action,
.result-use,
.history-head button {
  min-height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-control);
  color: var(--color-text);
  cursor: pointer;
  font-weight: 700;
}

.address-button {
  flex: 1;
  padding: 8px 14px;
}

.address-button:hover,
.result-action:hover,
.result-use:hover,
.history-head button:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.address-button.is-primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.address-status {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.address-status.is-error {
  color: #fca5a5;
}

.address-result,
.address-history {
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.result-head,
.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-head p {
  margin: 0 0 2px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.result-head h3,
.history-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.result-action,
.history-head button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.72rem;
}

.result-hex {
  display: block;
  margin: 18px 0;
  overflow-wrap: anywhere;
  color: var(--color-accent-light);
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.45;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

.result-details div {
  min-width: 0;
}

.result-details dt {
  color: var(--color-text-muted);
  font-size: 0.68rem;
}

.result-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

.result-details small {
  color: var(--color-text-muted);
  font-family: inherit;
}

.result-use {
  margin-top: 18px;
  padding: 7px 12px;
  font-size: 0.76rem;
}

.address-history {
  padding-bottom: 14px;
}

.address-history ul {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.address-history li button {
  width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-history li button:hover {
  color: var(--color-primary);
}

@media (max-width: 520px) {
  .address-tool {
    padding: 16px;
  }

  .address-fields,
  .result-details {
    grid-template-columns: 1fr;
  }

  .result-hex {
    font-size: 1.12rem;
  }
}
