.tool-panel {
  margin-block: 2.5rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid #665337;
  border-radius: 12px;
  background: #191a16;
}
.tool-panel h1, .tool-panel h2, .tool-panel h3 { margin-block: .35em .55em; }
.tool-form, .tool-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .85rem;
  margin-block: 1rem;
}
.tool-form label { display: grid; gap: .3rem; flex: 1 1 10rem; color: #dfd1b8; }
.tool-form label:has(input[type="checkbox"]) { display: flex; align-items: center; }
.tool-form label:has(textarea) { flex-basis: min(18rem, 100%); }
.tool-form input:not([type="checkbox"]), .tool-form select, .tool-panel textarea {
  min-width: 0;
  width: 100%;
  background: #121410;
  border: 1px solid #746144;
  color: #f6ead4;
  border-radius: 6px;
  padding: .55rem .65rem;
  font: inherit;
}
.tool-form textarea { min-height: 4.8rem; resize: vertical; }
.tool-note { color: #d3c4a8; }
.tool-table { overflow-x: auto; margin-block: .75rem; }
.tool-table table { width: 100%; border-collapse: collapse; }
.tool-table th, .tool-table td { text-align: start; padding: .55rem .7rem; border-bottom: 1px solid #554935; }
.tool-steps { padding-inline-start: 1.6rem; }
.tool-steps li { padding: .35rem; }
.tool-steps input { margin-inline-end: .5em; }
.tool-panel [role="status"]:empty { display: none; }
.tool-panel details { margin-block: .8rem; }
.tool-panel summary { cursor: pointer; }
.tool-actions [aria-pressed="true"] { background: #d3ab64; color: #20170d; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: .85rem; }
.tool-cards article { padding: .8rem; border: 1px solid #665337; border-radius: 6px; }

@media (max-width: 640px) {
  :where(body:has(#prices, #armory-search, #calculator, #raid-title)) .site-header {
    height: auto;
    min-height: 77px;
    padding-block: 8px;
    flex-wrap: wrap;
    gap: 4px 12px;

    & nav {
      max-inline-size: 100%;
      flex-wrap: wrap;
      gap: 0 8px;
    }

    & nav a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-inline-size: 44px;
      min-block-size: 44px;
      font-size: .875rem;
    }
  }

  :is(#armory-search, #character-editor, #leveling-form) :is(input, select, textarea) {
    font-size: 1rem;
  }

  :is(#armory-search, #character-editor, #leveling-form) :is(input, select) {
    min-block-size: 44px;
  }
}
