.hex-tool-intro {
  padding: 2rem 0 1.25rem;
}

.hex-tool-intro h1 {
  margin-top: 0.35rem;
}

.hex-tool-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hex-tool-points strong {
  color: var(--text);
  font-weight: 500;
}

.hex-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .hex-tool-grid {
    grid-template-columns: 1fr;
  }
}

.hex-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.hex-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.hex-panel-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.hex-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.hex-field > span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.hex-input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.hex-textarea {
  resize: vertical;
  min-height: 5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
}

.hex-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: -0.5rem 0 1rem;
}

.hex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.hex-status {
  font-size: 0.88rem;
  min-height: 1.25rem;
  margin: 0 0 1rem;
  color: var(--muted);
}

.hex-status--ok {
  color: #4ade80;
}

.hex-status--err {
  color: #f87171;
}

/* Vista previa cuadrada: el canvas escala al 100% del recuadro */
.hex-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  padding: 10px;
  box-sizing: border-box;
  background: #e8e8e8;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  overflow: hidden;
}

.hex-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  pointer-events: none;
}

.hex-preview:has(.hex-symbol-canvas) .hex-preview-empty {
  display: none;
}

.hex-symbol-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hex-preview-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.hex-result {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 4rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.hex-hidden {
  display: none;
}

.hex-notice {
  margin-top: 2rem;
}
