/* Shared look for every <dialog>: an index card with ruled fields. */
dialog {
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  width: min(400px, 92vw);
  color: var(--text);
  background:
    linear-gradient(to bottom, transparent 3.2rem, var(--margin) 3.2rem, var(--margin) calc(3.2rem + 2px), transparent calc(3.2rem + 2px)),
    var(--sheet);
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--accent) 35%, transparent);
  max-height: 90vh;
  overflow-y: auto;
}
dialog::backdrop { background: color-mix(in srgb, var(--shade) 45%, transparent); }
dialog h3 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
}

/* fields are just a line to write on */
dialog input:not([type="color"]),
dialog select,
dialog textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.3rem 0.1rem;
  border: none;
  border-bottom: 1px solid var(--text-soft);
  border-radius: 0;
  background: transparent;
}
dialog select option { background: var(--sheet); color: var(--text); }
dialog input:not([type="color"]):focus,
dialog select:focus,
dialog textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--primary);
  padding-bottom: calc(0.3rem - 1px);
}
.row { display: flex; gap: 1rem; }

.dialog-actions { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.75rem; }
.dialog-actions .tab { margin: 0 0.4rem; }
